I am working on a web app and I faced to new problem on localhost which is FirebaseError: Missing or insufficient permissions
but the live version of app that use same firebase firestore works perfectly.
this is my firebase rules:
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
I must mention it that there is no problem with usage limit. here you can see one block of code which trow the error I mentioned:
async getUserData(userUid) {
const q = query(
collection(db, "userProfile"),
where("userUid", "==", userUid)
);
const querySnapshot = await getDocs(q);
querySnapshot.forEach(doc => {
this.provider.unshift(doc.data().serviceAddress);
});
},