autosend and autoverify verification mail

This commit is contained in:
PxlLoewe
2025-05-31 19:15:28 -07:00
parent 2f297ed878
commit ed775afd93
6 changed files with 161 additions and 26 deletions

View File

@@ -10,6 +10,7 @@ import clsx, { ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
import { Button } from "../../../_components/ui/Button";
import { useErrorBoundary } from "react-error-boundary";
import { sendVerificationLink } from "(app)/admin/user/action";
export const Register = () => {
const { showBoundary } = useErrorBoundary();
@@ -59,6 +60,7 @@ export const Register = () => {
firstname: form.getValues("firstname"),
lastname: form.getValues("lastname"),
});
await sendVerificationLink(user.id);
await signIn("credentials", {
callbackUrl: "/",
email: user.email,