I have the following firestore rule to allow user access to only their record. It works fine...
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid != null;
}
}
}
Now under the users collection, each document contains a field/key name "isAuthenticated" which is set to true from the server side backend using service account persmission.
How can I setup the rules to make sure even the authenticated user cannot update that particular key?