Skip to content

Commit

Permalink
fix: token expiry
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed Mar 13, 2024
1 parent b054c24 commit fb641b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/issuer/lib/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ export const generateAccessToken = async (
): Promise<string> => {
const { accessTokenIssuer, alg, accessTokenSignerCallback, tokenExpiresIn, preAuthorizedCode } = opts
const iat = new Date().getTime()
const exp = iat + tokenExpiresIn
const jwt: Jwt = {
header: { typ: 'JWT', alg: alg ?? Alg.ES256K },
payload: {
iat,
exp: tokenExpiresIn,
exp,
iss: accessTokenIssuer,
...(preAuthorizedCode && { preAuthorizedCode }),
},
Expand Down

0 comments on commit fb641b5

Please sign in to comment.