paigen11/mysql-registration-passport

Its not a issue just need more info

Opened this issue · 0 comments

I was reading the article https://itnext.io/implementing-json-web-tokens-passport-js-in-a-javascript-application-with-react-b86b1f313436 Very good explain it step by step. I just want to now why req.logIn() is defined on line no 58 of api/routes/registerUser.js ?

Its getting attached with request object but where it is being called ?
Is it something defined and called in one step (foo(){...});
Code inside the logIn() can be wrote without function definition as that part is any how needs to be implemented at that point