我正在尝试访问我的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');
我想念的是什么?