Securing the database
This section is an optional overview of what we would need to do to provide security for the database. As you may remember, when we created our Firestore database, we set it up so that access was available to anyone, completely unrestricted. That's fine while you're developing a small test application, but it's generally not what you are going to want to deploy as a commercial application.
We are going to change the configuration of our database so that we only allow read/write access if the authorization ID is set. To do this, select the Rules tab in the Database and add if request.auth.uid != null; to the rules list. The format of match /{document=**} simply means that this rule applies to any document in the list. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access