title: ?What is the use of a proxy in passport google-oauth20 in nodejs?
body: <p>i write a authentication for weblog with pasport.js and i see a option , name is proxy.
  i search about this but i cat find a good asnwer.
  and i dont know whats this option use for.
  can someone explain this option for me?
  thank you.</p>
  <pre><code>const GoogleStrategy = require('passport-google-oauth20').Strategy;
  const user=require(&quot;./../models/users&quot;)
  // const mongoose = require('mongoose');
  // const keys = require('./keys');
  // Load user model
  //const User = mongoose.model('users');
  
   module.exports = function(passport){
    passport.use(
      new GoogleStrategy({
        clientID:'===================================================',
        clientSecret:'=================================================',
        callbackURL:'/auth/google/callback',
        proxy: true
      }, (accessToken, refreshToken, profile, done) =&gt; {
        // console.log(accessToken);
        // console.log(profile);
  
        const image = profile.photos[0].value.substring(0, profile.photos[0].value.indexOf('?'));
        
        const newUser = {
          googleID: profile.id,
          firstName: profile.name.givenName,
          lastName: profile.name.familyName,
          email: profile.emails[0].value,
          image: image
        }
  
        // Check for existing user
        User.findOne({
          googleID: profile.id
        }).then(user =&gt; {
          if(user){
            // Return user
            done(null, user);
          } else {
            // Create user
            new User(newUser)
              .save()
              .then(user =&gt; done(null, user));
          }
        })
      })
    );
  
    passport.serializeUser((user, done) =&gt; {
      done(null, user.id);
    });
  
    passport.deserializeUser((id, done) =&gt; {
      User.findById(id).then(user =&gt; done(null, user));
    });
  }
  </code></pre>