We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c68d9ea commit 446482dCopy full SHA for 446482d
lib/two_factor_authentication/controllers/helpers.rb
@@ -27,6 +27,8 @@ def handle_failed_second_factor(scope)
27
elsif request.format.json?
28
session["#{scope}_return_to"] = root_path(format: :html)
29
render json: { redirect_to: two_factor_authentication_path_for(scope) }, status: :unauthorized
30
+ else
31
+ head :unauthorized
32
end
33
else
34
head :unauthorized
0 commit comments