diff --git a/app/controllers/auth/two_factor_authentication_controller.rb b/app/controllers/auth/two_factor_authentication_controller.rb index ee21eacf1..81225496d 100644 --- a/app/controllers/auth/two_factor_authentication_controller.rb +++ b/app/controllers/auth/two_factor_authentication_controller.rb @@ -27,7 +27,7 @@ private set_remember_two_factor_cookie(resource) warden.session(resource_name)[TwoFactorAuthentication::NEED_AUTHENTICATION] = false bypass_sign_in(resource, scope: resource_name) - resource.update_attribute(:second_factor_attempts_count, 0) + resource.update!(second_factor_attempts_count: 0) redirect_to after_two_factor_success_path_for(resource) end