But the Authentication always tells me that my entered data is wrong. I really don’t know what I could have missed as the steps are very easy: enable auth in firebase for email/pw → create a user → enable auth in composer → test it…
If you have any idea what I missed I would be very thankful… I will try the next days to do it maybe all from scratch but as the ToDo list works very well I assume I have setup all correct…
Hi Jens, glad to hear you liked the tutorial! Looks like there is in fact something wrong with the Firebase auth, I wasn’t able to get it working either. I’ll report the issue forward, thanks for reaching out!
Having the same issue. Glad I checked here after only an hour of trying to troubleshoot
Based on experimenting with my Firestore security rules, it seems that AppGyver is successfully communicating to Firebase Auth that I am authenticated (“request.auth != null” passes), but not communicating which username I’m authenticated under (any rules that match usernames fail with error 403).
@Jens_Limbach, did you also configure the Web app? I had forgot to fill in the web app name and API key, which resulted in the auth not working in the preview.
@escapenewhaven – what does your Firebase security rule look like?
@Mari I’m using the exact set of rules that they use in the second example here.
My setup is very simple: the user authenticates, then can access the document in the “users” collection that corresponds to their username. I am passing their username via variable into the document identifier and it seems to be resolving in the correct URL for the GET request. Unfortunately no matter what I try I keep getting a 403 permission error – unless I simplify the rules to allow all authenticated users to access everything (the commented-out lines in the rules screenshot), which works for testing most parts of the app but is not going to work in production.
Looks like uid in this case is a Firebase assigned id to the user (if you check on the Authentication tab, each user has an UID that is a string), but your custom collection “users” is using email as record identifier. So when you have a rule like
@Mari : Thank you so much! It immediatly worked after adding the web app details in the AppGyver configuration for firebase! Thank you so much for you super fast help!
Dear @Mari , I am so sorry it was also here my mistake… I switched the app id and the client id… For sure it cannot work… Thanks for asking exactly the right questions! It is now all working fine!