Skip to content
SprecherEast
Issue 553

Epic: Member profiles and one login for the site and the neighborhood forum

Back to our plan
Open
enhancementfrontendauthuxpriority: medium

Summary

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)

  • /account shows 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 on openid-client and the decision record 0016-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 are guest; only an admin makes a resident (#314). No sign-in or sync path may grant resident.
  • The forum is Discourse at https://discourse.sprechereast.org, opens in a new tab (footer link, #485). docs/product/vision.md says 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)

NeedWhat existsWhat's left for us
Change emailPayload 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 tabA 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 forumDiscourseConnect, 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 pluginsAlready 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-issueSizeBlocked by
1bug: a signed-in account can change its own email without confirming it (parent #309, high)Snone
2#554 Research: single sign-on and sync with the forumMnone
3Change your email from /account, confirmed by link to the new addressM1
4Edit your name on /accountSnone
5Choose your preferences on /accountafter question 2owner question 2
A1Owner: turn on DiscourseConnect and give the server its secret (needs owner, free)Snone
A2Log in to the forum with your site accountM2
A3Keep the forum in step: name, email, residents group, deleted accountsMA2, 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 /account without 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, /admin for 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.md and vision.md updated.

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)

  1. Discord or the forum? Answered 2026-11-01: the forum.
  2. Which preferences first? (after 1)
  3. 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

See it on GitHub, opens in a new tab