My app is user-based, and so each user has his data saved in the app's Firestore Database
.
When the app is in debug mode (installed on my device by Android Studio
), there's no problem reading and writing to Firestore
.
The problem is, when the app is installed from the Play Store
(So I guess this means it's in release
mode), the app is no longer able to read and write to the Firebase Database
.
All of the SHA1 and SHA256 are added to the Firebase
app, including the debug keys, release keys, and update keys, while I got the last two from the Play Console
(of the specific app), so probably the problem doesn't lie in these keys.
Here're my Firestore
rules, if there's any chance that they're relevant:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{uid}{
allow read, write: if request.auth.uid == uid;
}
match /{document=**} {
allow read, write: if true;
}
}
}
If any other code pieces are needed, say the word and I'll add them.
What's the problem, then?
And how can I fix it?
Help would be much appreciated!