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 Poyet
parent 6387ddac6f
commit d4b4c86584
+8
View File
@@ -96,6 +96,14 @@ export async function loadApp(fragParams: QueryDict, matrixChatRef: React.Ref<Ma
if (!autoRedirect && ssoRedirects.on_login_page && isLoginPage) {
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
}
if (!hasPossibleToken && !isReturningFromSso && autoRedirect) {
logger.log("Bypassing app load to redirect to SSO");
const tempCli = createClient({