Accounts: product tests (sign out everywhere, back-channel calls, deletion, export, Connect, admin), lib tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,11 @@ export async function createProvider(ctx: Ctx): Promise<Provider> {
|
||||
Session: (_k, session) => (session.transient ? DAY : sessionDays * DAY),
|
||||
},
|
||||
renderError: renderError(ctx),
|
||||
// oidc-provider refuses private addresses for back-channel logout (its SSRF protection). Local
|
||||
// testing only (LINKS_ALLOW_PRIVATE): send without that check, as for the other link calls.
|
||||
...(ctx.config.allowPrivateLinks && !ctx.config.production
|
||||
? { fetch: (input: string | URL | Request, init?: RequestInit) => { const { dispatcher: _d, ...rest } = (init ?? {}) as RequestInit & { dispatcher?: unknown }; return fetch(input, rest); } }
|
||||
: {}),
|
||||
rotateRefreshToken: false,
|
||||
issueRefreshToken: () => false,
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ export async function signOutEverywhere(ctx: Ctx, provider: Provider, accountId:
|
||||
told++;
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(`[sessions] back-channel logout to ${clientId} failed:`, (e as Error).message);
|
||||
console.warn(`[sessions] back-channel logout to ${clientId} failed:`, (e as Error).message, (e as { cause?: Error }).cause?.message ?? '');
|
||||
}
|
||||
}
|
||||
await ctx.db.oidcPayload.deleteMany({ where: { id: row.id } });
|
||||
|
||||
Reference in New Issue
Block a user