[next] Fix skew tolerance to token expiration. (#2356)

This commit is contained in:
Diego Chavão
2019-06-13 20:30:09 +02:00
committed by Vinh
parent 662f5ce314
commit 5311681333
+1 -1
View File
@@ -24,7 +24,7 @@ export function parseJWT(token: string, skewTolerance = 300): JWT {
header,
payload,
get expired() {
return Date.now() / 1000 - skewTolerance >= payload.exp;
return Date.now() / 1000 + skewTolerance >= payload.exp;
},
};
}