Fix 2FA challenge and password challenge for non-database users (#11831)
* Fix 2FA challenge not appearing for non-database users Fix #11685 * Fix account deletion not working when using external login Fix #11691
This commit is contained in:
parent
1511638975
commit
c707ef49d9
7 changed files with 66 additions and 61 deletions
|
@ -71,10 +71,13 @@ end
|
|||
|
||||
Devise.setup do |config|
|
||||
config.warden do |manager|
|
||||
manager.default_strategies(scope: :user).unshift :database_authenticatable
|
||||
manager.default_strategies(scope: :user).unshift :ldap_authenticatable if Devise.ldap_authentication
|
||||
manager.default_strategies(scope: :user).unshift :pam_authenticatable if Devise.pam_authentication
|
||||
manager.default_strategies(scope: :user).unshift :two_factor_authenticatable
|
||||
manager.default_strategies(scope: :user).unshift :two_factor_backupable
|
||||
|
||||
# We handle 2FA in our own sessions controller so this gets in the way
|
||||
manager.default_strategies(scope: :user).delete :two_factor_backupable
|
||||
manager.default_strategies(scope: :user).delete :two_factor_authenticatable
|
||||
end
|
||||
|
||||
# The secret key used by Devise. Devise uses this key to generate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue