Fixed jwtcount not being recognized
This commit is contained in:
parent
1cd3ebf8c5
commit
44830f08bc
|
@ -56,7 +56,7 @@ fastify.decorate('verifyJWT', function async(request, reply, done) {
|
||||||
.where('username', '=', decoded.payload.user)
|
.where('username', '=', decoded.payload.user)
|
||||||
.limit(1))[0].jwtcount;
|
.limit(1))[0].jwtcount;
|
||||||
|
|
||||||
if (decoded.payload.jwtcount < jwtcount || !decoded.payload.jwtcount) {
|
if (decoded.payload.jwtcount < jwtcount) {
|
||||||
fastify.log.error("Auth ended at jwtcount")
|
fastify.log.error("Auth ended at jwtcount")
|
||||||
done(new Error("JWT in no longer valid"))
|
done(new Error("JWT in no longer valid"))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue