【问题标题】:Error: permission_denied at /categories: Client doesn't have permission to access the desired data错误:permission_denied at /categories:客户端无权访问所需数据
【发布时间】:2019-05-09 17:25:38
【问题描述】:

我有一个招聘人员给我的任务,在这里我需要使用 react redux 和 firebase 构建一个电子商务网站。

前端部分已完成,但无法从 firebase 获取数据。 这是我的规则选项卡内容我该如何修改它。

this.props.firebase.categories().on('value', snapshot => {
        // Not coming here.
            console.log(snapshot, snapshot.val)
        }, (error) => {
        // Error shows here
            console.log(error);
        });


// Content of Rules tab
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

遵循本教程: https://www.robinwieruch.de/complete-firebase-authentication-react-tutorial/#react-application-setup

【问题讨论】:

    标签: reactjs firebase firebase-realtime-database


    【解决方案1】:

    在规则 (firebase) 中将读取和写入权限设置为 true。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-03-20
      • 1970-01-01
      • 2018-07-14
      • 2021-08-10
      • 2020-11-03
      • 2017-02-12
      • 2022-01-15
      相关资源
      最近更新 更多