I need to find the seconds long my token (jwt) is. Normally my token returns 2 properties that indicate the creation and the expiration date:
"iat": 1622583091
"exp": 1622584891
Now I need to find the difference in seconds between those two dates. The first thing I did is convert those dates to a readable format:
const iat = new Date (1622583091 * 1000); /* Tue Jun 01 2021 15:40:16 GMT-0600 (Central Standard Time) */
const iat = new Date (1622584891 * 1000); /* Tue Jun 01 2021 16:10:16 GMT-0600 (Central Standard Time) */
Worse now I can't think of how I can evaluate those dates and get the seconds of difference.