-
- Downloads
Add recovery code support for two-factor auth (#1773)
* Add recovery code support for two-factor auth When users enable two-factor auth, the app now generates ten single-use recovery codes. Users are encouraged to print the codes and store them in a safe place. The two-factor prompt during login now accepts both OTP codes and recovery codes. The two-factor settings UI allows users to regenerated lost recovery codes. Users who have set up two-factor auth prior to this feature being added can use it to generate recovery codes for the first time. Fixes #563 and fixes #987 * Set OTP_SECRET in test enviroment * add missing .html to view file names
Showing
- .env.test 1 addition, 0 deletions.env.test
- app/assets/stylesheets/lists.scss 9 additions, 0 deletionsapp/assets/stylesheets/lists.scss
- app/controllers/auth/sessions_controller.rb 2 additions, 1 deletionapp/controllers/auth/sessions_controller.rb
- app/controllers/settings/two_factor_auths_controller.rb 8 additions, 2 deletionsapp/controllers/settings/two_factor_auths_controller.rb
- app/models/user.rb 3 additions, 1 deletionapp/models/user.rb
- app/views/auth/sessions/two_factor.html.haml 3 additions, 1 deletionapp/views/auth/sessions/two_factor.html.haml
- app/views/settings/two_factor_auths/_recovery_codes.html.haml 7 additions, 0 deletions...views/settings/two_factor_auths/_recovery_codes.html.haml
- app/views/settings/two_factor_auths/create.html.haml 4 additions, 0 deletionsapp/views/settings/two_factor_auths/create.html.haml
- app/views/settings/two_factor_auths/recovery_codes.html.haml 4 additions, 0 deletionsapp/views/settings/two_factor_auths/recovery_codes.html.haml
- app/views/settings/two_factor_auths/show.html.haml 5 additions, 0 deletionsapp/views/settings/two_factor_auths/show.html.haml
- config/initializers/devise.rb 1 addition, 0 deletionsconfig/initializers/devise.rb
- config/locales/en.yml 5 additions, 0 deletionsconfig/locales/en.yml
- config/locales/simple_form.en.yml 2 additions, 0 deletionsconfig/locales/simple_form.en.yml
- config/routes.rb 1 addition, 0 deletionsconfig/routes.rb
- db/migrate/20170414080609_add_devise_two_factor_backupable_to_users.rb 5 additions, 0 deletions...170414080609_add_devise_two_factor_backupable_to_users.rb
- db/schema.rb 2 additions, 1 deletiondb/schema.rb
- spec/controllers/auth/sessions_controller_spec.rb 84 additions, 9 deletionsspec/controllers/auth/sessions_controller_spec.rb
- spec/models/user_spec.rb 3 additions, 0 deletionsspec/models/user_spec.rb
Loading
Please register or sign in to comment