elysiajs / elysia-jwt

Plugin for Elysia for using JWT Authentication
MIT License
38 stars 16 forks source link

bug sign args exp type #23

Open PandaWorker opened 6 months ago

PandaWorker commented 6 months ago

jwt.sign exp type = number | undefined

jwt.sign exp is of type number | undefined

and jose takes number | string | Date

image
PandaWorker commented 6 months ago

It would be more correct to specify it as the second argument

jwt.sign({sub: '1'}, {exp: '1d'});