Skip to content
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

getValidIdToken and getValidCustomToken return old server token on subsequent calls #291

Closed
mfellner opened this issue Dec 4, 2024 · 2 comments · Fixed by #290 · May be fixed by #278
Closed

getValidIdToken and getValidCustomToken return old server token on subsequent calls #291

mfellner opened this issue Dec 4, 2024 · 2 comments · Fixed by #290 · May be fixed by #278

Comments

@mfellner
Copy link

mfellner commented Dec 4, 2024

getValidIdToken and and getValidCustomToken only return the fresh token once, immediately after refreshing. Otherwise the functions return the argument serverIdToken or serverCustomToken which is likely the original, expired token. This is because internally the expiry check happens against the cached, fresh token.

Should be fixed by #290

@SebaRiccardo
Copy link

I am having the same issue, and it took me a while to realize that the library was the problem, not my code. It was driving me crazy.

@awinogrodzki
Copy link
Owner

Hey @mfellner @SebaRiccardo!

I have merged the PR into canary branch. Thanks so much for help with this @mfellner!

The fix should be available in next-firebase-auth-edge@1.9.0-canary.2.

Let me know how it works :-)

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