Github authentication routes and configuration

This commit is contained in:
Sahat Yalkabov
2013-12-03 17:43:16 -05:00
parent af32d85a2b
commit c7c1676a68

3
app.js
View File

@ -63,6 +63,9 @@ app.post('/contact', contact.postContact);
app.get('/auth/facebook', passport.authenticate('facebook', { scope: 'email' }));
app.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: '/', failureRedirect: '/login' }));
app.get('/auth/github', passport.authenticate('github'));
app.get('/auth/github/callback', passport.authenticate('github', { successRedirect: '/', failureRedirect: '/login' }));
app.get('/auth/google', passport.authenticate('google', { scope: 'profile email' }));
app.get('/auth/google/callback', passport.authenticate('google', { successRedirect: '/', failureRedirect: '/login' }));