From 1fa214d18d311e019a343f836f2c591c0fa3d308 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 4 Feb 2022 10:16:24 +0000 Subject: [PATCH] Return 422 for turbo on max login attempts reached --- app/controllers/devise/two_factor_authentication_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/devise/two_factor_authentication_controller.rb b/app/controllers/devise/two_factor_authentication_controller.rb index 0f16a2e..9430d6a 100644 --- a/app/controllers/devise/two_factor_authentication_controller.rb +++ b/app/controllers/devise/two_factor_authentication_controller.rb @@ -78,7 +78,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController @limit = resource.max_login_attempts if resource.max_login_attempts? sign_out(resource) - render :max_login_attempts_reached and return + render :max_login_attempts_reached, status: :unprocessable_entity and return end end