no longer check expire when verify token
This commit is contained in:
parent
9bcd9168ab
commit
4ce584836b
@ -37,7 +37,7 @@ const apiAuthPlugin: FastifyPluginAsync<ApiAuthOptions> = async function (fastif
|
|||||||
return reply.send({ errcode: 11, errmsg: 'need login' })
|
return reply.send({ errcode: 11, errmsg: 'need login' })
|
||||||
}
|
}
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const data = this.jwt.verify(request.token)
|
const data = this.jwt.verify(request.token, { ignoreExpiration: true })
|
||||||
if (!data || !data.id) {
|
if (!data || !data.id) {
|
||||||
return reply.send({ errcode: 10, errmsg: 'need login' })
|
return reply.send({ errcode: 10, errmsg: 'need login' })
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user