From ee2d0aac2a5c8342b5c282b2a02d29af3c2b76f0 Mon Sep 17 00:00:00 2001 From: Misi Date: Wed, 12 Feb 2025 19:25:00 +0100 Subject: [PATCH] [release-11.3.4] Auth: Fix redirect with JWT auth URL login (#100495) Auth: Fix redirect with JWT auth URL login (#100295) fix (cherry picked from commit acc15219296206fb1a971b3742110e6a9d972cef) --- public/app/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/app/app.ts b/public/app/app.ts index 936b7b5293a..22b5c4f72f7 100644 --- a/public/app/app.ts +++ b/public/app/app.ts @@ -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));