panva / paseto

PASETO (Platform-Agnostic SEcurity TOkens) for Node.js with no dependencies
MIT License
428 stars 26 forks source link

Not using ISO8601 Date Format #42

Closed frederikbosch closed 1 year ago

frederikbosch commented 1 year ago

What happened?

JSON.stringify does not use a valid ISO8601 date format.

Version

3.1.2

Node.js Version

18

Code to reproduce

const paseto = require('paseto')
const { V3: { sign } } = paseto;

await sign({ 'a' : 'b' }, privateKey, {'expiresIn': '1 year'});

Required

panva commented 1 year ago

Please be clearer about the issue and provide clear steps that reproduce and visualize it.

frederikbosch commented 1 year ago

Sorry @panva. On a second analysis, the swift-paseto package is not able to read the milliseconds. I was trying to verify a token generated by this package, in a iOS operating system.