XeroAPI / xero-node-oauth2-app

NodeJS app for demonstrating the xero-node v4 SDK
MIT License
38 stars 43 forks source link

Fixed token expiration check example in /refresh-token #55

Closed neilrackett closed 4 years ago

neilrackett commented 4 years ago

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.