node js jwt how to pass token to other routes to check logged user information later node js jwt how to pass token to other routes to check logged user information later mongoose mongoose

node js jwt how to pass token to other routes to check logged user information later


Once your authorisation token is generated you need to send that token in all requests through client side.On the the server side you need to implement a authentication middleware in this you will check the authentication token. and process that request furthercheck this link How to use the middleware to check the authorization before entering each route in express?


Add User login token in to req.session.token then check it in jwt middle ware .