I am developing a Chrome Extension which uses Firestore and I want to prevent malicious people from exceeding my Firestore quota. I already use Firebase Authentication and have my Firestore security rules like this:
- An authentication is needed to access Firestore
- Users can only access the collection with their UID.
This way non-users are prevented from doing that. However, this is not enough because we can't prevent already registered users from exceeding the quota. Since source code of chrome extensions' always exposed through CRX viewers, some registered users can alter it and send thousands of read/write requests.
I can obfuscate the code, but this does not completely solve the problem. Also, obfuscated code is not allowed in Chrome Web Store.
I found Firebase Cloud Functions and Firebase App Check while searching the Firebase documents. Can any of these two be used in a Chrome Extension, do they solve this problem? Also, since I am new to Firebase and developing Chrome Extensions, is there an example extension that uses these?