- contracts 1.8.0 / Accounts 1.1.0: import.finish lists the subs the product relies on; Accounts checks each is held, not deleted and known to it (the count+hash failed a second move after Undo once someone had joined through Accounts). - Events: connects to the church's Accounts once the Hub lists it; moveNewPeople (demo data, people added after the move); set-demo moves demo people; e2e/sign-in-accounts.spec.ts with Accounts in memory and an e2e-only /api rewrite. test:accounts 14/14; Jest auto-connect tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
69 lines
4.2 KiB
Markdown
69 lines
4.2 KiB
Markdown
# Changelog — Accounts
|
|
|
|
## [1.1.0] - unreleased
|
|
|
|
For Cross Events 3.0 (docs/EVENTS-3.0-PLAN.md §8), with contracts 1.8.0.
|
|
|
|
### Added
|
|
|
|
- **`POST /api/accounts/v1/requests`** (`crosscode.identity-request/1`), signed with the link's
|
|
secret: what a linked product asks of Accounts. A request id seen before gets its first answer.
|
|
- **Moving a product's users in** (`import.begin` / `batch` / `finish` / `abort`, Cross Events
|
|
only): each person keeps their Events id as their `sub`, their bcrypt or Argon2id password hash,
|
|
2FA method and authenticator secret (sealed with the link's secret on the way, encrypted with
|
|
Accounts' key at rest), lockout, news consent and its history, notice acceptance, last sign-in
|
|
and status; ticked Events admins become Accounts admins. An email that already has an account is
|
|
**linked** (that account and its password stay). A check (`check: true`) writes nothing.
|
|
`import.finish` checks every sub the product relies on is an account here, not deleted, and
|
|
known to that product, and lists the ones that aren't. Events' privacy notice versions are
|
|
taken when Accounts has published none; an empty church name and colour are filled from Events.
|
|
- **New recovery codes after the first sign-in** for people moved in with 2FA (their Events codes
|
|
can't move): shown once after the second step, whatever step comes next.
|
|
- **`people.*`**: `ensure` (find or make an account; a new one gets a "choose your password" email
|
|
whose link ends on the product), `update`, `resetTwoFactor`, `unlock`, `setActive`, `newsOff`.
|
|
Only for people the product knows (moved in, added, or signed in through it), never an Accounts
|
|
admin's 2FA or status, and audited with the product and the product admin's `sub`.
|
|
- **`screen=signup`** on an authorization request opens the sign-in page on "Create an account"
|
|
(`startSignIn(…, { signUp: true })` in `@crosscode/auth-client`).
|
|
|
|
### Changed
|
|
|
|
- Setting a password from an emailed link also confirms the email address.
|
|
|
|
## [1.0.1] - 2026-11-19
|
|
|
|
### Fixed
|
|
|
|
- **`TRUST_PROXY=loopback` turned proxy trust off.** Accounts read `TRUST_PROXY` as true/false, so
|
|
anything but `true`, including the `loopback` the Hub suggests behind frp, meant off: rate
|
|
limiting and the audit log saw every visitor as `127.0.0.1`, and oidc-provider ignored
|
|
`X-Forwarded-Proto`. It's now read as Events reads it: `loopback`, a hop count, proxy IP
|
|
addresses/CIDRs separated by commas, or `true`/`false` in any case (`true` is one hop, as
|
|
before). Unset is still one hop in production.
|
|
|
|
## [1.0.0] - 2026-11-18
|
|
|
|
The first release (docs/ACCOUNTS-1.0-PLAN.md), with Hub 2.3.0 and agent 1.1.0. Released before the
|
|
VM test and a run on real Postgres; do both before installing it for a church.
|
|
|
|
### Added
|
|
|
|
- OpenID Connect provider (oidc-provider 9.13.3): authorization code with PKCE (S256) required,
|
|
ES256 keys made on first start, `crosscode.identity/1` claims in the ID token, no refresh tokens,
|
|
RP-initiated logout and OIDC Back-Channel Logout. Clients are the linked products (Connect,
|
|
`crosscode.link/1`), with exact redirect addresses and the client secret derived from the link.
|
|
- Sign-in steps that all return to the product and page they started from: password, sign-up with
|
|
an emailed code, two-step sign-in (authenticator app, email, WhatsApp, recovery codes) and setting
|
|
it up when a product asks (`acr_values=mfa`) or for admins, privacy notice (asked again when a new
|
|
version is published), news question, forgot / reset password.
|
|
- The account page: details, email change by link, password, two-step sign-in, recovery codes,
|
|
news consent, recent activity, sign out everywhere, download my data (bundled from every linked
|
|
product), delete my account (approved by an admin, then every product, retried when a product
|
|
says "not yet").
|
|
- Admin: people (access-logged), deletion requests, the church profile (`crosscode.church/1`,
|
|
served at `/api/church/v1`, `church.changed` to products), linked products, sign-in settings,
|
|
email and WhatsApp, privacy notice versions, licence, audit log. First-run `/setup`.
|
|
- Hub protocol v2 (product `accounts`, `CCA-` licence; never read-only), registering by itself from
|
|
`HUB_LICENCE_KEY`.
|
|
- `crosscode` hooks (`scripts/products/accounts.sh`), `env.template.json`, PM2 example.
|