Skip to content
SprecherEast
Issue 283

tech-debt: Reset page clears the token on load, plus two small fixes from #277's review

Back to our plan
Done
authtech-debtpriority: low

Problem

Small leftovers from the review of #277:

  1. The reset page keeps the token in the address bar until the form is submitted, so it can stay in browser history. The page already has the token, so it can clear the address bar as soon as it loads.
  2. The comment in src/modules/accounts/cms/requireCurrentPassword.ts says forgot password doesn't run update. It does (without a password, so the hook isn't triggered).
  3. forgot-password/page.tsx and login/page.tsx still hard-code redirect('/account'), though #277 added ACCOUNT_PATH.

Proposed fix

Clear the token from the URL on load (keeping it in component state), correct the comment, and use ACCOUNT_PATH.

Acceptance criteria

  • Not done: After the reset page loads, the address bar shows /reset-password with no token; the reset still works
  • Not done: The comment matches Payload 3.91's behavior
  • Not done: No hard-coded /account redirects remain

Area

auth

Priority

Low


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab