From eb544fc6bc7e0200d16242d67a8f1cfc74e3bca4 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 5 Jul 2022 12:02:46 +0100 Subject: [PATCH] Overriding private methods is a bad time --- app/controllers/auth/passwords_controller.rb | 2 +- app/controllers/auth/two_factor_authentication_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/auth/passwords_controller.rb b/app/controllers/auth/passwords_controller.rb index e6b1f3a49..bd4b119cf 100644 --- a/app/controllers/auth/passwords_controller.rb +++ b/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 diff --git a/app/controllers/auth/two_factor_authentication_controller.rb b/app/controllers/auth/two_factor_authentication_controller.rb index 81225496d..692c8baac 100644 --- a/app/controllers/auth/two_factor_authentication_controller.rb +++ b/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)