I am authenticating user using oAuth2 which gives me expiry token.
The expiry token is for 3600 (which means one hour, as per oauth standard)
Now, when the token expire, I want to use refresh token to get new access token.
To see if the token have expired, I am thinking about storing the value of current Date.now() and the value of Date.now() after one hour.
THe problem is that date.now() gives value in long int i.e
let date = Date.now()
console.log(date)
Now, I am unable to comprehend how I can compare time here. Can somenone help me.