// install dependency jwt using command npm install jsonwebtoken at your folder terminal // import it in your app.js // Use this code in file in which you are saving user to database or you are receiving result of successfully registered user . in my case am getting result from Indexcontroller (You can make your own controller to save data) ===================================================================== //API to register new User with jWT Token import jwt from 'jsonwebtoken'; router.post("/register",(req,res)=>{ IndexController.registerUser(req.body).then((result)=>{ let jwttoken; jwttoken = jwt.sign({ _id: result._id, email: result.email },"8Zzvasu5tw0Ionm3XPZZfN0NOml3z9FMfmpgXwovR9fp6ryDIoGRM8EPHAB6iHsc0fb",{ expiresIn: "1h" }); res.status(201).json({success: true,data: { _id: result._id, email: result.email, jwttok...