I'm trying to change my firebase realtime database rules so that I can access it from both authenticated and unauthenticated users, I changed them to
{
"rules": {
".read": "auth == null",
".write": "auth != null" ||"auth==null"
}
}
But the or operator ||
is not working. What should I do?
Thanks!
Try This
{
"rules:{
".read": "auth == null",
".write": "auth != null || auth==null"
}
}
Also, If you want to allow both users authenticated and non-authenticated , it means you want to allow all users to access database, then you can do this :
These rules give anyone, even people who are not users of your app, read and write access to your database
{
"rules": {
".read": true,
".write": true
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With