ITADN

How to verify the created token?

#493ClosedShahadatAnik 创建于 2024-12-03
S
ShahadatAnikcommented
i am creating token using await signJWT for api and sending to the client. Now i want to verify the given token that i have created? How to do that in this library. I haven't found any funtion like that. ``` const payload = { uuid: value.uuid, username: value.name, email: value.email, can_access: value.can_access, exp: Math.floor(Date.now() / 1000) + 60 * 60 * 24, }; const token = await signJWT(payload, 'MY_PRIVATE_KEY'); ```
关闭于 2024-12-08 1 条评论