expiresIn jwt code example
Example 1: json web token npm global
$ npm install jsonwebtoken
Example 2: jwt expiresin
var token = jwt.sign({email_id:'[email protected]'}, "Stack", {
expiresIn: '24h' // expires in 24 hours
});
Example 3: jsonwebtoken
var jwt = require('jsonwebtoken');var token = jwt.sign({ foo: 'bar' }, 'shhhhh');