Epic: Member profiles and one login for the site and the neighborhood forum
Back to our planSummary
Residents get one account that does more. They keep their own details up to date (name, email, and later preferences) without asking an admin. They also use the same login for the site and for the neighborhood's community space, and the two stay in step, so nobody manages two logins.
Decided 2026-11-01: the owner meant the neighborhood forum (Discourse, discourse.sprechereast.org), not a Discord server (dropped). Discord is out of scope.
Summary of the owner's direction
Amine, 2026-11-01, Claude Code session, text: he wants account and profile management, letting people update their email and choose preferences; single sign-on that carries one login over to Discord, so both don't need separate management, plus a way to keep the two in sync; and for us to review what already exists and build on it, or bring part of it into our own codebase if it is open source. The official Payload tooling doesn't have all the features. Upcoming idea, not part of the current milestone: backlog, no milestone.
What already exists (don't redo it)
/accountshows name and email read-only and changes the password after checking the current one (#233,src/modules/accounts/cms/requireCurrentPassword.ts).- Deleting your own account is #310 (under #309). This epic counts on it.
- Social sign-in plumbing: PR #505 (#188) adds
/auth/<provider>routes onopenid-clientand the decision record0016-social-sign-in.md. The plugin comparison is on PR #261 (payload-oauth2,payload-auth,payload-authjs,payload-auth-plugin). A Discord provider reuses this. - Roles (#520,
docs/guidelines/security.md): new accounts areguest; only an admin makes aresident(#314). No sign-in or sync path may grantresident. - The forum is Discourse at https://discourse.sprechereast.org, opens in a new tab (footer link, #485).
docs/product/vision.mdsays it "stays independent of this site"; single sign-on changes that line, so update it in the same work. - No Discord server is mentioned anywhere in the repo, docs or vision.
Options found (short research, 2026-11-01)
| Need | What exists | What's left for us |
|---|---|---|
| Change email | Payload 3.91 sends a confirmation link only on create (create.js is the only operation calling sendVerificationEmail/setting _verified). Auth email docs, opens in a new tab | A confirm-the-new-address flow on our existing pieces. Avoid an email change that keeps the "verified" flag (CVE-2026-44584, opens in a new tab, a different product). |
| One login with the forum | DiscourseConnect, opens in a new tab is a core feature, opens in a new tab, free on our self-hosted forum. The site becomes the forum's login. | One route that checks the signed request (node:crypto, no new package) plus a sync job. |
| Payload OAuth plugins | Already compared on PR #261 and in record 0016. | Nothing new. |
Every option is free.
Decided by agents (recorded, not asked)
- The site is the source of truth for who is a resident (#314). Discord/forum only receive it.
- Every account a provider creates is a
guest(#520). - Identity is provider + its user id, never a matching email (record 0016).
- Store the minimum: the provider's user id only.
- Sync runs after the site change is saved, as a Payload job with retries (
src/platform/payload/jobRunners.ts, decision 0011). A failed sync never blocks the site change; a periodic check fixes drift. - Fail safe: when in doubt, the other side keeps fewer rights.
Sub-issues (in order)
| # | Sub-issue | Size | Blocked by |
|---|---|---|---|
| 1 | bug: a signed-in account can change its own email without confirming it (parent #309, high) | S | none |
| 2 | #554 Research: single sign-on and sync with the forum | M | none |
| 3 | Change your email from /account, confirmed by link to the new address | M | 1 |
| 4 | Edit your name on /account | S | none |
| 5 | Choose your preferences on /account | after question 2 | owner question 2 |
| A1 | Owner: turn on DiscourseConnect and give the server its secret (needs owner, free) | S | none |
| A2 | Log in to the forum with your site account | M | 2 |
| A3 | Keep the forum in step: name, email, residents group, deleted accounts | M | A2, 3, #314, #310 |
These become real sub-issues when they are planned.
Acceptance criteria (epic done when)
- Not done: A signed-in member changes their name and email from
/accountwithout an admin. A new email takes effect only after its link is opened, and the old address gets a heads-up. - Not done: No path changes an account's email without that confirmation (REST, GraphQL, Local API without
overrideAccess,/adminfor your own account); a test proves each. - Not done: Forum: a signed-in member opens the forum already logged in; name/email changes show after the next sync; residents are in the residents group, guests aren't; a deleted account is logged out.
- Not done: No sign-in or sync path makes anyone a
resident. - Not done: The preferences the owner chose work.
- Not done: Security, privacy and accessibility reviewed; e2e on a phone (expired links, wrong input, recovery); decision record,
security.md,data-model.md,project.mdandvision.mdupdated.
Risks
- Forum login depends on the site being up .
- Turning on DiscourseConnect replaces the forum's own login for everyone; existing members are matched by email.
- Email change is an account-takeover path if done wrong, hence sub-issue 1 first.
- Provider APIs change.
Owner questions (one at a time)
Discord or the forum?Answered 2026-11-01: the forum.- Which preferences first? (after 1)
- Everyone moves to the site's login on the forum, OK? (after 2)
Related
#309, #310, #188 and PR #505, #312, #314, #485, #501, #520.
Generated by Claude Code, opens in a new tab
Issues in this epic
#554
#559