-
Notifications
You must be signed in to change notification settings - Fork 484
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
login and sign up don't parse in module 3 #33
Comments
Weird, it works fine with signup and signout, but got a 500: Internal Server Error if I try logging in. |
Are you typing correct credentials ? @adaymuhajier |
nvm, got it working. just a minor typo @Ezdin |
While making post request to http://localhost:3000/auth/signup with username and password, I am getting redirected to /auth/failure and can't sign up. It may be because of an update. Can anybody tell me what changes should I make and in which files. |
@rshom mate, in what section would you put req.body.username?? |
@JeremyJamesG you would put it in your authenticate.js file. Specifically in your success and failure routes. Also, I had to change req.user to req.user.username to return a username. Otherwise, it was always null or undefined. Here's what it looked like after the changes
|
Due to an update in express, the login and signup won't parse properly. You have to use req.body.username instead of req.username. This also requires body-parser from npm.
Check out: http://expressjs.com/en/4x/api.html#req.body
The text was updated successfully, but these errors were encountered: