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

Steam OpenID Internal OpenID Error #1

Closed Akkuma closed 12 years ago

Akkuma commented 12 years ago

Here is what I'm getting passed back to me while using the Steam OpenID and I console log out the callback/next for authenticate. I've used Google OpenID and it is working fine.

{ name: 'InternalOpenIDError',
     message: 'Failed to discover OP endpoint URL',
     openidError: { message: 'No usable providers found for the given identifier' } } }

Additionally, when I'm debugging I'm getting this error from within node-openid:

error: 'Associations not supported'
error_code: 'unsupported-type'
ns: 'http://specs.openid.net/auth/2.0'

It is detecting the correct endpoint and while debugging using node-inspector node-openid's post never seems to complete, which maybe the root problem.

I just recently reported this problem directly to node-openid and I'm linking up the two issues: https://github.com/havard/node-openid/issues/72

UncommonAvenue commented 12 years ago

I ran into this same problem. The issue is that Steam is a stateless OpenID server so you have to make a stateless OpenID request. This is pretty easy, see the example below. You also have to set a realm including all subdomains or it won't work either.

I just forked the passport-steam library and made these changes. You can check it out at https://github.com/UncommonAvenue/passport-steam

Example:

passport.use(new OpenIDStrategy({ returnURL: 'http://localhost:3000/auth/openid/return', realm: 'http://localhost:3000/', stateless: true },

indranipinks commented 6 years ago

We have a Node.js application hosted on Bluemix. It uses IBM Tivoli Federated Identity Manager as the authentication service and uses OpenID. We use passport-ibm Node module at the backend for this. The authentication used to work properly till last week. But suddenly it stopped working and is throwing error even before showing the login screen.

Here is the stack trace: 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR InternalOpenIDError: Failed to discover OP endpoint URL 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at ClientRequest. (/home/vcap/app/node_modules/passport-ibm/node_modules/passport-openid/node_modules/openid/openid.js:266:12) 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at TLSSocket.socketErrorListener (_http_client.js:269:9) 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at TLSSocket.emit (events.js:169:7) 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at /home/vcap/app/node_modules/passport-ibm/node_modules/passport-openid/lib/passport-openid/strategy.js:249:52 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at /home/vcap/app/node_modules/passport-ibm/node_modules/passport-openid/node_modules/openid/openid.js:664:13 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at /home/vcap/app/node_modules/passport-ibm/node_modules/passport-openid/node_modules/openid/openid.js:620:11 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at emitOne (events.js:77:13) 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at /home/vcap/app/node_modules/passport-ibm/node_modules/passport-openid/node_modules/openid/openid.js:874:14 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at emitOne (events.js:77:13) 2017-11-20T16:07:42.50+0530 [APP/PROC/WEB/0]ERR at ClientRequest.emit (events.js:169:7)

I googled the issue and found one solution is to use - 'stateless:true' attribute but that also didn't help.

Our entire production is down because clients cannot go past the authentication and hence cannot access the application. Can you please suggest something?