diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-31 22:42:17 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-09 17:31:37 -0400 |
commit | 802fcd051fcbc9be99230bddb13c4a7cb8067741 (patch) | |
tree | 9cadf6f58acc76b0a882980d7c3909ddeeac429c /config | |
parent | b66be0a2b3351dd10d96e3d0d0576f6d1444f342 (diff) | |
download | gitlab-ce-802fcd051fcbc9be99230bddb13c4a7cb8067741.tar.gz |
Add support for backup codes
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/devise.rb | 1 | ||||
-rw-r--r-- | config/routes.rb | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index c003a7102a5..091548348b1 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -3,6 +3,7 @@ Devise.setup do |config| config.warden do |manager| manager.default_strategies(scope: :user).unshift :two_factor_authenticatable + manager.default_strategies(scope: :user).unshift :two_factor_backupable end # ==> Mailer Configuration diff --git a/config/routes.rb b/config/routes.rb index a76ababb3d9..bcd68ad6ae2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -226,7 +226,11 @@ Gitlab::Application.routes.draw do resources :keys resources :emails, only: [:index, :create, :destroy] resource :avatar, only: [:destroy] - resource :two_factor_auth, only: [:new, :create, :destroy] + resource :two_factor_auth, only: [:new, :create, :destroy] do + member do + get :codes + end + end end end |