added facebook email permission to route /auth/facebook
parent
378760377b
commit
ddda818e69
10
app.js
10
app.js
|
@ -59,7 +59,15 @@ app.get('/api/foursquare', passportConf.ensureAuthenticated, api.foursquare);
|
||||||
app.get('/contact', contact.getContact);
|
app.get('/contact', contact.getContact);
|
||||||
app.post('/contact', contact.postContact);
|
app.post('/contact', contact.postContact);
|
||||||
|
|
||||||
app.get('/auth/facebook', passport.authenticate('facebook'));
|
app.get('/auth/facebook', passport.authenticate('facebook', {
|
||||||
|
scope: [
|
||||||
|
'email'
|
||||||
|
]
|
||||||
|
}), function(req, res) {
|
||||||
|
// The request will be redirected to Facebook for authentication, so this
|
||||||
|
// function will not be called.
|
||||||
|
});
|
||||||
|
|
||||||
app.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: '/', failureRedirect: '/login' }));
|
app.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: '/', failureRedirect: '/login' }));
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue