mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
trying lucia
This commit is contained in:
38
src/(auth)/verify-email/page.tsx
Normal file
38
src/(auth)/verify-email/page.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { redirect } from "next/navigation";
|
||||
import { validateRequest } from "@/lib/auth/validate-request";
|
||||
import { VerifyCode } from "./verify-code";
|
||||
import { Paths } from "@/lib/constants";
|
||||
|
||||
export const metadata = {
|
||||
title: "Verify Email",
|
||||
description: "Verify Email Page",
|
||||
};
|
||||
|
||||
export default async function VerifyEmailPage() {
|
||||
const { user } = await validateRequest();
|
||||
|
||||
if (!user) redirect(Paths.Login);
|
||||
if (user.emailVerified) redirect(Paths.Dashboard);
|
||||
|
||||
return (
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader>
|
||||
<CardTitle>Verify Email</CardTitle>
|
||||
<CardDescription>
|
||||
Verification code was sent to <strong>{user.email}</strong>. Check
|
||||
your spam folder if you can't find the email.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<VerifyCode />
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user