Skip to content

feat: update reset password flow to log out user on success - #868

Open
CasLubbers wants to merge 2 commits into
mainfrom
APL-2277
Open

CasLubbers wants to merge 2 commits into
mainfrom
APL-2277

Conversation

@CasLubbers

@CasLubbers CasLubbers commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Together with: linode/apl-api#1126

Signed-off-by: Cas Lubbers <clubbers@akamai.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Immediate full-page navigation discards the password-reset confirmation and login instruction before users can reliably read them; the message needs to persist across navigation or appear at the destination.

1 open issue
What changed in this PR

Updates the password-reset flow to log users out after a successful reset, preventing the browser from continuing with an old token.

Changes:

  • Redirects successful resets to /platform-logout instead of clearing and closing the modal.
  • Updates the success message to request a new login.
  • Adjusts tests to verify logout navigation on success, no navigation on failure, and a 400 rejection case.
File Description
src/​components/​modals/​ResetPasswordModal.tsx Adds logout navigation and revised confirmation text after a successful reset.
src/​components/​modals/​ResetPasswordModal.test.tsx Mocks navigation and updates success and rejection assertions.

Review effort: Balanced

Comment on lines +168 to +169
snack.success('Password reset successfully, please log in again')
window.location.assign('/platform-logout')
Copilot AI balanced review requested due to automatic review settings November 9, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The immediate full-page redirect discards the queued success notification, preventing users from reliably seeing the password-reset confirmation and login instruction.

1 open issue

Review effort: Balanced

This branch has not been deployed

No deployments
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.

3 participants