Skip to content
SprecherEast
Issue 554

Research: single sign-on and sync between the site and the forum (or Discord)

Back to our plan
Open
documentationauthpriority: medium

Summary

Short research before building the second half of #553: how members use their one Sprecher East login on the neighborhood forum (or Discord), and how the two stay in step. It picks the approach, writes it in a decision record and confirms the sub-issues. Social sign-in libraries were already compared (PR #261, record 0016-social-sign-in in PR #505), so that isn't repeated.

Decided 2026-11-01: the forum (Discourse) only; Discord is out of scope (#553).

Starting points

What to do (native-first ladder: one line per step, with link and reason)

  1. Native: what the forum offers out of the box; what Payload and Next.js give (jobs, hooks, routes, node:crypto).
  2. Official plugins: Discourse's own (DiscourseConnect; the OpenID Connect plugin as the alternative); Payload has none (record 0016).
  3. Established open source: e.g. an npm DiscourseConnect helper; discord.js vs plain fetch. Check against the package rules in docs/guidelines/security.md. Prefer no new package under ~50 lines with node:crypto.
  4. Our code: only what's left, in the owning module.

Then answer, for the chosen branch:

  • Forum: settings the owner turns on; fields we send (nonce, email, external_id, name, require_activation, groups); how the request is signed and checked, return_sso_url limited to the forum; which admin API calls push changes and the key's scope; what happens to existing forum accounts (matched by email); what members see when the site is down.
  • Sync design: (site is source of truth; job after save; retries; periodic check; unlink, lost residency, account deletion #310); privacy (every field stored or sent, and why); secret names for .env.local via an infra issue; confirm it's free.

Output

  • A decision record (Status: Proposed) in a docs-only PR, using the next free number (main has 0016; PR #505 also adds a 0016).
  • A comment here with the ladder lines, and #553's sub-issue sizes/blockers confirmed or corrected (nothing bigger than L).
  • Any genuine product trade-off goes to the owner as one plain question with a recommendation.

Acceptance criteria

  • Not done: Each ladder step is answered with a link and a reason.
  • Not done: A clear recommendation for login and sync, with failure behavior and every stored or sent field listed.
  • Not done: The decision record PR is open and #553's table matches.
  • Not done: No product code changes.

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab