fix(core): Fix warning on empty OIDC discovery endpoint (#17103)

This commit is contained in:
Iván Ovejero
2025-07-08 13:13:28 +02:00
committed by GitHub
parent d6b646d8cf
commit 608dcdee4d

View File

@@ -58,7 +58,7 @@ export class OidcService {
async init() {
this.oidcConfig = await this.loadConfig(true);
console.log(`OIDC login is ${this.oidcConfig.loginEnabled ? 'enabled' : 'disabled'}.`);
this.logger.debug(`OIDC login is ${this.oidcConfig.loginEnabled ? 'enabled' : 'disabled'}.`);
await this.setOidcLoginEnabled(this.oidcConfig.loginEnabled);
}
@@ -156,6 +156,9 @@ export class OidcService {
if (currentConfig) {
try {
const oidcConfig = jsonParse<OidcConfigDto>(currentConfig.value);
if (oidcConfig.discoveryEndpoint === '') return DEFAULT_OIDC_RUNTIME_CONFIG;
const discoveryUrl = new URL(oidcConfig.discoveryEndpoint);
if (oidcConfig.clientSecret && decryptSecret) {