Skip to content

An example of how to implemented OTP two-factor authentication as a second login step in Rails and Devise

Notifications You must be signed in to change notification settings

jamesridgway/devise-otp-second-step

Repository files navigation

Devise OTP 2FA as Second Login Step Example

Tests

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.

OTP as second-step

A step by step guide is available here: Implementing OTP two-factor authentication as a second login step with Rails and Devise

Using this example

You can run this example by following the steps below.

  1. Run yarn

    yarn install
    
  2. Run bundler

    bundle install
    
  3. Setup the database

    rails db:reset
    rails db:migrate db:seed
    
  4. Visit [http://localhost:3000/])(http://localhost:3000/). Default credentials are:

    Username: admin@example.com
    Password: letmein
    

About

An example of how to implemented OTP two-factor authentication as a second login step in Rails and Devise

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published