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));