I like to create JWT exp style style in Javascript. My jwt expression returns the expiration date of 1424984529. I am doing a test to expire a token using this:
if(jwt.exp < Date.now())) {
}
As when writing Date.now () gives me 1424941329632, and jwt.exp gives me 1424984529. Obviously, my test will always return true.
So my question is: how do I imitate jwt-style exp date in Javascript?
source
share