mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
changed on server
This commit is contained in:
@ -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();
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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_',
|
||||
|
@ -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) {
|
||||
});
|
||||
});
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user