Skip to content

sunki/devise_login_smsable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMPORTANT: This is very alpha-release. Stable release (0.1) is coming.

DeviseLoginSmsable

Ability to additional authentication by SMS code or IP for Devise gem.

Install notes

Migration:

rails generate devise_login_smsable <YOUR_DEVISE_MODEL>

Config initializer:

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:

rake db:migrate

Routes: Add this line to config/routes.rb inside routes block:

login_smsable

Model:

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:

  • lib/devise_login_smsable/abstract_gate.rb
  • lib/devise_login_smsable/smsru.rb

More info and instructions will come.

Known bugs and issues

  • Rails::Engine not loads config/routes.rb

TODO

  • 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.

About

Devise additional authentication by SMS code or IP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages