changed on server

This commit is contained in:
Dobie Wollert
2013-07-19 02:38:07 -04:00
parent 4ca472f2cb
commit 1c2ba2737d
9 changed files with 69 additions and 12 deletions

View File

@ -8,7 +8,11 @@ module.exports = function(app, passport) {
]}));
app.get('/auth/callback', function(req, res, next) {
passport.authenticate('google', function(err, user, info) {
var options = {
callbackURL: 'http://' + req.headers['x-forwarded-host'] + '/auth/callback'
};
console.log(options);
passport.authenticate('google', options, function(err, user, info) {
var redirectUrl = '/';
if (err) { return next(err); }
@ -42,4 +46,4 @@ module.exports = function(app, passport) {
next();
}
};
};
};