I have a messaging app that uses firestore storage to store all attachments and realtime for all messages. I find myself with the problem that by default any user from the Internet can read data, in the case of storage, knowing the url, you access the file and in the case of realtime, the messages.
My idea is to propose two options to see which is viable:
I have an app registered as a project, can the rules be configured to only allow requests that come from that app? How would these rules be made in store and realtime?
It can be configured so that only users registered through the Authentication section have access to the storage and realtime information.
For this option two I have tried this rule:
allow read, write, delete: if request.auth != null;
But I can still consult the resource from the internet and the browser without obviously being a registered user in my app.