I have a firebase firestore. In it is a database called Shoals. In that are user documents. They each have a field called email. Each of these documents has several collections, that relate to locations they have been. Here's the problem. When I set me firestore rules as such:
service cloud.firestore {
match /databases/{database}/documents {
match /shoals/{name} {
allow read:if resource.data.email == request.auth.token.email;
}
}
}
I use my email, I login, and it fails. Any ideas?
By the way, I want to use email because it is part of my authentication process and I do not want to expose the uid in my javascript app.