summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-27 16:23:33 -0700
committerRobert Speicher <rspeicher@gmail.com>2015-05-09 17:31:07 -0400
commit7302395142dc93a45239c993b69958ca4a757c92 (patch)
tree17dfc5014de431462f05c13bec35f14b5b90550e /config
parentfe75411df8d8ed41e89cfcae73d1ea34b8b339b9 (diff)
downloadgitlab-ce-7302395142dc93a45239c993b69958ca4a757c92.tar.gz
Init 2 factor authentication for user model
Diffstat (limited to 'config')
-rw-r--r--config/initializers/devise.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 8f8c4169740..956bb048b2a 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -1,6 +1,10 @@
# Use this hook to configure devise mailer, warden hooks and so forth. The first
# four configuration values can also be set straight in your models.
Devise.setup do |config|
+ config.warden do |manager|
+ manager.default_strategies(:scope => :user).unshift :two_factor_authenticatable
+ end
+
# ==> Mailer Configuration
# Configure the class responsible to send e-mails.
config.mailer = "DeviseMailer"