fix: define globals for context
This commit is contained in:
parent
296e4d489c
commit
e36352b7f3
3 changed files with 24 additions and 7 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue