Hi I am trying in src>index.js
`
import {initializeApp} from 'firebase/app'
`
I am learning from a video. When the man in the video wrote this code, he wrote that it is being calculated next to him in green, but it does not write to me. and I think that’s why when I try to pull data from firebase database I get the following error in the console
index.html:1 Uncaught (in promise) FirebaseError: Missing or insufficient permissions.
Can anyone know the solution?
2
Answers
Your firebase firestore rules don’t allow reads or write for the collection that you are trying to query from.
Goto Firebase console and modify the firestore rules
Docs: https://firebase.google.com/docs/firestore/security/get-started
Your security rules do not allow anyone to read or write to your database. If you set your rule to true as shown below, it should allow you to write:
Sample:
To configure your Firestore Security Rules:
In this rule anyone can read or write to your series collection. I recommend reading about Firestore Security Rules to restrict access to authorized users only.
Thanks.