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:
@@ -0,0 +1,9 @@
|
||||
<!-- BEGIN:nextjs-agent-rules -->
|
||||
|
||||
## This is NOT the Next.js you know
|
||||
|
||||
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
|
||||
|
||||
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
|
||||
|
||||
<!-- END:nextjs-agent-rules -->
|
||||
@@ -48,7 +48,7 @@ export function SignIn({ uid }: { uid: string }) {
|
||||
|
||||
useExternalEffect(() => {
|
||||
let alive = true;
|
||||
call<State>("GET", `/interaction/${encodeURIComponent(uid)}`).then((r) => {
|
||||
call<State>("GET", `/interaction/${encodeURIComponent(uid)}/state`).then((r) => {
|
||||
if (!alive) return;
|
||||
if (r.ok) apply(r.data);
|
||||
else setError(r.error);
|
||||
|
||||
Reference in New Issue
Block a user