- Add Firebase configuration in
background.js
. - Create a user with email "user@example.com" and password "secret" in the Firebase console.
- Restrict Firestore access to signed in users [1].
- Go to
about:debugging
in Firefox, click on "This Firefox" and then on "Load Temporary Add-on…". Select themanifest.json
file. - Click on "Inspect" and switch to the "Console" tab.
- There should be no
FirebaseError
logged in the console. - Add the string
"<all_urls>"
to the emptypermissions
array inmanifest.json
. - Reload the extension on the
about:debugging
tab. FirebaseError: "Missing or insufficient permissions."
is shown in the console.
[1]
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth.uid != null;
}
}
}