Skip to content

Commit

Permalink
Merge pull request #75 from auth0/dschenkelman-patch-1
Browse files Browse the repository at this point in the history
Only set iat if there is none
  • Loading branch information
pose committed Apr 10, 2015
2 parents 634b8ed + 35036b1 commit e900282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports.sign = function(payload, secretOrPrivateKey, options) {

var timestamp = Math.floor(Date.now() / 1000);
if (!options.noTimestamp) {
payload.iat = timestamp;
payload.iat = payload.iat || timestamp;
}

var expiresInSeconds = options.expiresInMinutes ?
Expand Down

0 comments on commit e900282

Please sign in to comment.