We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Last time I used authenticate for login in the following manner:
router.post('/login', parserUrlEncodedTrue, (request, res, next) => { console.log('logging in user'); passport.authenticate('local', (err, user, info) => { var options = ""; if(err){ return next(err); } if(!user){ return res.json({ error: true, message: "User doesn't exist" }); } request.logIn(user, function(err) { if (err){ return next(err); } return res.json({ error: false, message: "Login Success" }); }); })(req, res, next);
Now I'm trying to use formidable.js and it works fine for registration but can't make it work with login.
let form = new formidable.IncomingForm(); form.parse(req, (err, fields, files) => { if(err){ helpers.errors(err, res); } else { passport.authenticate('local', (err, user, info) => {})(req, res, next); } });
passport.authenticate gets to req before it is parsed by formidable
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Last time I used authenticate for login in the following manner:
Now I'm trying to use formidable.js and it works fine for registration but can't make it work with login.
passport.authenticate gets to req before it is parsed by formidable
The text was updated successfully, but these errors were encountered: