IMPORTANT: This is very alpha-release. Stable release (0.1) is coming.
Ability to additional authentication by SMS code or IP for Devise gem.
rails generate devise_login_smsable <YOUR_DEVISE_MODEL>
rails generate devise_login_smsable:config
Look into config/initializers/devise_login_smsable.rb and change the phone_column_name if needed, then run migrations:
Routes: Add this line to config/routes.rb inside routes block:
Add new module to devise declaration in your model (named as :login_smsable), so your model should look like:
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :login_smsable
Building your own gates
Look into this two files to build same gates using other services:
More info and instructions will come.
Known bugs and issues
- Rails::Engine not loads config/routes.rb
- Add possibility to resend sms_code (now user should log-out and log-in again to receive new sms_code when current one is expired)
© Chvertkin Maxim. Protected by MIT-LICENSE.