mirror of
https://github.com/vector-im/element-web.git
synced 2024-07-13 02:34:08 +00:00
Redirect to the SSO page if sso_redirect_options.on_welcome_page
is enabled and the URL hash is empty (#25495)
This commit is contained in:
parent
8997b84f24
commit
71800ba28c
|
@ -107,7 +107,8 @@ export async function loadApp(fragParams: {}): Promise<ReactElement> {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue