-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot set property 'user' of undefined #5
Comments
Hm, that is curious. It looks like the Passport session isn't being initialized. Are you using the default (memory) session store? |
Idk I followed the tutorial/copied the repo pretty exactly. Where does one set the type of memory session? |
I also get this error regarding |
Did anyone figure out a solution to this issue? I'm running into the same thing and not making any headway on it ... |
res.login in the UserController is not constructed properly - commented out are 2 examples of how to properly pass the required User, Object and callback Function to passport/index.js. In UserController.js CHANGE TO |
I need Help 👍 |
TypeError: Cannot set property 'user' of undefined at /Users/matthewlinford/Desktop/Positive_Learning/ell-admin/api/hooks/passport/index.js:160:31 at pass (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/node_modules/passport/lib/authenticator.js:267:43) at serialized (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/node_modules/passport/lib/authenticator.js:276:7) at /Users/matthewlinford/Desktop/Positive_Learning/ell-admin/api/hooks/passport/index.js:66:6 at pass (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/node_modules/passport/lib/authenticator.js:284:9) at Authenticator.serializeUser (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/node_modules/passport/lib/authenticator.js:289:5) at req.login.req.logIn (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/api/hooks/passport/index.js:155:26) at afterVerifyingCredentials (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/api/responses/login.js:119:10) at Strategy.strategy.success (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/node_modules/passport/lib/middleware/authenticate.js:201:18) at verified (/Users/matthewlinford/Desktop/Positive_Learning/ell-admin/node_modules/passport-local/lib/strategy.js:83:10) at /Users/matthewlinford/Desktop/Positive_Learning/ell-admin/api/responses/login.js:93:12
I get the above error whenever I try to login. I haven't meddled with the hook you wrote. Any ideas on what might be causing this?
The text was updated successfully, but these errors were encountered: