Skip to content

Commit

Permalink
docs: comment explaining max expiration time for JWT
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Nov 24, 2018
1 parent 37f84a4 commit 1b8d064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/get-signed-json-web-token.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function getSignedJsonWebToken ({ id, privateKey }) {
const now = Math.floor(Date.now() / 1000)
const payload = {
iat: now, // Issued at time
exp: now + 60, // JWT expiration time
exp: now + 60, // JWT expiration time (10 minute maximum)
iss: id
}
const token = jsonwebtoken.sign(payload, privateKey, { algorithm: 'RS256' })
Expand Down

0 comments on commit 1b8d064

Please sign in to comment.