ability to disable email verification requirement

This commit is contained in:
Milo Schwartz
2024-10-25 21:39:18 -04:00
parent 50e1a7abe1
commit 29b848fd5d
7 changed files with 107 additions and 53 deletions

View File

@@ -2,11 +2,13 @@ import VerifyEmailForm from "@app/app/auth/verify-email/VerifyEmailForm";
import { verifySession } from "@app/lib/auth/verifySession";
import { redirect } from "next/navigation";
export default async function Page(
props: {
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
export default async function Page(props: {
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}) {
if (!process.env.NEXT_PUBLIC_FLAGS_EMAIL_VERIFICATION_REQUIRED) {
redirect("/");
}
) {
const searchParams = await props.searchParams;
const user = await verifySession();