Accounts: Playwright on the real pages; interaction cookie path fix

The interaction address is now /api/v2/interaction/<uid> (redirecting to
the sign-in page): oidc-provider scopes its cookie to that path, so every
step's API call gets it. Before, a real browser never sent it and every
sign-in 'expired'; the test browser now honours cookie paths too.
8 Playwright tests (deep link, wrong password, foreign return address,
sign-up, reset mid-sign-in, 2FA set-up, account page, admin) on the real
backend with an in-memory database, no Postgres needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 15:01:32 +02:00
co-authored by Claude Opus 5.5
parent e1c6a4cce1
commit fdd53ae4db
12 changed files with 250 additions and 8 deletions
+2
View File
@@ -11,6 +11,8 @@ sign-in settings, linked products and the church profile here.
openid-client), `npm run build`.
- `frontend/`: Next.js 16 pages (sign-in steps, account page, admin, setup), strict CSP with a nonce
per page, the church's colours from its profile.
- `e2e/`: Playwright on the real pages (`npx playwright test` in `apps/accounts`): the backend on an
in-memory database with a test product (`e2e/server.ts`), Next on 3210. No database needed.
- Roles stay in each product: Accounts only knows who someone is (plan §2, "Roles stay in each
product").
- Products sign in with `@crosscode/auth-client` (packages/auth-client).