Cloud Firestore: Missing or insufficient permissions

Viewed 9800

I am getting (on Android):

com.google.firebase.firestore.FirebaseFirestoreException: PERMISSION_DENIED: Missing or insufficient permissions

using these security rules:

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if request.auth != null;
    }
  }
}

My app seems to be properly authenticated using FirebaseAuth, as the mFirebaseAuth.getCurrentUser().getUid() returns the proper user ID.

Is there something I am doing wrong?

3 Answers

It seem it's a Firestore problem (in beta today), not in the client side.

I asked the Firebase support team directly since this issue was kind of critical for our service and I received the email below. It seems they fixed the bug now.

Please let me know if the issue happens again.

Hi there,

We have just confirmed with our engineers that this sporadic issue with our Security Rules for Firestore was a known bug but was already fixed today. Kindly test your security rules again and let us know if you are still encountering the issue.

Regards, Kevin

Related