How can I pass user data to the next function in Node.js?
I want to implement the function that checks if there is a token, verifies the token and grants access to the protected route but I dont know how to send user data to the next function. authController.js file - exports.protect…