I am analysing the get started guide for firebase cloud firestore. This is for an android app. https://firebase.google.com/docs/firestore/security/get-started
I need to save and read the user data from every android device for backing up some data. The document for firebase cloud firestore shows the below code for accessing the data for all users. But I want to restrict the user data to be private so that it can be accessed only by the user who saved it. Please advice how to proceed with the access / authentication process.
// Allow read/write access on all documents to any user signed in to the application
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth.uid != null;
}
}
}