This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Description
Environment details
google-auth-library version: 8.8.0
Issue
Since IdTokenClient extends OAuth2Client, it expected to respect eagerRefreshThresholdMillis value and fetch new idToken within 5 minute of expiry date by default.
Because current check is: (this.credentials.expiry_date || 0) < Date.now()
Ref: https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/idtokenclient.ts#L55
Steps to reproduce
- Create instance of
IdTokenClient with expiry_date
- It doesn't respect default
eagerRefreshThresholdMillis value i.e. 5 minutes before token is about to expire. Rather it fetches new token only after it's expired.
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!