Open MubashirSakhi opened 8 years ago
http://stackoverflow.com/a/11784742/1431224
There's a passReqToCallback option that you can enable, like so:
passport.use(new LocalStrategy( {usernameField: 'email', passReqToCallback: true}, function(req, email, password, done) { // now you can check req.body.foo } ));
When, set req becomes the first argument to the verify callback, and you can inspect it as you wish.
i have a model with properties email, password, contact and name. What should i do? do i just use email and password to authenticate/ if yes then what about other paramters?