Skip to content

RTDB security rule auth variable is null after refreshed a page #2861

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

Closed
Mocsa1974 opened this issue Jun 11, 2021 · 4 comments
Closed

RTDB security rule auth variable is null after refreshed a page #2861

Mocsa1974 opened this issue Jun 11, 2021 · 4 comments

Comments

@Mocsa1974
Copy link

I am using angular 12, firebase 8.6.7 and angular fire 6.1.5
After sign in into firebase with angularfireauth signinwithcustomtoken method which was created with admin sdk createCustomToken method. Everything works fine.
After refresh a page onAuthStateChanged triggers with a sign in user credentials as expected, but when getting some data from rtdb i got a permission denied error message (Client doesn't have permission to access the desired data)
When i changed my code to firebase-js-sdk (without angular fire) everything works fine after page refresh.

Thanks

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@amjadyahya1
Copy link

I'm facing the same issue here, it drives me crazy, I'm using signInWithEmailAndPassword though.

After long period of testing I have noticed that triggering sign in more than once in the same session fixes the problem, I mean the first time fails and the subsequent times succeeds.

@amjadyahya1
Copy link

amjadyahya1 commented Jun 15, 2021

Solution here: #2864 (comment)

@jamesdaniels
Copy link
Member

This was addressed, it was a bug in the JS SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants