A church moved sign-in to Accounts without email set up there: codes and password links couldn't be sent, sign-in failed with a 500, nobody could get in. - contracts 1.9.0: messaging.status/test/set (SMTP, WAWP; secrets sealed); people.ensure answers emailSent. - Accounts 1.2.0: SendError instead of a 500; WhatsApp codes fall back to email; forgot password says email isn't set up; setup only offers methods that work; messaging.* (test, save only what worked); test WhatsApp in admin; WAWP from .env. - Events 3.1.0: Settings -> Sign-in shows what Accounts can send and copies this site's SMTP/WAWP into it (secrets stay on the server), test then save; Move disabled and refused (EMAIL_NOT_READY) without email. Tests: Accounts 54, contracts 218, Events 774, test:accounts 16 (also on Postgres). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
65 lines
3.9 KiB
Markdown
65 lines
3.9 KiB
Markdown
# Moving to Cross Events 3.0
|
|
|
|
Cross Events 3.0 can sign people in with the **church's account** (Accounts), the one they'll use
|
|
for the church website and app too. It's a major version because it needs Accounts 1.1.0 or later
|
|
next to it. **Updating to 3.0 changes nothing for anyone**: people keep signing in with their Cross
|
|
Events password until an admin moves sign-in (step 4). The plan behind it is
|
|
[docs/EVENTS-3.0-PLAN.md](../../docs/EVENTS-3.0-PLAN.md).
|
|
|
|
## For whoever runs the server
|
|
|
|
1. **Accounts first.** The church needs Accounts 1.1.0 or later on the same server: in the Hub,
|
|
New install → Accounts for this church (an `add-product` job), or update its Accounts. The Hub
|
|
won't offer the Events 3.0 update before that (`requires accounts 1.1.0`), and `crosscode deploy`
|
|
refuses it too.
|
|
2. **Connect them.** In Cross Events, Site settings → Linked products → Accounts → **Connect**. This
|
|
also registers Events as a sign-in client of Accounts; nothing else is typed in.
|
|
3. **Update Events to 3.0** as usual (scheduled update from the Hub). There's one migration
|
|
(`User.accountId`, `AccountsSignIn`, six audit actions) and no new `.env` variable.
|
|
4. **Move sign-in** when the church is ready (below).
|
|
|
|
## For the church's admin: moving sign-in
|
|
|
|
Site settings → **Sign-in**:
|
|
|
|
1. **Set up the church account's email** (Email and WhatsApp for the church's sign-in, on the same
|
|
page, from 3.1.0). Accounts sends sign-in codes and password links itself, so without email there
|
|
nobody could sign in after the move; Move stays disabled until it works. The page copies this
|
|
site's email settings (leave the password blank to use this site's), **Send a test email**, check
|
|
it arrived, then **Save in Accounts**. WhatsApp the same way, if you use it.
|
|
2. **Check the move.** Nothing changes. It lists how many people move, who already has a church
|
|
account (they're linked to it and keep that account's password), anyone who can't move and why,
|
|
and the guests and deleted people who stay in Cross Events only.
|
|
3. Tick which Cross Events admins should also be **Accounts admins** (they can manage everyone's
|
|
sign-in). By default every admin is ticked.
|
|
4. **Move sign-in to Accounts** at a quiet time (not the evening before a big event's registration
|
|
closes). It takes about a minute. People already signed in stay signed in.
|
|
|
|
What people notice afterwards:
|
|
|
|
- "Sign in" opens the church's sign-in page (with the church's name and colours) and comes back to
|
|
the page they were on.
|
|
- **Same password, same authenticator app.** People with two-step sign-in get 10 new recovery codes
|
|
after their first sign-in (the old ones can't move); they should save them.
|
|
- Supervisors and admins still need two-step sign-in; Accounts asks them to set it up if they don't
|
|
have it.
|
|
- Password, two-step sign-in, news choices, "download my data" and deleting an account are on the
|
|
church account (Profile and Privacy link there).
|
|
|
|
**Undo** (same page) goes back to Cross Events' own sign-in for 14 days. People then sign in with
|
|
the password they had at the move; anything changed in Accounts since (a new password, two-step
|
|
sign-in set up) doesn't come back. After 14 days Cross Events removes the old passwords and Undo
|
|
goes away.
|
|
|
|
## For integrations
|
|
|
|
- `POST /api/v2/auth/login`, `…/login/code`, `…/signup`, `…/password/forgot`, `…/password/reset`,
|
|
`…/activate`, `/me/two-factor/*`, `/me/verify-password` and `/me/close` answer **`409`** with
|
|
`{ "error": { "code": "SIGN_IN_MOVED", "signInUrl": "/api/auth/signin" } }` once sign-in has moved.
|
|
A script that signed in with a password needs another way in (ask Cross Code).
|
|
- `GET /api/v2/auth/mode` says `local` or `accounts`.
|
|
- Tokens are the same as before (`Authorization: Bearer …`, 30 days, ended by signing out). A token
|
|
from a sign-in through Accounts also carries `asi` and `mfa`.
|
|
- `PATCH /api/v2/me` ignores `name`, `email` and `phone` (they're changed in Accounts) and refuses a
|
|
password.
|