2024-09-03 14:15:42 +02:00
|
|
|
"use server";
|
|
|
|
|
|
|
|
|
|
import { resendEmailCode, verifyEmail } from "@/lib/zitadel";
|
|
|
|
|
|
|
|
|
|
type VerifyUserByEmailCommand = {
|
|
|
|
|
userId: string;
|
|
|
|
|
code: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export async function verifyUserByEmail(command: VerifyUserByEmailCommand) {
|
2024-09-05 13:38:03 +02:00
|
|
|
return verifyEmail(command.userId, command.code);
|
2024-09-03 14:15:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type resendVerifyEmailCommand = {
|
|
|
|
|
userId: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export async function resendVerifyEmail(command: resendVerifyEmailCommand) {
|
2024-09-05 13:38:03 +02:00
|
|
|
return resendEmailCode(command.userId);
|
2024-09-03 14:15:42 +02:00
|
|
|
}
|