From 4ce584836b5f2cc803f050686e0e047cdbe23318 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:56:51 +0800 Subject: [PATCH] no longer check expire when verify token --- src/plugins/apiauth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/apiauth.ts b/src/plugins/apiauth.ts index 027e764..b9b01db 100644 --- a/src/plugins/apiauth.ts +++ b/src/plugins/apiauth.ts @@ -37,7 +37,7 @@ const apiAuthPlugin: FastifyPluginAsync = async function (fastif return reply.send({ errcode: 11, errmsg: 'need login' }) } //@ts-ignore - const data = this.jwt.verify(request.token) + const data = this.jwt.verify(request.token, { ignoreExpiration: true }) if (!data || !data.id) { return reply.send({ errcode: 10, errmsg: 'need login' }) }