Data Structure:
root:
lists:
$list:
pass: "VALU"
Rules Structure:
"rules": {
"lists": {
"$list": {
".read": "auth.token.name === data.child('pass').val()"
}
}
}
Javascript:
firebase.auth().signInAnonymously();
firebase.auth().currentUser.updateProfile({
displayName: "VALU"
});
firebase.database().ref("lists/{$SomeList}").once('value').then([...]);
// Throws error: permission denied
I'm very confused as to why the permission is denied. I made sure that the values for the displayName and the pass were the same, so I'm not sure as to why the comparison is returning false..
Aucun commentaire:
Enregistrer un commentaire