jaredhanson / passport-openid

OpenID authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-openid/?utm_source=github&utm_medium=referral&utm_campaign=passport-openid&utm_content=about
MIT License
98 stars 85 forks source link

Example not working with Express v4.x #31

Closed AntouanK closed 9 years ago

AntouanK commented 9 years ago

Hi.

The example you have in the repo, needs express v3.x in order to work. API has changed in v4.

Should I make a PR to change that line?

Also, I don't see how the example works. After giving a name, I get an error at http://localhost:3000/auth/openid

InternalOpenIDError: Failed to discover OP endpoint URL
   at /Users/antouank/_REPOS_/passport-openid/examples/signon/node_modules/passport-openid/lib/passport-openid/strategy.js:249:52
   at /Users/antouank/_REPOS_/passport-openid/examples/signon/node_modules/passport-openid/node_modules/openid/openid.js:874:14
   at /Users/antouank/_REPOS_/passport-openid/examples/signon/node_modules/passport-openid/node_modules/openid/openid.js:664:13
   at /Users/antouank/_REPOS_/passport-openid/examples/signon/node_modules/passport-openid/node_modules/openid/openid.js:620:11
   at ClientRequest.<anonymous> (/Users/antouank/_REPOS_/passport-openid/examples/signon/node_modules/passport-openid/node_modules/openid/openid.js:266:12)
   at emitOne (events.js:77:13)
   at ClientRequest.emit (events.js:166:7)
   at Socket.socketErrorListener (_http_client.js:254:9)
   at emitOne (events.js:77:13)
   at Socket.emit (events.js:166:7)
jaredhanson commented 9 years ago

I've moved the example, which is now pegged to Express 3.x here: https://github.com/passport/express-3.x-openid-example

The error you report indicates that the OpenID identifier you used was not valid.