I’ve read a bunch of posts here and elsewhere about Firebase rules but I can’t seem to get them to work for me.
Here are the rules I am trying to use:
// Checks auth uid equals database node uid
// In other words, the User can only access their own data
{
"rules": {
"posts": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
}
}
}
I’d like to give a signed in user using this block access to only their stored data:
But I think the problem is that there is no $uid created by the SignUp block in the legacy interface.
So how should I adjust the rules?
Here’s how my Firebase database looks:
[database name]
-[email address]
-journal
-[timestamp]