correct exp claim in jwts

This commit is contained in:
May 2024-05-25 12:03:42 -07:00
parent eb981afe2e
commit ebcdd0c603

View file

@ -55,7 +55,7 @@ export async function getJwtId(jwt: string) {
export function makeJwt(_token: TokenResolvable) {
let token = resolve(_token)!
let jwt = new jose.SignJWT({
exp: token.expire || undefined,
exp: token.expire ? token.expire/1000 : undefined,
sub: token.account,
jti: token.id,
...(token.type != "User" ? { scope: token.scopes } : {})