no longer check expire when verify token

This commit is contained in:
CounterFire2023 2024-02-18 14:56:51 +08:00
parent 9bcd9168ab
commit 4ce584836b

View File

@ -37,7 +37,7 @@ const apiAuthPlugin: FastifyPluginAsync<ApiAuthOptions> = 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' })
}