Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: auth0/node-jsonwebtoken
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.6.0
Choose a base ref
...
head repository: auth0/node-jsonwebtoken
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.6.2
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 16, 2016

  1. Copy the full SHA
    7f7d76e View commit details
  2. 5.6.1

    jfromaniello committed Feb 16, 2016
    Copy the full SHA
    06d8209 View commit details
  3. 5.6.2

    jfromaniello committed Feb 16, 2016
    Copy the full SHA
    1959404 View commit details
Showing with 2 additions and 2 deletions.
  1. +1 −1 index.js
  2. +1 −1 package.json
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ JWT.sign = function(payload, secretOrPrivateKey, options, callback) {
options.expiresInSeconds;

payload.exp = timestamp + expiresInSeconds;
} else if (typeof options.expiresIn !== 'undefined') {
} else if (typeof options.expiresIn !== 'undefined' && typeof payload === 'object') {
payload.exp = timespan(options.expiresIn);
if (typeof payload.exp === 'undefined') {
throw new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60');
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsonwebtoken",
"version": "5.6.0",
"version": "5.6.2",
"description": "JSON Web Token implementation (symmetric and asymmetric)",
"main": "index.js",
"scripts": {