mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-10-31 08:15:07 +00:00
fix: fix sso redirect issue
This commit is contained in:
@@ -127,6 +127,13 @@ export async function loadApp(urlParams: URLParams, matrixChatRef: React.Ref<Mat
|
|||||||
autoRedirect = true;
|
autoRedirect = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If user has a session and is on welcome/landing, redirect to home
|
||||||
|
if (hasPossibleToken && isWelcomeOrLanding && !isReturningFromSso) {
|
||||||
|
logger.log("User has session, redirecting from welcome to home");
|
||||||
|
window.location.hash = "#/home";
|
||||||
|
// Continue loading the app normally
|
||||||
|
}
|
||||||
|
|
||||||
// getInitialScreenAfterLogin has a side effect to write to sessionStorage, perform it before auto-redirect
|
// getInitialScreenAfterLogin has a side effect to write to sessionStorage, perform it before auto-redirect
|
||||||
const initialScreenAfterLogin = getInitialScreenAfterLogin(window.location);
|
const initialScreenAfterLogin = getInitialScreenAfterLogin(window.location);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user