Skip to content

Commit

Permalink
Redirect to the SSO page if sso_redirect_options.on_welcome_page is…
Browse files Browse the repository at this point in the history
… enabled and the URL hash is empty (#25495)
  • Loading branch information
dhenneke committed Jun 1, 2023
1 parent 8997b84 commit 71800ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vector/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 71800ba

Please sign in to comment.