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
Firebase ID token has invalid signature #184
Comments
[Same as discussion #182] It's hard to tell what's going wrong here without a clear way to reproduce it, so please share more info or a reproduction, if possible. Here are a few things that might point you in the right direction:
Hope this helps. Please follow up if you figure out what's going on. |
Hi @kmjennison , i tried to print out the idToken from More infor about my .env.local
I also update the parser of privateKey in initAuth method
but still got the error. my current package.json
|
No, you shouldn't need anything in next.config.js. Please verify that the email and private key are for the same account, or try generating a new key: You might try clearing data/cookies for localhost in case you previously signed in with another Firebase account and still have auth cookies signed by another private key. If you haven't yet, try setting up your credentials in the example app just to be sure your app code isn't a problem. |
I was facing the same issue and turned it happens when I add Funny thing is it's not enough to properly setup local auth emulator just by adding it to env file or to the @kmjennison I feel like this can be further simplified, can't we just take the value from
|
@GorvGoyl The rationale for the duplication is that the Firebase emulator requires the environment variable. Meanwhile, I think it's confusing/limiting for Node packages to use environment variables (and definitely confusing for packages to set them), especially when a config object already exists–which is why there's a config option for it here. |
you saved my day <3. |
I still have this problem, has anyone found a way to solve it? |
I just solved it after a few mins of headscratching. There might be some other error for you but for me it was that I had formatted my privateKey wrong in the environment-file. . I was tricked (and I assume other will be as well) by the vercel cli upload example, i blame it on being tired.) WRONG CORRECT |
Closing this in favor of #232, given that the problem seems to be related to private key formatting. |
I've been fighting this issue all morning. Thank you so much! |
Here is my app and
env.local
initAuth.js
Error Message |
Now It works in Netlify. Didn't work In local . What a weird problem. #574 @kmjennison |
For me, the issue was because the environment variable: |
Describe the bug
After i logged in using email and password method, I got this error for every pages using
withAuthUser
.Do you guys have any ideas how to get rid of this issue? I run on localhost. Thanks a lot.
Version
Version: 0.13.1
Additional context
My source code:
/api/login.js
index.js
/lib/initAuth.js
The text was updated successfully, but these errors were encountered: