trails/docs
Ullrich Schäfer 7e22f1260b
Add unify-auth-completion architecture artifacts
Extract the post-verify orchestration shared across passkey
register-finish, passkey login-finish, magic-link verify-code, and
magic-link click-through into a single completeAuth function. Two
ADRs record the decision:

- ADR-0004: centralize web auth completion (record terms + create
  session + redirect) in apps/journal/app/lib/auth/completion.ts.
- ADR-0005: explicitly no AuthMethod polymorphism. Passkey + magic-
  link is the entire identity surface; OAuth2/PKCE is session
  transport, not a peer method. Recorded as a negative decision so
  future architecture passes don't re-suggest extracting the
  interface.

CONTEXT.md gains an Authentication section covering completeAuth, the
two methods, the OAuth2-as-transport distinction, and where the Terms
gate enforcement lives (root loader for web, requireApiUser for API
per the just-merged mobile-terms-gate).

OpenSpec change unify-auth-completion captures the proposal, design
(5 decisions including the negative-scope choices), spec delta on
authentication-methods, and 14 tasks. Implementation follows on this
branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 02:18:06 +02:00
..
adr Add unify-auth-completion architecture artifacts 2026-05-08 02:18:06 +02:00
conversations Move conversation log into docs/conversations/ 2026-03-22 12:00:45 +01:00
ideas Park mobile-activity-recording + mobile-nearby-sync under docs/ideas 2026-04-19 08:23:44 +02:00
legal-archive Add visibility disclosure to the binding German privacy text 2026-04-19 09:14:15 +02:00
architecture.md BRouter host observability + docs 2026-04-23 23:10:45 +02:00
demo-persona.md Apply configurable-demo-persona: per-instance demo identity + voice 2026-04-19 10:30:32 +02:00
deployment.md BRouter host observability + docs 2026-04-23 23:10:45 +02:00
information-architecture.md Refresh IA doc — all six streams shipped on 2026-04-26 2026-04-26 10:03:05 +02:00
old-trails-analysis.md Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
philosophy.md Add project philosophy document 2026-03-22 12:00:08 +01:00
server-hardening.md Add transactional emails (SMTP) and planner features (no-go areas, notes, crash recovery) 2026-03-26 01:00:42 +01:00
tooling.md Add CLAUDE.md, README, and development tooling docs 2026-03-22 12:06:51 +01:00