[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)
pull/100580/head
Misi 5 months ago committed by GitHub
parent e9f564277f
commit 08f66dd50c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      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));

Loading…
Cancel
Save