Issue 269
enhancement: Sign in with Payload's helper and add forgot/reset password pages on Payload's built-ins
Back to our planDone
enhancementauthpriority: high
Problem
Signing in copies Payload's own helper: startSession in src/modules/accounts/data/session.ts and data/cookies.ts do what login from @payloadcms/next/auth does (server functions, opens in a new tab). Residents also have no page to reset a forgotten password; only /admin/reset exists.
Proposed fix
- Sign in through
@payloadcms/next/auth'slogin. KeependSession(Payload 3.91'slogoutcan delete the admin'spayload-themecookie), the change-password flow and therequireCurrentPasswordhook (site policy). - Add a "Forgot your password?" page and a reset page as thin forms over Payload's
forgotPasswordandresetPasswordoperations (token, expiry and resend limit are built in).
Findings (#262): native covers both; no plugin or custom tokens needed.
Blocked by #266: if the owner picks Better Auth, sign-in and reset move there instead.
Acceptance criteria
- Not done:
startSessionanddata/cookies.tsare replaced by Payload's helper - Not done: A resident can request a reset link from the sign-in page and set a new password
- Not done: Error messages stay generic (no account enumeration)
Area
auth
Priority
High
Generated by Claude Code, opens in a new tab