O'Reilly logo
  • Ariel Francisco Pereira thinks this is interesting:

app.get('/oauth/facebook', passport.authenticate('facebook', { failureRedirect: '/signin' }));

From

Cover of MEAN Web Development - Second Edition

Note

In order to get the email from facebook, should be:

app.get('/oauth/facebook', passport.authenticate('facebook', {
scope: 'email',
failureRedirect: '/signin'
}));