I need some help with securing my database.
Those are my security rules:
I've tried this code to give access to each user to read and write his own data:
{
"rules": {
"Users":{
"$user":{
".read": "auth.token.phone_number==$user",
".write": "auth.token.phone_number==$user",
}
}
}
}
My database looks like this (i'm using phone numbers instead of uid):
but for some reason when I run the firebase rules playground with a given auth.token.phone number that equals to the exact location I gave for example i get read option denied.
and it happens also within my app with my app can you guys help me to solve it?