Browse Source

Overriding private methods is a bad time

pull/710/head
baarkerlounger 3 years ago
parent
commit
eb544fc6bc
  1. 2
      app/controllers/auth/passwords_controller.rb
  2. 2
      app/controllers/auth/two_factor_authentication_controller.rb

2
app/controllers/auth/passwords_controller.rb

@ -55,7 +55,7 @@ protected
return unless resource.respond_to?(:need_two_factor_authentication?) &&
resource.need_two_factor_authentication?(request)
warden.session(resource_class.name.underscore)[TwoFactorAuthentication::NEED_AUTHENTICATION] = true
warden.session(resource_class.name.underscore)[DeviseTwoFactorAuthentication::NEED_AUTHENTICATION] = true
end
def password_update_flash_message

2
app/controllers/auth/two_factor_authentication_controller.rb

@ -25,7 +25,7 @@ private
def after_two_factor_success_for(resource)
set_remember_two_factor_cookie(resource)
warden.session(resource_name)[TwoFactorAuthentication::NEED_AUTHENTICATION] = false
warden.session(resource_name)[DeviseTwoFactorAuthentication::NEED_AUTHENTICATION] = false
bypass_sign_in(resource, scope: resource_name)
resource.update!(second_factor_attempts_count: 0)

Loading…
Cancel
Save