mirror of
https://github.com/Thream/socketio-jwt.git
synced 2024-07-21 09:38:31 +02:00
Fixed mocha tests by not using expiresInMinutes
Using `expiresInMinutes` leads to errors, as it was deprecated in `jsonwebtoken` > 5.7.0. We should use `expiresIn` instead.
This commit is contained in:
parent
4033483154
commit
250312152a
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsonwebtoken": "^5.7.0",
|
"jsonwebtoken": "^7.3.0",
|
||||||
"xtend": "~4.0.1"
|
"xtend": "~4.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -38,7 +38,7 @@ exports.start = function (options, callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// We are sending the profile inside the token
|
// We are sending the profile inside the token
|
||||||
var token = jwt.sign(profile, options.secret, { expiresInMinutes: 60*5 });
|
var token = jwt.sign(profile, options.secret, { expiresIn: 60*60*5 });
|
||||||
|
|
||||||
res.json({token: token});
|
res.json({token: token});
|
||||||
});
|
});
|
||||||
|
@ -38,7 +38,7 @@ exports.start = function (callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// We are sending the profile inside the token
|
// We are sending the profile inside the token
|
||||||
var token = jwt.sign(profile, options.secret, { expiresInMinutes: 60*5 });
|
var token = jwt.sign(profile, options.secret, { expiresIn: 60*60*5 });
|
||||||
|
|
||||||
res.json({token: token});
|
res.json({token: token});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user