[release-11.4.2] Auth: Fix redirect with JWT auth URL login (#100494)

Auth: Fix redirect with JWT auth URL login (#100295)

fix

(cherry picked from commit acc1521929)
This commit is contained in:
Misi
2025-02-12 18:16:02 +01:00
committed by GitHub
parent e9f564277f
commit 08f66dd50c
+5
View File
@@ -390,6 +390,11 @@ function handleRedirectTo(): void {
const queryParams = locationService.getSearch();
const redirectToParamKey = 'redirectTo';
if (queryParams.has('auth_token')) {
// URL Login should not be redirected
window.sessionStorage.removeItem(RedirectToUrlKey);
}
if (queryParams.has(redirectToParamKey) && window.location.pathname !== '/') {
const rawRedirectTo = queryParams.get(redirectToParamKey)!;
window.sessionStorage.setItem(RedirectToUrlKey, encodeURIComponent(rawRedirectTo));