The token response to compute the expiry for.
Optionalnow: number
The current time in milliseconds since the Unix epoch. Defaults to the time at which the helper is called.
The moment the access token expires.
A TypeError when expires_in is not a positive finite number. 0, negative, NaN, or Infinity values produce an already-expired or nonsensical expiry that breaks proactive-refresh scheduling without any visible error (and is one comparison-operator slip away from a refresh loop), so they are rejected instead.
Computes the absolute expiry time of a token response.
Combine this with refreshAccessToken to refresh proactively before the access token expires instead of waiting for a
401from the API.