exports.google = passport.authenticate('google', {
scope: ['https://www.googleapis.com/auth/plus.login', 'email', 'profile']
});
exports.googleCallback = passport.authenticate('google', {
failureRedirect: 'back', // if fail, where to go
failureFlash: 'Failed connect with Google!', // if fail, what to flash
successRedirect: '/account', // if success, where to go
successFlash: 'Google is now connected!' // if success, what to flash
});
exports.twitter = passport.authenticate('twitter', { scope: ['include_email=true'] });
exports.twitterCallback = passport.authenticate('twitter', {
failureRedirect: 'back', // if fail, where to go
failureFlash: 'Failed to connect with Twitter!', // if fail, what to flash
successRedirect: '/account', // if success, where to go
successFlash: 'Twitter is now connected!' // if success, what to flash
});
exports.facebook = passport.authenticate('facebook', { scope : ['email'] });
exports.facebookCallback = passport.authenticate('facebook', {
failureRedirect: 'back', // if fail, where to go
failureFlash: 'Failed connect with Facebook!', // if fail, what to flash
successRedirect: '/account', // if success, where to go
successFlash: 'Facebook is now connected!' // if success, what to flash
});