Added a bunch of stuff

This commit is contained in:
Dobie Wollert
2015-08-05 06:03:02 -07:00
parent b4e727c0e6
commit fdc8727044
35 changed files with 1815 additions and 276 deletions

View File

@ -15,8 +15,14 @@ module.exports = function(app, passport) {
});
app.get('/auth/callback', function(req, res, next) {
var callbackHost = req.headers['x-forwarded-host'];
if (!callbackHost) {
callbackHost = "localhost:9000";
}
var options = {
callbackURL: 'http://' + req.headers['x-forwarded-host'] + '/auth/callback'
callbackURL: 'http://' + callbackHost + '/auth/callback'
};
passport.authenticate('google', options, function(err, user, info) {
var redirectUrl = '/';