From 803730836c646e61c5353dfe8a6f081ee50f94bb Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Tue, 13 Dec 2022 16:37:29 +0000 Subject: [PATCH 1/2] SSO callback URL should contain the query params --- src/domain/navigation/URLRouter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domain/navigation/URLRouter.ts b/src/domain/navigation/URLRouter.ts index 23503530..6672e89f 100644 --- a/src/domain/navigation/URLRouter.ts +++ b/src/domain/navigation/URLRouter.ts @@ -149,7 +149,7 @@ export class URLRouter implements IURLRou } createSSOCallbackURL(): string { - return window.location.origin; + return window.location.href; } normalizeUrl(): void { From 7a33881e145da2f2d5056914a51445d42779be3c Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Tue, 13 Dec 2022 16:41:38 +0000 Subject: [PATCH 2/2] Only remove the loginToken query parameter after SSO Leave other query parameters untouched. --- src/domain/navigation/URLRouter.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/domain/navigation/URLRouter.ts b/src/domain/navigation/URLRouter.ts index 6672e89f..c69246ee 100644 --- a/src/domain/navigation/URLRouter.ts +++ b/src/domain/navigation/URLRouter.ts @@ -153,8 +153,11 @@ export class URLRouter implements IURLRou } normalizeUrl(): void { - // Remove any queryParameters from the URL - // Gets rid of the loginToken after SSO - this._history.replaceUrlSilently(`${window.location.origin}/${window.location.hash}`); + const url = new URL(window.location.href); + + // Remove the loginToken query parameter from the URL after SSO. + url.searchParams.delete("loginToken"); + + this._history.replaceUrlSilently(url.toString()); } }