fix: define globals for context

This commit is contained in:
Aarnav Tale 2025-03-11 21:58:25 -04:00
parent 296e4d489c
commit e36352b7f3
No known key found for this signature in database
3 changed files with 24 additions and 7 deletions

View file

@ -6,10 +6,6 @@ import log from '~server/utils/log';
type OidcConfig = NonNullable<AppContext['context']['oidc']>;
declare global {
const __PREFIX__: string;
const __oidc_context: {
valid: boolean;
secret: string;
};
}
// We try our best to infer the callback URI of our Headplane instance
@ -260,7 +256,7 @@ export function formatError(error: unknown) {
}
export function oidcEnabled() {
return __oidc_valid;
return __oidc_context.valid;
}
export async function testOidc(oidc: OidcConfig) {