Skip to content

Commit

Permalink
prefer maxAge
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Jun 19, 2023
1 parent f280ed5 commit d3e0aad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/custom-session-jwt/keystone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ async function jwtSign(claims: OurJWTClaims) {
jwtSessionSecret,
{
algorithm: 'HS256', // HMAC-SHA256

// we use an expiry of 1 hour for this example
expiresIn: '1 hour',
},
(err, token) => {
if (err) return reject(err);
Expand All @@ -41,6 +38,7 @@ async function jwtVerify(token: string): Promise<OurJWTClaims | null> {
jwtSessionSecret,
{
algorithms: ['HS256'],
maxAge: '1h', // we use an expiry of 1 hour for this example
},
(err, result) => {
if (err || typeof result !== 'object') return resolve(null);
Expand Down

0 comments on commit d3e0aad

Please sign in to comment.