mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 17:37:32 +00:00
cleanup
This commit is contained in:
@@ -52,7 +52,7 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
||||
(requestId ? `&requestId=${requestId}` : ""),
|
||||
}).catch((error) => {
|
||||
console.error("Could not send invitation email", error);
|
||||
throw Error("Failed to send verification email");
|
||||
throw Error("Failed to send invitation email");
|
||||
});
|
||||
} else {
|
||||
await sendEmailCode({
|
||||
@@ -160,10 +160,6 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
||||
)
|
||||
)}
|
||||
|
||||
{/* always show the code form, except code is an invite code and the email is verified */}
|
||||
{invite === "true" && human?.email?.isVerified ? (
|
||||
<Alert type={AlertType.INFO}>{t("success")}</Alert>
|
||||
) : (
|
||||
<VerifyForm
|
||||
loginName={loginName}
|
||||
organization={organization}
|
||||
@@ -172,7 +168,6 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
||||
isInvite={invite === "true"}
|
||||
requestId={requestId}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</DynamicTheme>
|
||||
);
|
||||
|
@@ -255,23 +255,6 @@ export async function sendLoginname(command: SendLoginnameCommand) {
|
||||
|
||||
// always resend invite if user has no auth method set
|
||||
if (!methods.authMethodTypes || !methods.authMethodTypes.length) {
|
||||
// redirect to /verify invite if no auth method is set and email is not verified
|
||||
// const inviteCheck = checkEmailVerified(
|
||||
// session,
|
||||
// humanUser,
|
||||
// session.factors.user.organizationId,
|
||||
// command.requestId,
|
||||
// );
|
||||
|
||||
// if (inviteCheck?.redirect) {
|
||||
// return inviteCheck;
|
||||
// }
|
||||
|
||||
// // check if user was verified recently
|
||||
// const isUserVerified = await checkUserVerification(
|
||||
// session.factors.user.id,
|
||||
// );
|
||||
// if (!isUserVerified) {
|
||||
const params = new URLSearchParams({
|
||||
loginName: session.factors?.user?.loginName as string,
|
||||
send: "true", // set this to true to request a new code immediately
|
||||
@@ -291,25 +274,6 @@ export async function sendLoginname(command: SendLoginnameCommand) {
|
||||
}
|
||||
|
||||
return { redirect: `/verify?` + params };
|
||||
// }
|
||||
|
||||
// const paramsAuthenticatorSetup = new URLSearchParams({
|
||||
// loginName: session.factors?.user?.loginName,
|
||||
// userId: session.factors?.user?.id, // verify needs user id
|
||||
// });
|
||||
|
||||
// if (command.organization || session.factors?.user?.organizationId) {
|
||||
// paramsAuthenticatorSetup.append(
|
||||
// "organization",
|
||||
// command.organization ?? session.factors?.user?.organizationId,
|
||||
// );
|
||||
// }
|
||||
|
||||
// if (command.requestId) {
|
||||
// paramsAuthenticatorSetup.append("requestId", command.requestId);
|
||||
// }
|
||||
|
||||
// return { redirect: "/authenticator/set?" + paramsAuthenticatorSetup };
|
||||
}
|
||||
|
||||
if (methods.authMethodTypes.length == 1) {
|
||||
|
Reference in New Issue
Block a user