From 71800ba28cc028037fe19385616a69af30a9a854 Mon Sep 17 00:00:00 2001 From: Dominik Henneke Date: Thu, 1 Jun 2023 12:56:30 +0200 Subject: [PATCH] Redirect to the SSO page if `sso_redirect_options.on_welcome_page` is enabled and the URL hash is empty (#25495) --- src/vector/app.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vector/app.tsx b/src/vector/app.tsx index 2b140a5ba7..463ef1346a 100644 --- a/src/vector/app.tsx +++ b/src/vector/app.tsx @@ -107,7 +107,8 @@ export async function loadApp(fragParams: {}): Promise { const ssoRedirects = parseSsoRedirectOptions(config); let autoRedirect = ssoRedirects.immediate === true; // XXX: This path matching is a bit brittle, but better to do it early instead of in the app code. - const isWelcomeOrLanding = window.location.hash === "#/welcome" || window.location.hash === "#"; + const isWelcomeOrLanding = + window.location.hash === "#/welcome" || window.location.hash === "#" || window.location.hash === ""; if (!autoRedirect && ssoRedirects.on_welcome_page && isWelcomeOrLanding) { autoRedirect = true; }