So, seems like if payload has an iat property, that gets used instead of an internal timestamp value in sign().
var timestamp = Math.floor(Date.now() / 1000);
if (!options.noTimestamp) {
payload.iat = payload.iat || timestamp;
}
However, later on, expiresIn is added to timestamp and not to payload.iat to determine exp. Seems to me that that is wrong, although will not matter in the majority of cases?
So, seems like if
payloadhas aniatproperty, that gets used instead of an internal timestamp value insign().However, later on,
expiresInis added totimestampand not topayload.iatto determineexp. Seems to me that that is wrong, although will not matter in the majority of cases?