fix(server): oidc registration (#12723)

This commit is contained in:
liuyi
2025-06-05 17:16:21 +08:00
committed by GitHub
parent d6a26b8093
commit 71be1d424a

View File

@@ -60,7 +60,7 @@ export class OIDCProvider extends OAuthProvider {
const validate = async () => {
this.#endpoints = null;
if (this.configured) {
if (super.configured) {
const config = this.config as OAuthOIDCProviderConfig;
try {
const res = await fetch(
@@ -73,7 +73,6 @@ export class OIDCProvider extends OAuthProvider {
if (res.ok) {
this.#endpoints = OIDCConfigurationSchema.parse(await res.json());
super.setup();
} else {
this.logger.error(`Invalid OIDC issuer ${config.issuer}`);
}
@@ -81,6 +80,8 @@ export class OIDCProvider extends OAuthProvider {
this.logger.error('Failed to validate OIDC configuration', e);
}
}
super.setup();
};
validate().catch(() => {