From f888f6f519c6551dbb30e586dd350e155231a919 Mon Sep 17 00:00:00 2001 From: Nikolay Osaulenko Date: Wed, 11 Sep 2024 17:10:55 +0300 Subject: [PATCH] Detect origin for urls of different forms --- lib/http/mixin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http/mixin.ts b/lib/http/mixin.ts index 63d14ec45..c86ea972c 100644 --- a/lib/http/mixin.ts +++ b/lib/http/mixin.ts @@ -42,7 +42,7 @@ export function mixinHttp getIssuerOrigin(): string { // Infer the URL from the issuer URL, omitting the /oauth2/{authServerId} // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return this.options.issuer!.split('/oauth2/')[0]; + return this.options.issuer!.split('/').slice(0, 3).join('/'); } webfinger(opts): Promise {