Browse Source

Access config via Devise instead user.class

master
Benjamin Wols 8 years ago
parent
commit
d1e1a663cd
  1. 2
      lib/two_factor_authentication/hooks/two_factor_authenticatable.rb

2
lib/two_factor_authentication/hooks/two_factor_authenticatable.rb

@ -13,5 +13,5 @@ Warden::Manager.after_authentication do |user, auth, options|
end end
Warden::Manager.before_logout do |user, auth, _options| Warden::Manager.before_logout do |user, auth, _options|
auth.cookies.delete TwoFactorAuthentication::REMEMBER_TFA_COOKIE_NAME if user.class.delete_cookie_on_logout auth.cookies.delete TwoFactorAuthentication::REMEMBER_TFA_COOKIE_NAME if Devise.delete_cookie_on_logout
end end

Loading…
Cancel
Save