From ba192f12e381842c90df0fab2fcb1a23cae97fc4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 27 Jan 2017 20:28:46 +0100 Subject: Added optional two-factor authentication --- config/initializers/devise.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'config/initializers/devise.rb') diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 85ba1082b..5eba34aa5 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -1,6 +1,8 @@ -# Use this hook to configure devise mailer, warden hooks and so forth. -# Many of these configuration options can be set straight in your model. Devise.setup do |config| + config.warden do |manager| + manager.default_strategies(scope: :user).unshift :two_factor_authenticatable + end + # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render invalid all existing # confirmation, reset password and unlock tokens in the database. -- cgit