mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
[next] Fix skew tolerance to token expiration. (#2356)
This commit is contained in:
@@ -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;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user