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 4ac4dca commit 083eebd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def finish_mfa_webauthn_validation
sign_in(user)

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

0 comments on commit 083eebd

Please sign in to comment.