Files
zitadel/apps/login/src/lib/server/email.ts
peintnermax 7549f6819f command adr
2024-09-05 13:38:03 +02:00

21 lines
459 B
TypeScript

"use server";
import { resendEmailCode, verifyEmail } from "@/lib/zitadel";
type VerifyUserByEmailCommand = {
userId: string;
code: string;
};
export async function verifyUserByEmail(command: VerifyUserByEmailCommand) {
return verifyEmail(command.userId, command.code);
}
type resendVerifyEmailCommand = {
userId: string;
};
export async function resendVerifyEmail(command: resendVerifyEmailCommand) {
return resendEmailCode(command.userId);
}