contracts 1.8.0: crosscode.identity-request/1 (import and people.* calls to Accounts)

Product -> Accounts requests at /api/accounts/v1/requests, signed with the
link secret: import.begin/batch/finish/abort for moving a product's users
in (EVENTS-3.0-PLAN §4), people.* for product admins (§8). sealLinkValue /
openLinkValue seal password hashes and TOTP secrets with a key derived
from the link secret; importIdsHash for the final check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 13:33:15 +02:00
co-authored by Claude Opus 5.5
parent ac017395df
commit 08fef930c1
24 changed files with 1585 additions and 10 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
# Cross Events 3.0.0 — signing in through Accounts
Phase **4** of [ROADMAP-v3.md](./ROADMAP-v3.md) (§3 "Moving Cross Events onto Accounts", §8, §9;
decisions 2, 14, 15, 17, 24, 38). Written 2026-11-19. **Not started; decisions below still to be
confirmed.** Moved before the Website on 2026-11-19 (decision 38), so this is the first product
decisions 2, 14, 15, 17, 24, 38). Written 2026-11-19. **Decisions confirmed 2026-11-19** (all as proposed); being built on
`feat/events-3.0`. Moved before the Website on 2026-11-19 (decision 38), so this is the first product
that really signs people in through [Accounts](./ACCOUNTS-1.0-PLAN.md).
**What 3.0.0 is:** Cross Events stops keeping passwords. Sign-in, sign-up, forgot password, 2FA,
@@ -52,7 +52,7 @@ connected before its Events can move.
12. [What changes in each repo](#11-what-changes-in-each-repo)
13. [Testing](#12-testing)
14. [Releasing and rolling it out](#13-releasing-and-rolling-it-out)
15. [Decisions to confirm](#decisions-to-confirm)
15. [Decisions](#decisions)
16. [Still open](#still-open)
---
@@ -418,9 +418,9 @@ only for a connected product:
login events, Events' audit log) → after 14 days the Undo window closes and the old secrets are
cleared. **The demo site first, then Hope Family Church**, then the rest.
## Decisions to confirm
## Decisions
Proposed; confirm with Joshua before building.
Confirmed by Joshua on 2026-11-19, all as proposed.
1. **`User.accountId` instead of rewriting `User.id`** (§2). Every imported person still gets
`sub = User.id`; the column handles guests, deleted people and emails already in Accounts
+1 -1
View File
@@ -32,7 +32,7 @@ every release).
| 1d | Agent 1.0.x + Hub 2.1.x (+ contracts 1.3.0) | **Released** 2026-11-17 (`agent@1.0.0`, `contracts@1.3.0`, Hub `v2.1.0`). **VM tested** end to end (AGENT-1.0-PLAN §13: joins, installs behind frp, scheduled / batch / missed updates, uninstall with export and purge, forged and replayed jobs). 2026-11-18: **`agent@1.0.1`** (the agent answers status on the central server itself) and Hub **`v2.1.1`** (adopt passes the church's address; Link takes the short name as a name). **Not rolled out**: use agent 1.0.1 and Hub 2.1.1 |
| 2 | Cross Events 2.4.0: protocol v2, Linked products, event feed, `packages/seo` (+ contracts 1.4.0, Hub 2.2.0) | **Released** 2026-11-18 (`events@2.4.0`, `contracts@1.4.0`, Hub `v2.2.0`, crosscode-site `v1.4.0`; [EVENTS-2.4-PLAN.md](./EVENTS-2.4-PLAN.md)). **Before any church gets it:** the Events e2e run on Postgres and the VM test (EVENTS-2.4-PLAN §8) |
| 3 | Accounts 1.0.0 (+ contracts 1.5.0, agent 1.1.0, Hub 2.3.0) | **Released** 2026-11-18 (`accounts@1.0.0`, `contracts@1.5.0`, `agent@1.1.0`, Hub `v2.3.0`, crosscode-site `v1.5.0`; [ACCOUNTS-1.0-PLAN.md](./ACCOUNTS-1.0-PLAN.md)). 37 backend and 8 Playwright tests pass without Postgres. **Before installing it for a church:** the VM test and a run on real Postgres; a Hub release source for `accounts@` tags |
| 4 | Cross Events 3.0.0: sign-in through Accounts, users migrated with their password hashes and 2FA | **Next.** Moved before the Website on 2026-11-19 (ROADMAP decision 38). Planned: [EVENTS-3.0-PLAN.md](./EVENTS-3.0-PLAN.md) (with contracts 1.8.0, Accounts 1.1.0, Hub 2.5.0); its decisions still to be confirmed |
| 4 | Cross Events 3.0.0: sign-in through Accounts, users migrated with their password hashes and 2FA | **Next.** Moved before the Website on 2026-11-19 (ROADMAP decision 38). Planned: [EVENTS-3.0-PLAN.md](./EVENTS-3.0-PLAN.md) (with contracts 1.8.0, Accounts 1.1.0, Hub 2.5.0); decisions confirmed 2026-11-19; being built on `feat/events-3.0` |
| 5–7 | Website 1.0.0 → App 1.0.0 → App 1.x | Not started |
## Next up
+6 -3
View File
@@ -183,8 +183,11 @@ touching anyone's account.
This is a breaking change, so it's a major version.
- A migration copies every Events user into Accounts **with their existing password hash**, 2FA
setting (including authenticator secrets and unused recovery codes), consent and notice acceptance, so nobody has to reset anything. The Events `User`
table keeps its id (now equal to the account `sub`), role, campus scope and product data.
setting (including authenticator secrets), consent and notice acceptance, so nobody has to reset anything. Recovery codes
can't move (Events keys them with its own secret), so people with 2FA get new ones at their first
sign-in through Accounts (EVENTS-3.0-PLAN decision 2). The Events `User` table keeps its id
(equal to the account `sub` for everyone moved; a new `accountId` column links guests and
existing accounts, decision 1), role, campus scope and product data.
- Sign-in, forgot password, 2FA, the news question and the notice re-acceptance move to Accounts.
The Events privacy centre links to Accounts for account-level items.
- Every place Events sends someone to sign in today (`/login?redirect=…`, `useRequireAuth`, the
@@ -621,7 +624,7 @@ Planned in [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md). In short:
| 1d | **Agent 1.0.0 + Hub 2.1.0** (contracts 1.3.0) | **Server agent** on every server (polls only, signed jobs, runs the `crosscode` script); Hub: Servers page with stats and alerts, server configuration, frp port list, New install with a choice of server, scheduled / emergency / batch updates with notice to the church, uninstall with an encrypted JSON export, emailed reports. [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md). **Released 2026-11-17** after the VM test; rollout in [ROLLOUT-1.0.md](./ROLLOUT-1.0.md) | Right after 1b (it runs the `crosscode` script), so every new church from then on is installed from the Hub. Can run alongside 1c |
| 2 | **Cross Events 2.4.0** | Reports `product: "events"` (protocol v2), **Linked products**, the event feed (publish + show events from siblings), `packages/seo` (§11) with canonical links for imported events. **Planned and built 2026-11-18:** [EVENTS-2.4-PLAN.md](./EVENTS-2.4-PLAN.md) (also needs contracts 1.4.0 and Hub 2.2.0, for a public key in the v2 heartbeat); not tagged yet | Small; ready for when the Website exists |
| 3 | **Accounts 1.0.0** | OIDC provider, sign-in, 2FA (email, WhatsApp, authenticator app), password reset, consent and notice, export / delete fan-out, admin, install script. [ACCOUNTS-1.0-PLAN.md](./ACCOUNTS-1.0-PLAN.md) (with contracts 1.5.0, `packages/auth-client`, Hub 2.3.0). **Released 2026-11-18** (`accounts@1.0.0`, 1.0.1 on 2026-11-19); the VM test and a run on real Postgres are still to do before a church gets it | Every later product signs in through it |
| 4 | **Cross Events 3.0.0** | Sign-in moves to Accounts; user migration keeping password hashes; migration guide. **Planned 2026-11-19:** [EVENTS-3.0-PLAN.md](./EVENTS-3.0-PLAN.md) (with contracts 1.8.0, Accounts 1.1.0, Hub 2.5.0; decisions to confirm) | Breaking change, so a major version. **Moved before the Website on 2026-11-19** (decision 38): Events is the product churches use today, so Accounts is proven on real users first, and the Website then starts with a church whose people already have accounts |
| 4 | **Cross Events 3.0.0** | Sign-in moves to Accounts; user migration keeping password hashes; migration guide. **Planned 2026-11-19:** [EVENTS-3.0-PLAN.md](./EVENTS-3.0-PLAN.md) (with contracts 1.8.0, Accounts 1.1.0, Hub 2.5.0; decisions confirmed 2026-11-19) | Breaking change, so a major version. **Moved before the Website on 2026-11-19** (decision 38): Events is the product churches use today, so Accounts is proven on real users first, and the Website then starts with a church whose people already have accounts |
| 5 | **Church Website 1.0.0** | Public site with the **four templates** (§6), admin, simple events + feed, SEO (§11), Hope Family Church as the first church, then a second test church on a different template to prove it repeats | More churches need a website than an app; it also covers the "website only" case. Built on Accounts from day one |
| 6 | **Church App 1.0.0** | Foundation (PWA, branding, Accounts), House of Prayer, announcements, devotionals, events (simple + feed) | Starts with shared users and the feed already in place |
| 7 | Church App 1.x | Reading plans, sermons, groups, pastoral care, serving, giving links, directory | After House of Prayer is in use |