When I exit the application, I get this error:
Error: permission_denied at /users/KuehJHDJ15SfS1s6FIh1: Client doesn't have permission to access the desired data.
at G (firebase.js:432)
at Object.G (firebase.js:456)
at Pg (firebase.js:398)
at Eg.g.wd (firebase.js:391)
at sg.wd (firebase.js:381)
at bg.hg (firebase.js:379)
at eg (firebase.js:363)
at WebSocket.La.onmessage (firebase.js:362)
I suspect my question is very much related to this:
Refs not reerunning after changes to onAuthStateChanged Firebase 3.0.0
here are my safety rules:
{
"rules": {
"users": {
".read": "auth != null && root.child('hashlist/'+root.child('users/'+auth.uid+'/hash').val()).val() == auth.email",
".write": "auth != null"
},
"hashlist": {
".read": true,
".write": "auth != null && root.child('users/'+auth.uid+'/role').val() == 'admin'"
}
}
}
I would appreciate your help, thanks.
source
share