I’m quite desperate with Firebase rules.
If the rules are these:
the app works perfect.
But even the simpliest rules that requires only authentication, like this:
results in permission denied, being authenticated.
This is the structure of data;
In “Compartir” (share) folder any authenticated user should read and write. The others folders are de uid’s of authenticated users and only each user should have permission to write or read their own folder.
I think is not a sintaxis problem and I don’t know where to look or what to change.
Thanks in advance.
Remove the comma at the end of the .write rule
Try these rules:
".read": "auth.uid != null",
".write": "auth.uid != null"
Thanks, but didn’t work either.
I have tried many times, many different rules copy-pasted from Firebase help webs, with modifications to adapt it to my data structure, but never worked.
After the rule , did you mention the text Comparator and try
Sorry, I don’t know how to do that.
Please read this article. You will get succeed.
authentication with email or google sign in?
With email and password and Google button, tried both, neither of them worked ever with other rules than “true” for read and write.
If you add SHA1 key in the fingerprint, your problem will over. In the creator page, click on your profile logo >click setting>copy SHA1 key
Go to console > go to added apps> click on sdk of this app> there you will find add fingerprint. Paste this value. Then upload the Google.service.json file once again… your problem will over
Sorry to say, but the problem remains. I have the SHA1 key already. Actually there are two SHA1 fingerprint and one SHA-256 (I think the other two are from Google Play Console):
Anyway, I uploaded the new json file, but the problem is still there, only can acces to read or write with the “true” value.
Thanks for your help anyway.
I think I’m going to add a new app in Firebase and start everything from the beggining.
Keep this rule as it is only replace
null with true
If you see my first post, I said that with this rules it works good. The problem is that this rules are not secure.
EDIT: Sorry, is not the same as in my first post. I’ll try and see.
Its impossible, I can’t make it work, permission denied message always appears when authenticated user is required.
I would like to pay 20€ through PayPal to anyone who helps me to find the solution to this problem. DM me if you are interested.
I make it work by using the Firebase REST api
Firebase with a Web Component
There is a lot to read and learn…
With a new Fifebase project the problem remains.
What is called vocalcircuit here,(project bucket, if. so then compartir)???
Below the comparatir make both read and write true, then only all can sign but the next child i.e $uid only need to authenticate (what you added for uid is correct)
Only thing is make changes in the first one then try and tell us whether what you are looking. is fulfilled or not