Flutter Firebase权限-拒绝

rsl1atfo  于 2023-03-24  发布在  Flutter
关注(0)|答案(1)|浏览(132)

尝试将数据设置为Firestore Firebase时出现错误

FirebaseException ([cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation.)

Firestore Firebase规则

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

我试试

await usersCollection.doc(cred.user!.uid).set({
      "email": email,
      "name": name,
      "password": password,
      "createdate": DateTime.now().toString(),
    });
wkyowqbh

wkyowqbh1#

这里似乎缺少集合名称
尝试

match /databases/{database}/documents {
   match /collectionName/{document=**} {

相关问题