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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user