-
Notifications
You must be signed in to change notification settings - Fork 928
request.auth == null even if user is authenticated (firestore) #4996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
I have found the same issue. I have found the issue when using Chrome and Android browsers, however, the issue isn't present when using Firefox. The issue is present from Firebase version 8.6.2 onwards. Requests are missing the Authorization query paramenter. |
Thx. setting firebase to 8.3.0 fixed it as a workaround. |
Hi @Tommertom, thanks for the report. I will mark this as a duplicate of #4990, since both issues are having similar versions of AngularFire and errors related to Firestore security rules. |
Hi,
I like to open a ticket related to the error message reported in #1491
Error in console.log:
Running
NodeJS : v14.16.0 (C:\Program Files\nodejs\node.exe)
npm : 7.6.3
OS : Windows 10
Chrome Version 91.0.4472.77 (Official Build) (64-bit)
Firebase Auth, Firestore
Versions in cli:
Getting above mentioned error trying to access data in firestore - using a simple starter app to access data in firestore
Firestore rules:
High level flow - user authentication using Facebook login (via Firebase) and then a simple query on a collection in the store.
If I change the rules to say:
allow read,write: if true;
orallow read,write: if request.auth==null;
all works fine. If I transplant the angular code of this small project into a copy of a production app, the code works fine (full swap contents of
src
folder): after login, the query delivers the requested data.With these two experiments I assume to have demonstrated an issue with the dependencies related to angular, angularfire and or the firebase sdk - most likely firebase given the things mentioned in #1491 and the fact that angualar/angularfire only wraps the firebase js sdk. But I could be wrong of course.
package.json for the project which gives errors:
package.json from the production app (which works, also with the simple code):
The text was updated successfully, but these errors were encountered: