getCurrentUser returning null with Nuxt SSR & Emulator #1404
Unanswered
timdiacon
asked this question in
Questions and Help
Replies: 2 comments
-
Same issue here |
Beta Was this translation helpful? Give feedback.
0 replies
-
I had the same problem and I was able to fix the issue by setting up my service account |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a profile collection where the id of each doc matches the user uid - I am trying to populate a Pinia store with the profile via the following nuxt plugin:
When I run this locally using a staging firebase project and providing a service worker via the GOOGLE_APPLICATION_CREDENTIALS env var it all works as expected. However when I run it locally using the emulator
getCurrentUser
is returning null on the server but then populating as expected on the client.I also get the following error in the console log:
Unknown Error verifying session cookie Failed to determine project ID: Error while making request: getaddrinfo
I'm unsure whether this is a bug, an issue with SSR / Emulator support or me doing something wrong.
Any advice on whether there is a better way to make the user profile available across the application also welcome :-)
Beta Was this translation helpful? Give feedback.
All reactions