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",
|
||||
"dependencies": {
|
||||
"jsonwebtoken": "^5.7.0",
|
||||
"jsonwebtoken": "^7.3.0",
|
||||
"xtend": "~4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -38,7 +38,7 @@ exports.start = function (options, callback) {
|
||||
};
|
||||
|
||||
// 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});
|
||||
});
|
||||
|
@ -38,7 +38,7 @@ exports.start = function (callback) {
|
||||
};
|
||||
|
||||
// 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});
|
||||
});
|
||||
|
Reference in New Issue
Block a user