title: "Log In With PayPal" fails with connection reset?
body: <p>I have been attempting to use the <a href="https://github.com/jaredhanson/passport-oauth2" rel="nofollow">passport-oauth2</a> module to use the <a href="https://developer.paypal.com/docs/integration/direct/identity/log-in-with-paypal/" rel="nofollow">Log In With Paypal</a> service. At this point, I'm only working with the sandbox and not production (yet).  </p>
  
  <p>I am successfully using the <a href="https://github.com/jaredhanson/passport-google-oauth" rel="nofollow">passport-google-oauth</a> and <a href="https://github.com/jaredhanson/passport-amazon" rel="nofollow">passport-amazon</a> to authenticate with each of those services via oauth2.  Given this, I'm confused about what I'm doing wrong with PayPal.</p>
  
  <p>With PayPal, I can't get the sandbox to work at all. I get a login screen that takes credentials, but after entering them I am getting a connection reset error every time.  I have tried logging out of all PayPal sessions, closing browsers, etc.  Despite my client-side fiddling, I never make it back from PayPal to my callback.</p>
  
  <p>So...to the code!</p>
  
  <p>I have a configuration object for development:</p>
  
  <pre><code>"paypal" : {
      "clientID": "copied from the developer My REST Apps test credentials",
      "clientSecret" : "more copied test credentials",
      "callbackURL" : "https://localhost/auth/paypal/cb",
      "authorizationURL": "https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize",
      "tokenURL": "https://api.sandbox.paypal.com/v1/identity/openidconnect/tokenservice"
  }
  </code></pre>
  
  <p>And I have a little library that does this:</p>
  
  <pre><code>var PayPalStrategy = require('paypal-oauth2').Strategy;
  exports.paypalStrategy = function (conf) {
      // 'conf' is the configuration from the first code block
      return new PaypalStrategy({
              clientID: conf.clientID,
              clientSecret: conf.clientSecret,
              callbackURL: conf.callbackURL,
              authorizationURL : conf.authorizationURL,
              tokenURL: conf.tokenURL
          },
          function (accessToken, refreshToken, profile, done) {
            // we never get here because our connection is reset.           
          });
  };
  </code></pre>
  
  <p>And my routes are simple:</p>
  
  <pre><code>app.get('/auth/paypal',
      passport.authenticate('oauth2', {scope: 'profile'}),
      function (req, res) {}
  );
  
  app.get('/auth/paypal/cb',
      passport.authenticate('oauth2', { failureRedirect: '/login' }),
      function (req, res) {
          res.redirect('/profile');
      });
  </code></pre>
  
  <p>My guess is that I'm (a) getting something wrong with the endpoints or (b) I'm missing some step with the test account configuration on PayPal's dev site.  Sadly, I can't seem to find what I need in the docs.  Any help or guidance is appreciated.</p>