nearform / fast-jwt

Fast JSON Web Token implementation

Home Page:https://nearform.github.io/fast-jwt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Support time in string format similar to jsonwebtoken

rubiin opened this issue ยท comments

expiresIn: expressed in seconds or a string describing a time span vercel/ms.

Eg: 60, "2 days", "10h", "7d". A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default ("120" is equal to "120ms").

This will improve the DX as we dont have to convert the time to ms everytime manually

cc: Fastify jwt uses https://github.com/lukeed/ms underneath

๐ŸŽ‰ This issue has been resolved in version 3.2.0 ๐ŸŽ‰

The release is available on:

Your optic bot ๐Ÿ“ฆ๐Ÿš€