Reputation: 4898
I used this protection rules in the database like this
{
"rules": {
"users": {
"$userId": {
".read": "$userId === auth.uid",
".write": "$userId === auth.uid"
}
}
}
}
In postman I tried GET with url.json but I get permission denied
I tried to search the documentations how to find and pass current UID but could not find
Also for authentication with email and password I select in the postman Authorization "Basic Auth" and I went to firebase Project settings
then I add member then I add email and select role "Firebase Admin" but where I get this user entered password to save it in postman ?
Upvotes: 2
Views: 1647
Reputation: 598740
If you want to access the user's data via the REST API, you'll have to make sure the calls are authenticated as shown in the documentation.
The options for this are to add a parameter to the request:
access_token
parameter,auth
parameter.There is no way to pass just the UID of the user, as that would not be secure - as anyone could pass any value for as their UID in that case.
Upvotes: 3