Here\'s my code:
firebase.auth().onAuthStateChanged((user) => {
if (user) {
console.log(\"We are authenticated now!\");
firebase.fires
Please log your UID and confirm it is not null. Then modify the permission rule as -
// Grants a user access to a document matching their Auth user Id
service cloud.firestore {
match /databases/{database}/documents {
// Collection named "users", document named after the userId
match /users/{userId} {
allow read, write: if request.auth.uid == userId;
}
}
}