【发布时间】:2019-02-05 03:38:27
【问题描述】:
我正在尝试访问我的 Firebase 数据以运行一个小测试。我已经在 firebase 控制台中设置了一个应用程序并将访问规则设置为:
// Allow read/write access to all users under any conditions
// Warning: **NEVER** use this rule set in production; it allows
// anyone to overwrite your entire database.
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
但我总是收到以下错误:
angular.js:14328 Error: permission_denied at /messages: Client doesn't have permission to access the desired data.
在这行代码:
var ref = firebase.database().ref().child('messages');
我错过了什么?
【问题讨论】:
标签: firebase firebase-realtime-database firebase-security