fix: sign out user immediately after signup to prevent Firestore access before verification

This commit is contained in:
nmemmert committed 2026-01-16 09:42:03 -05:00
1 parent 302a89e8d8
commit aacb2813d6
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -44,6 +44,12 @@ export default function Login() {
if (newUser) {
try {
await sendVerificationEmailToUser(newUser);
// Sign them out immediately - they must verify before login
const { signOut } = await import('firebase/auth');
const { auth } = await import('@/lib/firebase');
await signOut(auth);
setVerificationSent(true);
setShowVerificationBanner(true);
} catch (err) {