πŸ”₯ Firestore: scalable database

If you had read the topic you would have seen this:

Also, you are using Kodular, if you look on that community, there is an updated version of this extension (paid) that may work for you.

3 posts were merged into an existing topic: Firebase database rules

Does the extension work with Firebase Authentication tokens? if yes how?

I suggest you read this topic in it's entirety

I did but I didn't find a clear answer.. I want to make a chat using firestore component not rest api..

  1. No authentication
  2. No longer works
  3. Why not want to use REST API?

I found someone remaked it I will try it

For rest api because it doesn't manage tokens and all process automatically so overload causes errors and bugs.

I didn't experience any of the issues you indicate:

also I want Real-time chatting updates so could it happen with rest api??

Did you actually read my guide ?

Hi, I applied your solution but in realtime database and it worked fine with open rules but when I added authentication the listener did not work. I tried changing some things in the html file and blocks but it didn't work.. Can you help?

I am talking about your guide here

htmlContent.txt

rules.txt (1.6 KB)

and these two files the html content and my rules.

and this the block

You wanted Firestore ?

removed due to firebaseConfig content

If memory serves me correctly, you should not need to use authentication for the dataChanged html, because you are using the full firebaseConfig to "authenticate". You should, however, be setting the nodes that the user can listen to and call back.

After I restricted the rules It no longer works whether I put authentication in the html file or not

After I restricted the rules to

    "messages": {
      ".read": "auth != null && root.child('chats').child($chatId).child('members').child(auth.uid).exists()",
      "$msgId": {
        ".write": "auth != null && root.child('chats').child($chatId).child('members').child(auth.uid).exists() && newData.child('text').isString() && newData.child('senderName').isString() && newData.child('createdAt').isNumber()"
      },
      ".indexOn": ["createdAt"]
    }
  }
},

the html is no longer working can you help I have been trying to solve this problem for more than a week and I have not been able to

SImplify your rules and test:

"messages": {
      ".read": "auth != null,
      ".write": "auth != null
      },
"messages": {
      ".read": "auth != null,
      "$msgId": {
        ".write": "auth != null
      },
    }

If 1 & 2 work, then build part by part from there, otherwise review

(post deleted by author)

can you provide also the right html file content because mine did not work??

You might want to read through:

HERE

and HERE

where I have introduced a method for dataChanged for the realtime database.