From a380cf25647fc66aa23180daa08929d079a70e32 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Wed, 15 Oct 2014 14:26:34 -0700 Subject: [PATCH] add oauth strategies back in --- app.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app.js b/app.js index 5ea5275cf40..1ef1428a4c7 100644 --- a/app.js +++ b/app.js @@ -186,6 +186,26 @@ app.get('/auth/twitter', passport.authenticate('twitter')); app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/login' }), function(req, res) { res.redirect(req.session.returnTo || '/'); }); +app.get('/auth/instagram', passport.authenticate('instagram')); +app.get('/auth/instagram/callback', passport.authenticate('instagram', { failureRedirect: '/login' }), function(req, res) { + res.redirect(req.session.returnTo || '/'); +}); +app.get('/auth/facebook', passport.authenticate('facebook', { scope: ['email', 'user_location'] })); +app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/login' }), function(req, res) { + res.redirect(req.session.returnTo || '/'); +}); +app.get('/auth/github', passport.authenticate('github')); +app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { + res.redirect(req.session.returnTo || '/'); +}); +app.get('/auth/google', passport.authenticate('google', { scope: 'profile email' })); +app.get('/auth/google/callback', passport.authenticate('google', { failureRedirect: '/login' }), function(req, res) { + res.redirect(req.session.returnTo || '/'); +}); +app.get('/auth/linkedin', passport.authenticate('linkedin', { state: 'SOME STATE' })); +app.get('/auth/linkedin/callback', passport.authenticate('linkedin', { failureRedirect: '/login' }), function(req, res) { + res.redirect(req.session.returnTo || '/'); +}); /** * OAuth authorization routes for API examples.