The existing token expiration check example in /refresh-token compares the current timestamp to the token's countdown timer (expires_in) rather than the expiration timestamp (expires_at).
This PR fixes that issue and simplifies the comparison by using Date.now() to get the current timestamp.
The existing token expiration check example in
/refresh-token
compares the current timestamp to the token's countdown timer (expires_in
) rather than the expiration timestamp (expires_at
).This PR fixes that issue and simplifies the comparison by using
Date.now()
to get the current timestamp.