feat: email verification + delete confirmation + smtp/cors/prod hardening

This commit is contained in:
2026-02-09 14:46:49 -06:00
parent 27cc7d159b
commit 9856317641
22 changed files with 896 additions and 58 deletions

View File

@@ -31,5 +31,12 @@ export function RequireAuth({ children }: Props) {
);
}
if (session.data && !session.data.emailVerified) {
const next = encodeURIComponent(
`${location.pathname}${location.search}`.replace(/^$/, "/")
);
return <Navigate to={`/verify?next=${next}`} replace />;
}
return <>{children}</>;
}

View File

@@ -0,0 +1,21 @@
type Props = {
title: string;
body: string;
onAcknowledge: () => Promise<void> | void;
};
export default function UpdateNoticeModal({ title, body, onAcknowledge }: Props) {
return (
<div className="fixed inset-0 z-[120] bg-black/50 backdrop-blur-sm flex items-center justify-center p-4">
<div className="card max-w-lg w-full p-6">
<h2 className="text-xl font-semibold mb-2">{title}</h2>
<p className="muted whitespace-pre-wrap mb-6">{body}</p>
<div className="flex justify-end">
<button className="btn" onClick={() => void onAcknowledge()}>
Got it
</button>
</div>
</div>
</div>
);
}