Thursday, February 29, 2024
HomeSoftware Engineering FirebaseError: Lacking or inadequate permissions

[Solved] FirebaseError: Lacking or inadequate permissions


Utilizing Firebase and get the next error within the console?

Uncaught Error in onSnapshot: FirebaseError: Lacking or inadequate permissions.<br>at new FirestoreError (index.cjs.js:x)

repair the Lacking or Inadequate Permissions Error

  1. Login to Firebase
  2. Go to Database -> Guidelines

Change:

service cloud.firestore {
  match /databases/{database}/paperwork {
    match /{doc=**} {
      enable learn, write: if false;
    }
  }
}

to:

service cloud.firestore {
  match /databases/{database}/paperwork {
    match /{doc=**} {
      enable learn, write: if request.auth != null;
    }
  }
}

Possibility 2: Override Authorization / Disable Safety

  1. Login to Firebase
  2. Go to Database -> Guidelines
  3. Change enable learn, write from false to true [for dev]
  4. Change enable learn, write from false to request.auth != null [for prod]
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments