diff --git a/public/.well-known/security.txt b/public/.well-known/security.txt new file mode 100644 index 0000000..a4b9a78 --- /dev/null +++ b/public/.well-known/security.txt @@ -0,0 +1,5 @@ +Contact: mailto:security@domna.homes +Expires: 2027-01-01T00:00:00.000Z +Preferred-Languages: en +Policy: https://domna.homes/security +Canonical: https://ara.domna.homes/.well-known/security.txt \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..6ebbed4 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://domna.homes/sitemap.xml \ No newline at end of file diff --git a/src/app/verify/[token]/page.tsx b/src/app/verify/[token]/page.tsx index 7ba7251..db1f7e6 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
+