Skip to content

fix(security): revoke tokens and invalidate sessions on password change#117

Open
mulldug wants to merge 1 commit intomainfrom
fix/password_change_revoke_tokens
Open

fix(security): revoke tokens and invalidate sessions on password change#117
mulldug wants to merge 1 commit intomainfrom
fix/password_change_revoke_tokens

Conversation

@mulldug
Copy link
Collaborator

@mulldug mulldug commented Mar 9, 2026

  • Introduce RevokeUserGrants job (replaces RevokeUserGrantsOnExplicitLogout) with an optional client_id and a reason parameter; remove the guard clause that silently prevented all-client revocation.
  • Wire RevokeUserGrants to UserPasswordResetSuccessful so all OAuth2 tokens are revoked whenever a password is reset or changed.
  • Rotate remember_token in User::setPassword() to invalidate remember-me cookies on other devices.
  • Regenerate the session in UserApiController::updateMe() after a password change to protect against session fixation.
  • Add DELETE /admin/api/v1/users/me/tokens endpoint with a corresponding "Sign Out All Other Devices" button on the profile page.
  • Add PasswordChangeRevokeTokenTest covering all eight scenarios from the security specification.

  - Introduce RevokeUserGrants job (replaces RevokeUserGrantsOnExplicitLogout)
    with an optional client_id and a reason parameter; remove the guard
    clause that silently prevented all-client revocation.
  - Wire RevokeUserGrants to UserPasswordResetSuccessful so all OAuth2
    tokens are revoked whenever a password is reset or changed.
  - Rotate remember_token in User::setPassword() to invalidate remember-me
    cookies on other devices.
  - Regenerate the session in UserApiController::updateMe() after a
    password change to protect against session fixation.
  - Add DELETE /admin/api/v1/users/me/tokens endpoint with a corresponding
    "Sign Out All Other Devices" button on the profile page.
  - Add PasswordChangeRevokeTokenTest covering all eight scenarios from
    the security specification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant