jsonwebtoken react code example
Example 1: npm package for jwt
$ npm install jwt-simple
Example 2: jsonwebtoken
jwt.sign({ exp: Math.floor(Date.now() / 1000) + (60 * 60), data: 'foobar'}, 'secret');
$ npm install jwt-simple
jwt.sign({ exp: Math.floor(Date.now() / 1000) + (60 * 60), data: 'foobar'}, 'secret');