Closed
Description
When I using the firestack.database()
to get key
object from firebase real time database
, it shows error Client doesn't have permission to access Desired data
.
When I changed the rules in firebase console
to no auth for reading, it works fine.
Does the database object need extra token to access database?
Rules on firebase console
{
"rules": {
".read": "auth == null",
".write": "auth == null"
}
}
Testing code
export const db = async(key) => {
let snap = await firestack.database.ref(key).once('value');
let str = JSON.stringify(snap.val());
if (snap) {
Alert.alert(snap.key);
return snap.val();
};
};
Metadata
Metadata
Assignees
Labels
No labels