cleanup skipsend

This commit is contained in:
Max Peintner
2025-01-03 09:04:22 +01:00
parent 03fbcf2e52
commit cba234196f
3 changed files with 3 additions and 16 deletions

View File

@@ -20,15 +20,8 @@ export default async function Page(props: { searchParams: Promise<any> }) {
const t = await getTranslations({ locale, namespace: "verify" });
const tError = await getTranslations({ locale, namespace: "error" });
const {
userId,
loginName,
code,
organization,
authRequestId,
invite,
skipsend,
} = searchParams;
const { userId, loginName, code, organization, authRequestId, invite } =
searchParams;
const branding = await getBrandingSettings(organization);
@@ -37,7 +30,7 @@ export default async function Page(props: { searchParams: Promise<any> }) {
let human: HumanUser | undefined;
let id: string | undefined;
const doSend = !skipsend && invite !== "true";
const doSend = invite !== "true";
if ("loginName" in searchParams) {
sessionFactors = await loadMostRecentSession({

View File

@@ -92,7 +92,6 @@ export async function registerUser(command: RegisterUserCommand) {
humanUser,
session.factors.user.organizationId,
command.authRequestId,
//true, // skip send as a mail was send during registration
);
if (emailVerificationCheck?.redirect) {

View File

@@ -62,7 +62,6 @@ export function checkEmailVerification(
humanUser?: HumanUser,
organization?: string,
authRequestId?: string,
skipSend?: boolean,
) {
if (
!humanUser?.email?.isVerified &&
@@ -83,10 +82,6 @@ export function checkEmailVerification(
);
}
if (skipSend) {
params.append("skipsend", "true");
}
return { redirect: `/verify?` + params };
}
}