I'm having issues writing to Firestore once a user is created, has verified email, and is writing to Firestore. If a new user is created and has already verified their email, they are still unable to write to Firestore. The only solution I've found is if the user logs out and logs in again, they can successfully write to Firestore. So I want to know if there is any way where a user can start writing to Firestore without having to log out and log in again?
Here are the security rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, create, update: if request.auth.uid != null && request.auth.token.email_verified != false
}
}
}