The Jwt.prototype.setIssuedAt() and .setExpiration() functions are both time-related, but take in three separate arguments of inconsistent types. IssuedAt only takes in an integer representing seconds, while Expiration can take an integer representing milliseconds, or a Date object. Can you make these arguments consistent?
njwt.create(...)
.setIssuedAt(seconds)
.setExpiration(date or milliseconds);
The Jwt.prototype.setIssuedAt() and .setExpiration() functions are both time-related, but take in three separate arguments of inconsistent types. IssuedAt only takes in an integer representing seconds, while Expiration can take an integer representing milliseconds, or a Date object. Can you make these arguments consistent?
IssuedAt: https://github.com/jwtk/njwt/blob/ce98cd49a9381330cd7daa2250b817a59b134e56/index.js#L182-L185 https://github.com/jwtk/njwt/blob/ce98cd49a9381330cd7daa2250b817a59b134e56/index.js#L155-L157 https://github.com/jwtk/njwt/blob/ce98cd49a9381330cd7daa2250b817a59b134e56/index.js#L38-L40
Expiration: https://github.com/jwtk/njwt/blob/ce98cd49a9381330cd7daa2250b817a59b134e56/index.js#L188