Reputation: 1768
The Doc says
Once a user authenticates, the auth variable in your Firebase Database Rules rules will be populated with the user's information. This information includes their unique identifier (uid) as well as linked account data, such as a Facebook id or an email address, and other info.
and i made and Auth in my app with google but when try reading the database it's return
Firebase Database error: Permission denied
where this is my rules :
{
"rules": {
"msgs":{
".read": "auth != null && auth.provider == 'google'",
".write":"auth != null && auth.provider == 'google'"
}
}
}
Upvotes: 0
Views: 735
Reputation: 123
Try auth !== null it seems to want there to be two equal signs.
Upvotes: 2