Quite desperate with Firebase rules. Please, help!

Hi Koders.
I’m quite desperate with Firebase rules.
If the rules are these:
imagen
the app works perfect.
But even the simpliest rules that requires only authentication, like this:
imagen
results in permission denied, being authenticated.
This is the structure of data;
imagen
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.
Any idea?
Thanks in advance.

Remove the comma at the end of the .write rule

or

Try these rules:

{
  "rules": {
    ".read": "auth.uid != null",
    ".write": "auth.uid != null"
  }
}
1 Like

Thanks, but didn’t work either.
imagen
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.

1 Like

imagen
Not working. :frowning_face:

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):
imagen
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.

Better go through with this tutorial. Surely it will help you

https://docs.kodular.io/guides/component-examples/securing-app/#overview

I think I’m going to add a new app in Firebase and start everything from the beggining.
Thanks.

Keep this rule as it is only replace null with true

1 Like

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.
Thanks.

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.

Thanks.

I make it work by using the Firebase REST api

Firebase with a Web Component

There is a lot to read and learn…

1 Like

I will try. Thanks!

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