jaredhanson / passport-google

Google (OpenID) authentication strategy for Passport and Node.js.
MIT License
150 stars 80 forks source link

Cannot authorize while using behind a proxy #13

Open aishraj opened 11 years ago

aishraj commented 11 years ago

While running the signon example from a host behind a proxy, (as well as other programs), authentication fails as the connection times out. Here is the console log from the sigon example:

127.0.0.1 - - [Thu, 28 Feb 2013 01:56:12 GMT] "GET / HTTP/1.1" 200 224 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.12 Safari/537.31"
127.0.0.1 - - [Thu, 28 Feb 2013 01:56:13 GMT] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.12 Safari/537.31"
127.0.0.1 - - [Thu, 28 Feb 2013 01:56:15 GMT] "GET /login HTTP/1.1" 200 235 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.12 Safari/537.31"
127.0.0.1 - - [Thu, 28 Feb 2013 01:56:15 GMT] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.12 Safari/537.31"
Failed to discover OP endpoint URL (message: No providers found for the given identifier)
    at Strategy.authenticate (/home/dahal/temp/passport-google/examples/signon/node_modules/passport-google/node_modules/passport-openid/lib/passport-openid/strategy.js:249:52)
    at openid.authenticate (/home/dahal/temp/passport-google/examples/signon/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:850:14)
    at openid.discover.i (/home/dahal/temp/passport-google/examples/signon/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:638:13)
    at _resolveHostMeta (/home/dahal/temp/passport-google/examples/signon/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:604:11)
    at ClientRequest._get (/home/dahal/temp/passport-google/examples/signon/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:254:12)
    at ClientRequest.EventEmitter.emit (events.js:96:17)
    at CleartextStream.socketErrorListener (http.js:1436:9)
    at CleartextStream.EventEmitter.emit (events.js:96:17)
    at Socket.onerror (tls.js:1336:17)
    at Socket.EventEmitter.emit (events.js:126:20)

events.js:71
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: socket hang up
    at createHangUpError (http.js:1360:15)
    at ServerResponse.OutgoingMessage._writeRaw (http.js:507:26)
    at ServerResponse.OutgoingMessage._send (http.js:476:15)
    at ServerResponse.OutgoingMessage.write (http.js:740:18)
    at ServerResponse.OutgoingMessage.end (http.js:882:16)
    at ServerResponse.module.exports.res.end (/home/dahal/temp/passport-google/examples/signon/node_modules/express/node_modules/connect/lib/middleware/logger.js:147:13)
    at res.end (/home/dahal/temp/passport-google/examples/signon/node_modules/express/node_modules/connect/lib/middleware/session.js:281:15)
    at /home/dahal/temp/passport-google/examples/signon/node_modules/express/node_modules/connect/lib/middleware/session/memory.js:75:11
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

The problem seems to caused by an upstream issue perhaps with on of the passport dependencies.

nickmason commented 9 years ago

I ran into a similar problem, I ended up using global-tunnel to tunnel everything through our proxy.

mitermayer commented 9 years ago

whats the state of this issue ?