aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-15 11:33:26 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-15 11:33:26 +0200
commit9f8dcddf36d836c09c618845c90a2473421e7fbf (patch)
tree180f01fe356a35133f82c74a5a12157b42d87c4c
parentremoved logging (diff)
downloadDivid-9f8dcddf36d836c09c618845c90a2473421e7fbf.tar.gz
facebook now uses users.authCallback as callback, like it should.
-rw-r--r--routes.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/routes.js b/routes.js
index 7abe210..00a328e 100644
--- a/routes.js
+++ b/routes.js
@@ -36,10 +36,7 @@ module.exports = function(app, passport, auth) {
app.post('/test', users.signin);
app.get('/auth/facebook', passport.authenticate('facebook', { failureRedirect: '/test' }), users.signin);
-
- app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/test' }), function(req, res) {
- res.redirect('/dashboard');
- });
+ app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/test' }), users.authCallback);
app.get('/auth/twitter', passport.authenticate('twitter', { failureRedirect: '/test' }), users.signin);
app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/test' }), users.authCallback);