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
ID token docs say refreshes with 5 minutes buffer but seems to be 30 seconds #8165
Labels
Comments
anuraaga
added
new
A new issue that hasn't be categoirzed as question, bug or feature request
question
labels
Apr 15, 2024
jbalidiong
added
needs-attention
and removed
new
A new issue that hasn't be categoirzed as question, bug or feature request
labels
Apr 15, 2024
The 5 minutes is enforced by |
@renkelvin Do you mean Do you mean the server returns an expires_in in the response that is 5 minutes before the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Operating System
Any
Browser Version
Any
Firebase SDK Version
92e2279
Firebase SDK Product:
Auth
Describe your project's tooling
This report is based on examining the code in GitHub and not an actual direct usage. We noticed expired tokens being sent to our backend and investigated the code and found this.
Describe the problem
The documentation says that firebase ID tokens should be refreshed if they would expires within 5 minutes.
https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/core/user/id_token_result.ts#L31
But looking at the code that actually fetches, it appears to use a buffer that is 30s
https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/core/user/token_manager.ts#L49
Is this intended or is it missing a
0
accidentally?Steps and code to reproduce issue
We don't have a direct reproduction but notice expired tokens being sent to our backend (no request takes more than 5 minutes to process) and examined the code to see why it may be.
The text was updated successfully, but these errors were encountered: