Sign the browser out when its new session is refused after a password change

If the password changes again between this browser's change and its new session, that session is refused, and the browser is sent to sign in instead of an error.

(cherry picked from commit a476cbfa24)
This commit is contained in:
Jeremy Daer authored and Jeremy Daer committed 2026-10-20 20:45:36 -07:00
1 parent 09402c7752
commit 9ca680de02
2 files changed
+13

No files matched your search

@@ -18,6 +18,9 @@ class Users::ProfilesController < ApplicationController
else
redirect_to user_profile_url, alert: update_alert
end
rescue ActiveRecord::RecordInvalid
# The password changed again before this browser's new session could start, and that change signed it out.
redirect_to new_session_url
end
private