fix: SSO Issuer URL formatted incorrectly (#1096)

Co-authored-by: Jiralite <[email protected]>
This commit is contained in:
Jason ZherdevandJiralite authored and GitHub committed 2026-07-01 17:40:00 +01:00
1 parent 34ef4df925
commit 4a518b8e68
2 files changed
+9 -8

No files matched your search

@@ -644,7 +644,7 @@ export class SsoService {
}
private async getOrCreateJwks(jwksUrl: string): Promise<RemoteJwkSetResolver> {
await this.validatePublicOutboundUrl(jwksUrl, 'jwks_url');
await this.assertPublicOutboundUrl(jwksUrl, 'jwks_url');
const now = Date.now();
const cached = this.jwksCache.get(jwksUrl);
if (cached && now - cached.cachedAt < SsoService.JWKS_CACHE_TTL_MS) {
@@ -893,7 +893,7 @@ export class SsoService {
};
}
private async validatePublicOutboundUrl(rawUrl: string, fieldName: string): Promise<URL> {
private async assertPublicOutboundUrl(rawUrl: string, fieldName: string): Promise<string> {
return validateSsoPublicOutboundUrl(rawUrl, fieldName);
}
@@ -902,8 +902,7 @@ export class SsoService {
return null;
}
try {
const validUrl = await this.validatePublicOutboundUrl(rawUrl, fieldName);
return validUrl.toString();
return await this.assertPublicOutboundUrl(rawUrl, fieldName);
} catch (error) {
this.logger.warn({fieldName, rawUrl, error}, 'Ignoring SSO URL that failed outbound policy validation');
return null;