Missing or insufficient permissions. #363
-
I am having trouble with adding and getting a document. [Firebase Error] >> Action in error was: 1 (1 if I try to add, 2 if I try to get a document) I can not figure out what it wants from me. Any help is appreciated. I'm new to Firebase and this plugin. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It sounds like you need to setup your rules on your Firestore database - sounds like however you have them setup, it's not quite there yet. In general, you'll want them to look something like this - but keep in mind this is specific to my database, so you may need something different, try to use what I'm showing to figure it out: All this does is ensure a person is logged in. Technically, you can do something kind of cool with the rules as well where you allow it to be pinged for a certain amount of time - no login required. I often use this for development purposes. You should be able to look up online what the format is for the rules for that. Finally, you can look inside the code for the plugin to see what 1 and 2 correspond to; in this case, they refer to adding a document and getting a document respectively. :) We should add a user-friendly dictionary to map those constants out, so thanks for the comment! I will open an issue with that. |
Beta Was this translation helpful? Give feedback.
It sounds like you need to setup your rules on your Firestore database - sounds like however you have them setup, it's not quite there yet. In general, you'll want them to look something like this - but keep in mind this is specific to my database, so you may need something different, try to use what I'm showing to figure it out:
All this does is ensure a person is logged in. Technically, you can do something kind of cool with the rules as well where you allow it to be pinged for a certain amount of time - no login required. I often use this for development purposes. You should be able to look up online what the format is for the rules for that. Finally, you can look inside the code for …