Tutorial by Examples

Step one We need to create a service called jwToken. Go to api/services directory and create jwToken.js. 'use strict'; const jwt = require('jsonwebtoken'), tokenSecret = "secretissecret"; module.exports = { // Generates a token from supplied payload issue(payload) { ...
We need two dependencies: bcrypt for encryption npm install bcrypt --save JSON Web token npm install jsonwebtoken --save

Page 1 of 1