Skip to content

Commit

Permalink
Merge pull request #99 from TimoGlastra/fix/token-exp
Browse files Browse the repository at this point in the history
fix: token expiry
  • Loading branch information
nklomp authored Mar 13, 2024
2 parents b054c24 + fb641b5 commit 1919f50
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 1919f50

Please sign in to comment.