bradtraversy / node_passport_login

Node.js login, registration and access control using Express and Passport
1.74k stars 1.29k forks source link

Really new to backend languages. #61

Open PopAsPop opened 4 years ago

PopAsPop commented 4 years ago

I would like to add more entries to Mongo DB than email, pass and username...I tried everything...changed register.ejs and users.js...It simply won't take new key: value pairs...Thanks for the help i advance :)

bradenmitchell commented 4 years ago

First, you need to update the User model to also carry those fields. Then you also need to update the route handling the POST request to '/register' so that it adds those fields into the constructor when creating the new user.

I would advise watching one of Brad's other backend tutorials on YouTube, or his node.js course on Udemy. This is all covered.