Hello! Trying to implement authentication in a project with mongoose, had a mongoose REST interface (just for GET and POST), and it turned to a shit show. Followed this tutorial and anticipated I would need to config some stuff for it to play together, fixed some easy stuff but now I'm stuck.my code without frontend: https://github.com/pellehardstedt/need-helpthe tutorial: https://bezkoder.com/node-js-mongodb-auth-jwt/I get the error "Illegal arguments: undefined, string" from bcrypt.hashSync (in "/auth/verifySignup.js") when I try to sign up via "/api/auth/signup" with POST. But not when I try to sign in.Tried to debug, is there anything wrong with the sequence of everything in "index.js"?Boiled it down to that I cant figure out why I cant read the body of the request in "/controllers/auth.controllers.js" at line 68.I know this is super messy but would really appreciate help
Submitted June 16, 2020 at 10:06AM by per_ri-sol_ju
No comments:
Post a Comment