diff --git a/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx b/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx index f9dd81f5d..39eb8d686 100644 --- a/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx +++ b/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx @@ -244,6 +244,30 @@ export const SignupInvitePage = () => { setStep(2); } else { navigate({ to: "/login" }); + + // TODO: Redirect user to the newly joined org. The commented code does not work due to auth issues. + // const redirectExistingUser = async () => { + // try { + // const { token: mfaToken, isMfaEnabled } = await selectOrganization({ + // organizationId + // }); + + // if (isMfaEnabled) { + // SecurityClient.setMfaToken(mfaToken); + // toggleShowMfa.on(); + // setMfaSuccessCallback(() => redirectExistingUser); + // return; + // } + + // // user will be redirected to dashboard + // // if not logged in gets kicked out to login + // await navigateUserToOrg(navigate, organizationId); + // } catch (err) { + // navigate({ to: "/login" }); + // } + // }; + + // await redirectExistingUser(); } } } catch (err) {