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

openid 0.5.6 Breaks passport-openid #26

Closed kopertop closed 9 years ago

kopertop commented 10 years ago

Trying with a fresh install, npm installs openid 0.5.6, which breaks Passport-openid (at least when used with passport-google). It looks like there might be something called twice with openid, which returns an error first, then the successful message, but the error happens first so that causes login to fail.

Here's the traceback:

Failed to verify assertion (message: No providers were discovered for the claimed identifier)
at /var/app/current/node_modules/passport-google/node_modules/passport-openid/lib/passport-openid/strategy.js:184:36
at /var/app/current/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:1061:12
at /var/app/current/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:1148:14
at /var/app/current/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:678:7
at /var/app/current/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:544:16
at done (/var/app/current/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:254:9)
at IncomingMessage.<anonymous> (/var/app/current/node_modules/passport-google/node_modules/passport-openid/node_modules/openid/openid.js:258:32)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:910:16
at /var/app/current/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31

Changing package.json to require openid 0.5.5 fixes this issue.

kopertop commented 10 years ago

It looks like this should fix it, so 0.5.7 would work too:

https://github.com/havard/node-openid/issues/118

kopertop commented 10 years ago

Correction, 0.5.7 still does not work.

kopertop commented 10 years ago

openid version 0.5.8 does fix this issue: https://github.com/havard/node-openid/issues/119

I would suggest having this package specifically require a version so these errors don't pop up again (0.5.8 should work).

jaredhanson commented 9 years ago

Published package which requires openid@1.x.x to npm as passport-openid@0.4.0.