iamshaunjp / flutter-firebase

All course files for the Flutter & Firebase tutorial playlist on The Net Ninja YouTube channel
578 stars 440 forks source link

Flutter & Firebase App Tutorial #17 - Firestore User Records Error: Status{code=PERMISSION_DENIED #9

Closed superpoli closed 4 years ago

superpoli commented 4 years ago

When I register with a new user, a new user is created in Firebase, but I get the following error message and no entry is made in the database:

W/Firestore( 7435): (21.3.0) [Firestore]: Write failed at rimu/1xxbkZLfhCe9Lukign3jyimgimo2: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null} I/flutter ( 7435): PlatformException(Error performing setData, PERMISSION_DENIED: Missing or insufficient permissions., null)

superpoli commented 4 years ago

ok change the rule and it works.

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