Low commit activity in last 3 years
Devise plugin to allow sign in by email sent code
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

DeviseCodeAuthenticatable

A Devise plugin for two-factor authenticatable.

Installation

Add this line to your Rails Gemfile:

gem 'devise_code_authenticatable'

Run:

rails generate devise_code_authenticatable:install

This will create a migration file in your db/migrate folder, then

rails db:migrate

Add :authenticatable to the model you want to enable code_authenticatable, also make sure :database_authenticatable is removed

class User < ActiveRecord::Base
  devise :database_authenticatable, :confirmable, :code_authenticatable
end

Usage

Customize views

This plugin is included with basic views, to customize the views you need to run

rails generate devise_code_authenticatable:views

License

The gem is available as open source under the terms of the MIT License.