Fix log out from user menu not working on Safari (#31402)
This commit is contained in:
parent
2b1670da48
commit
c3e1d86d58
5 changed files with 102 additions and 34 deletions
|
@ -187,4 +187,15 @@ class Auth::SessionsController < Devise::SessionsController
|
|||
def second_factor_attempts_key(user)
|
||||
"2fa_auth_attempts:#{user.id}:#{Time.now.utc.hour}"
|
||||
end
|
||||
|
||||
def respond_to_on_destroy
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
render json: {
|
||||
redirect_to: after_sign_out_path_for(resource_name),
|
||||
}, status: 200
|
||||
end
|
||||
format.all { super }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue