From acc15219296206fb1a971b3742110e6a9d972cef Mon Sep 17 00:00:00 2001 From: Misi Date: Mon, 10 Feb 2025 10:48:35 +0100 Subject: [PATCH] Auth: Fix redirect with JWT auth URL login (#100295) fix --- public/app/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/app/app.ts b/public/app/app.ts index d49f27a8732..f4c4fd5d77c 100644 --- a/public/app/app.ts +++ b/public/app/app.ts @@ -403,6 +403,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));