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();
}
};
};
};

View File

@ -2,7 +2,7 @@ module.exports = {
development: {
root: require('path').normalize(__dirname + '/..'),
debug: true,
database: 'mongodb://biomed.akira.gs/biomed_devel2',
database: 'mongodb://wootbox.wootroot.me/biomed_devel2',
auth: {
clientId: '223145213165.apps.googleusercontent.com',
clientSecret: '8MRNar9E_pRTOGTQonPzYOW_',

View File

@ -16,7 +16,7 @@ module.exports = function(passport, config) {
passport.use(new GoogleStrategy({
clientID: config.auth.clientId,
clientSecret: config.auth.clientSecret,
callbackURL: config.auth.callback
// callbackURL: config.auth.callback
},
function(accessToken, refreshToken, profile, done) {
console.log(profile);
@ -52,4 +52,4 @@ module.exports = function(passport, config) {
});
});
}));
}
}