Insert old code as comment

This commit is contained in:
x032205
2025-06-03 21:48:42 -04:00
parent aa049dc43b
commit e2680d9aee

View File

@@ -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) {