How to get user id using jwt token

I tried to get user id using jwt token .I got jwt token and sucessfully its verify.but its not return id it returns { iat: 1561463667 }

decode the JWT:

const decoded = jwt.verify(token, config.get('jwtPrivateKey'));   var userId =   console.log(decoded)   

I got this output:

{ iat: 1561463667 } 

Excepted output:

id :"*****************" 
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.