title: Passport w/node.js Google error
body: <p>I'm attempting to use passport with an express/node.js app. For some reason I can't authenticate using google. Google gives the following error:</p>
  
  <p>Error: invalid_request<br>
  Error in parsing the OpenID auth request.</p>
  
  <pre><code>Code:
  
      passport.serializeUser(function(user, done) {
    done(null, user.id);
  });
  
  passport.deserializeUser(function(user, done) {
    done(null, user);
  });
  
  var GoogleStrategy = require('passport-google').Strategy;
  var UserModel = require('./models/usermodel');
  
  passport.use(new GoogleStrategy({
      returnURL: 'http://localhost:3000/auth/google/return',
      realm: 'http:/localhost:3000'
    },
    function(identifier, profile, done) {
      profile.email = profile.emails[0].value;
      UserModel.findOneAndUpdate({email:profile.email}, {$set:profile, $inc:{logins:1}}, {upsert:true}, done);
    }
  ));
  </code></pre>