Issue 283
tech-debt: Reset page clears the token on load, plus two small fixes from #277's review
Back to our planDone
authtech-debtpriority: low
Problem
Small leftovers from the review of #277:
- 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.
- The comment in
src/modules/accounts/cms/requireCurrentPassword.tssays forgot password doesn't runupdate. It does (without a password, so the hook isn't triggered). forgot-password/page.tsxandlogin/page.tsxstill hard-coderedirect('/account'), though #277 addedACCOUNT_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-passwordwith no token; the reset still works - Not done: The comment matches Payload 3.91's behavior
- Not done: No hard-coded
/accountredirects remain
Area
auth
Priority
Low
Generated by Claude Code, opens in a new tab