I want to remove 'iat' option from header for the creation of correct request to the external server. I've tried to do something like this
let token = jwt.sign(
{payload: payload, iat: undefined},
generateAndGetDeviceKey(),
{ algorithm: 'HS512' }
);
but it doesn't work. I got error
Uncaught (in promise) Error: "iat" should be a number of seconds
You can pass the noTimestamp option, which will prevent adding iat.
Something like this should work.
let token = jwt.sign(
{payload: payload},
generateAndGetDeviceKey(),
{ algorithm: 'HS512', noTimestamp: true }
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With