Token. How to determine the time to refresh the token?

As far as I understand, using the accesstoken , you can transfer to it the value obtained from the Unix timestamp . The output is something like json - "expires_in": 1502305985425 . How can I determine what has passed, for example, 10 minutes? Somehow to take away the value recorded in the accesstoken from the current one?

If there are JWT tools for this, it’s perfect. Thank!

  • Where you need to check the token, take the current timestamp and compare it with that in expires_in. If the current expires_in then the token is dead. - EatMyDust
  • @EatMyDust, well, I thought so somewhere. Thank! Push as an answer - I will note - HegoJune

1 answer 1

Where you need to check the token, take the current timestamp and compare it with that in expires_in. If the current expires_in, then the token is dead.