packages/auth-client: the product side of signing in through Accounts

Start a sign-in with the return path (state, nonce, PKCE), finish it,
sign-out address, back-channel logout tokens and Accounts' signed
user.* calls. Tested against the real provider. Root lint covers
Accounts' backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 13:45:39 +02:00
co-authored by Claude Opus 5.5
parent f202a5a88e
commit a3e3921b4f
12 changed files with 318 additions and 7 deletions
@@ -137,7 +137,7 @@ export async function startHarness(opts: { now?: () => Date } = {}) {
const { url } = await browser.follow(started.url, (u) => u.pathname === '/signin' || u.pathname === OIDC_CLIENT_PATHS.callback);
if (url.pathname === OIDC_CLIENT_PATHS.callback) return finishSignIn(url, started);
const uid = url.searchParams.get('uid')!;
let step = await api(browser, 'POST', `/api/v2/interaction/${uid}/password`, { email, password });
const step = await api(browser, 'POST', `/api/v2/interaction/${uid}/password`, { email, password });
if (step.body.stage !== 'done') return { pending: step.body, uid, started };
const back = await browser.follow(step.body.redirectTo as string, (u) => u.pathname === OIDC_CLIENT_PATHS.callback);
return finishSignIn(back.url, started);