From 9ce2edde3f9ffce031f58829e3099d32436789dc Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Thu, 3 Feb 2022 17:46:00 +0000 Subject: [PATCH] Return 422 on failed code --- .../devise/two_factor_authentication_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/devise/two_factor_authentication_controller.rb b/app/controllers/devise/two_factor_authentication_controller.rb index 0e7aed8..b3a9dcc 100644 --- a/app/controllers/devise/two_factor_authentication_controller.rb +++ b/app/controllers/devise/two_factor_authentication_controller.rb @@ -63,9 +63,9 @@ class Devise::TwoFactorAuthenticationController < DeviseController if resource.max_login_attempts? sign_out(resource) - render :max_login_attempts_reached + render :max_login_attempts_reached, status: :unprocessable_entity else - render :show + render :show, status: :unprocessable_entity end end