Skip to content

Commit

Permalink
Reset session token after logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
cguess committed Dec 20, 2024
1 parent 083eebd commit 1403e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def finish_mfa_webauthn_validation
sign_in(user)

if session[:token]
session[:token] = nil
session.delete(:token)
render json: {
authentication_status: "success",
redirect: remote_token_path # The token is rotated when the page is visited
Expand Down

0 comments on commit 1403e62

Please sign in to comment.