Passport oauth2 Failed to obtain access token behind corporate proxy

Add following changes to oAuth2.js
var HttpsProxyAgent = require('https-proxy-agent');
if (process.env['https_proxy']) {
httpsProxyAgent = newHttpsProxyAgent(process.env['https_proxy']);
}
options.agent = httpsProxyAgent;
//ADD ABOVE SNIPPET BEFORE _executeRequest
this._executeRequest
ref: https://github.com/binario200/passport-social-auth
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s