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
parent
67ad84b7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Affichage de
- .env.test 1 ajout, 0 suppression.env.test
- app/assets/stylesheets/lists.scss 9 ajouts, 0 suppressionapp/assets/stylesheets/lists.scss
- app/controllers/auth/sessions_controller.rb 2 ajouts, 1 suppressionapp/controllers/auth/sessions_controller.rb
- app/controllers/settings/two_factor_auths_controller.rb 8 ajouts, 2 suppressionsapp/controllers/settings/two_factor_auths_controller.rb
- app/models/user.rb 3 ajouts, 1 suppressionapp/models/user.rb
- app/views/auth/sessions/two_factor.html.haml 3 ajouts, 1 suppressionapp/views/auth/sessions/two_factor.html.haml
- app/views/settings/two_factor_auths/_recovery_codes.html.haml 7 ajouts, 0 suppression...views/settings/two_factor_auths/_recovery_codes.html.haml
- app/views/settings/two_factor_auths/create.html.haml 4 ajouts, 0 suppressionapp/views/settings/two_factor_auths/create.html.haml
- app/views/settings/two_factor_auths/recovery_codes.html.haml 4 ajouts, 0 suppressionapp/views/settings/two_factor_auths/recovery_codes.html.haml
- app/views/settings/two_factor_auths/show.html.haml 5 ajouts, 0 suppressionapp/views/settings/two_factor_auths/show.html.haml
- config/initializers/devise.rb 1 ajout, 0 suppressionconfig/initializers/devise.rb
- config/locales/en.yml 5 ajouts, 0 suppressionconfig/locales/en.yml
- config/locales/simple_form.en.yml 2 ajouts, 0 suppressionconfig/locales/simple_form.en.yml
- config/routes.rb 1 ajout, 0 suppressionconfig/routes.rb
- db/migrate/20170414080609_add_devise_two_factor_backupable_to_users.rb 5 ajouts, 0 suppression...170414080609_add_devise_two_factor_backupable_to_users.rb
- db/schema.rb 2 ajouts, 1 suppressiondb/schema.rb
- spec/controllers/auth/sessions_controller_spec.rb 84 ajouts, 9 suppressionsspec/controllers/auth/sessions_controller_spec.rb
- spec/models/user_spec.rb 3 ajouts, 0 suppressionspec/models/user_spec.rb
Veuillez vous inscrire ou vous se connecter pour commenter