ValidationError: "expiresInMinutes" is not allowed NodeJs JsonWebToken
Ok I found that from https://www.npmjs.com/package/jsonwebtoken
You have to call expiresIn rather than expiresInMinutes.
var token = jwt.sign(user, req.app.get('jwtTokenSecret'), {
expiresIn : 60*60*24
});
Here the value of expiresIn
is measured in seconds rather than minutes, so the value has to be put in properly.
expiresInMinutes
was deprecated, you should use expiresIn: '1440m'
for instance