相关疑难解决方法(0)

Cloud Firestore安全规则仅允许从Firebase功能进行写入

我真的希望能够通过仅允许firebase函数写入特定集合来保护我的firestore db ......我将如何去做?看那里的文档我找不到任何可能说明你怎么做的东西.例如,我正在寻找类似的东西:

service cloud.firestore {
  match /databases/{database}/documents {

    // Match any document in the 'cities' collection
    match /cities/{city} {
      allow read;
      allow write: if <from firebase function>;
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

firebase google-cloud-functions google-cloud-firestore firebase-security-rules

21
推荐指数
1
解决办法
3633
查看次数