jaredhanson / passport-local

Username and password authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-local/?utm_source=github&utm_medium=referral&utm_campaign=passport-local&utm_content=about
MIT License
2.74k stars 498 forks source link

Add extra field to login form #73

Closed nofear87 closed 10 years ago

nofear87 commented 10 years ago

How can i access the post data from the signup-form?

For example I will add a sur and a prename to the users profile:

newUser.local.email    = email;
newUser.local.password = newUser.generateHash(password);
newUser.local.prename = prename; //how can i get it from my form?
newUser.local.surname = surname;
newUser.role = false;
newUser.activated = false;
nofear87 commented 10 years ago

req.body.prename is the solution! thanks

simplenotezy commented 3 years ago

@nofear87 Wish you shared some code :D