-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
bug: auth emulator returns invalid custom token error #712
Comments
+1 on this, works when using an actual firebase instance, does not when switching to an emulator |
Hello ! I do not have such an error using the emulator but did you set both the code being tested and the test code to use the emulator ? I think I got the auth/invalid-custom-token error when forgetting to set one of them. |
I just ran into this same issue today with my unchanged login flow was working for around 2 hours then suddenly stopped working and has been this way for now over an hour - this is the error as shown in the Cypress test runner:
In my case we log in once and then store that session so we do not need to constantly log in as we were hitting firebase quotas, but at the start of each spec file we clear the stored sessions prior to logging in. Any suggestions would be most welcome as we have been using this package for months without issue! Cypress version 10.3 as well if that makes a difference as later versions have caused us issues with flaky tests - thanks! |
I observed the same behavior in my application. My host 127.0.0.1:3000 is connected with the emulator. cy.callFirestore('add', 'test_hello_world', { some: 'value' }); But cy.login() leads to the above error message... So I can't really test my web application. |
Haven't retested with the auth emulator recently, so I'll take a look back at this, thanks for the callout. As mentioned, pointing to a hosted auth instance should work fine with RTDB and Firestore emulators - this is actually what myself and team members are still doing in tests for multiple applications |
Seems to be a similar issue here: #421 |
Describe the bug
When I want to login to firebase via this command cy.login(uid), I will get an error which is coming form firebase.
Error:
Firebase: The custom token format is incorrect. Please check the documentation. (auth/invalid-custom-token).
The text was updated successfully, but these errors were encountered: