fix: fix sso redirect issue

This commit is contained in:
Joël Poyet
2025-08-22 23:42:59 +02:00
committed by Joël
parent ac88363425
commit eb6be2f289
+7
View File
@@ -127,6 +127,13 @@ export async function loadApp(urlParams: URLParams, matrixChatRef: React.Ref<Mat
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
const initialScreenAfterLogin = getInitialScreenAfterLogin(window.location);