diff --git a/src/app/verify/[token]/page.tsx b/src/app/verify/[token]/page.tsx index 7ba7251e..db1f7e6a 100644 --- a/src/app/verify/[token]/page.tsx +++ b/src/app/verify/[token]/page.tsx @@ -1,9 +1,13 @@ -import { redirect } from "next/navigation"; import { db } from "@/app/db/db"; import { verificationTokens } from "@/app/db/schema/users"; import { eq } from "drizzle-orm"; import crypto from "crypto"; +import { Button } from "@/app/shadcn_components/ui/button"; +import { Card } from "@/app/shadcn_components/ui/card"; + +import { ShieldCheck } from "lucide-react"; + async function getEmailByToken(token: string) { const secret = process.env.NEXTAUTH_SECRET!; @@ -18,14 +22,12 @@ async function getEmailByToken(token: string) { .where(eq(verificationTokens.token, hashedToken)) .limit(1); - if (!record.length) { - return null; - } + if (!record.length) return null; return record[0].identifier; } -export default async function LoginPage({ +export default async function VerifyPage({ params, }: { params: Promise<{ token: string }>; @@ -34,11 +36,94 @@ export default async function LoginPage({ const email = await getEmailByToken(token); - if (!email) { - redirect("/"); - } + return ( +
+ Continue securely to access your retrofit planning tools and + property insights. +
++ Click below to securely sign in to your Ara account. +
+ + + ++ This link expires after one hour. +
+ > + ) : ( + <> ++ This login link has already been used or has expired. +
+ + + > + )} +Secure authentication powered by Ara
+© {new Date().getFullYear()} Domna Homes
+