This is an example project that demonstrates how to implement OTP two-factor authentication in devise so that the user is asked for their OTP code as a second login step.
A step by step guide is available here: Implementing OTP two-factor authentication as a second login step with Rails and Devise
You can run this example by following the steps below.
-
Run yarn
yarn install
-
Run bundler
bundle install
-
Setup the database
rails db:reset rails db:migrate db:seed
-
Visit [http://localhost:3000/])(http://localhost:3000/). Default credentials are:
Username: admin@example.com Password: letmein