-
Notifications
You must be signed in to change notification settings - Fork 927
FirebaseServerApp could not login user with provided authIdToken in Emulator #8347
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
Hi @caestrada, I believe your issue is due to the app awaiting There is a window to configure the Auth emulator with use of So my suggestion is to connect your emulator immediately following the call to Something like this:
Also, is there a reason for this statement in
Any asynchronous request (in this case In short, call |
Hey @DellaBitta, that did it! Thanks! 🎉 As for the Thanks again for the quick response and solution. Kudos to the team for App Hosting, Data Connect and Genkit. Game changer! |
Thanks! I'll close this issue. Let us know if anything else pops up! |
Operating System
N/A
Browser Version
N/A
Firebase SDK Version
10.12.2
Firebase SDK Product:
Auth
Describe your project's tooling
Next.js using TypeScript using App Hosting.
Describe the problem
When using the Emulator and initializing server side with
initializeServerApp
,getAuth
returnsnull
. Client side initializing and retrieval of auth instance withgetApps
works as expected.Server side is dependent on a service worker appending a token to the header. This process is working as expected. Only problem seems to be server side never returning an accurate auth instance.
Note: This issue only occurs when using the Emulator. When running directly against the firebase server, everything works fine.
Server Error:
Steps and code to reproduce issue
Service Worker
Here is the
fetch
event listener in the service worker and relevant methods. Notice that I configure the emulator in the service worker so that a valid token is added to header. THIS CODE IS WORKING AS EXPECTED.Server Code
Here is the initialization server side. NOTE the
NULL IS RETURN HERE
comment.The text was updated successfully, but these errors were encountered: