mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Only remove the loginToken query parameter after SSO
Leave other query parameters untouched.
This commit is contained in:
parent
803730836c
commit
7a33881e14
@ -153,8 +153,11 @@ export class URLRouter<T extends {session: string | boolean}> implements IURLRou
|
|||||||
}
|
}
|
||||||
|
|
||||||
normalizeUrl(): void {
|
normalizeUrl(): void {
|
||||||
// Remove any queryParameters from the URL
|
const url = new URL(window.location.href);
|
||||||
// Gets rid of the loginToken after SSO
|
|
||||||
this._history.replaceUrlSilently(`${window.location.origin}/${window.location.hash}`);
|
// Remove the loginToken query parameter from the URL after SSO.
|
||||||
|
url.searchParams.delete("loginToken");
|
||||||
|
|
||||||
|
this._history.replaceUrlSilently(url.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user