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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)