npm install jsonwebtoken
var jwt = require('jsonwebtoken');
var auth = {
id : id,
name : 'moin',
email : 'mastermoin409@gmail.com',
}
var token = jwt.sign({ authToken: auth }, 'shhh.....', {expiresIn : 1800});
'shhh.....' is private key or secret key of your application, it is normally string
1800 is token expiry time
More about API : https://github.com/auth0/node-jsonwebtoken
Thank you very much for this wonderful information. I hope so many people will be aware of it and helpful too. And please continue to update like this.
ReplyDeleteNode JS Online training
Node JS training in Hyderabad
best blog you shared thanks for uploaded this.
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course | Full Stack Training in Bangalore | Certification | Online Training Course | Full Stack Training in Hyderabad | Certification | Online Training Course | Full Stack Training in Pune | Certification | Online Training Course | Full Stack Training | Certification | Full Stack Online Training Course
thanks for sharing this post.am really happy while am seeing this post.thanks for updated.
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course | Full Stack Training in Bangalore | Certification | Online Training Course | Full Stack Training in Hyderabad | Certification | Online Training Course | Full Stack Training in Pune | Certification | Online Training Course | Full Stack Training | Certification | Full Stack Online Training Course
Thank you for sharing wonderful information with us to get some idea about it.
ReplyDeleteOracle OSB Training
OSB Online Training Hyderabad
osb certification training
soa training