Skip to content

Commit

Permalink
Emit token expiry event 10s earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
armab authored Jun 21, 2019
1 parent ebe4e43 commit 3a36fe3
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 @@ -189,7 +189,7 @@ module.exports = function (opts) {
}
this._expiryTimeout = setTimeout(function () {
this.emit('expiry', token);
}.bind(this), new Date(token.expiry) - new Date() - 1000);
}.bind(this), new Date(token.expiry) - new Date() - 10 * 1000);
return token;
}.bind(this));
}
Expand Down

0 comments on commit 3a36fe3

Please sign in to comment.