Does anyone know why I can't use this snippet from here https://firebase.google.com/docs/rules/basics#realtime-database_2
It looks like a documentation mistake because in Firestore you would write request.auth.uid
while in the RTDB you just write auth.uid
.
{
"rules": {
"some_path": {
"$uid": {
// Allow only authenticated content owners access to their data
".read": "auth != null && auth.uid == $uid",
".write": "auth != null && auth.uid == $uid"
}
}
}
}
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