fix: sign out user immediately after signup to prevent Firestore access before verification
This commit is contained in:
1 parent
302a89e8d8
commit
aacb2813d6
2 files changed
+7
-1
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user