logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.64k stars 439 forks source link

bug: enterprise connector OIDC Issuer error #5485

Open sailwebs opened 7 months ago

sailwebs commented 7 months ago

Describe the bug


### Possible Causes
I change the code in this way, it will run correctly. 

packages/core/src/sso/OidcConnector/utils.ts
![image](https://github.com/logto-io/logto/assets/804734/3c49d4d0-9829-4326-a96a-f6ba359e1b4a)
const { body } = await got.get(`${issuer}/.well-known/openid-configuration`);
const result = oidcConfigResponseGuard.safeParse(parseJson(body));
xiaoyijun commented 7 months ago

@darcyYe Could you please confirm this issue when you have time?

darcyYe commented 7 months ago

Hi @sailwebs, thanks for letting us know about this issue. I'm wondering which IdP you are using? This could help us know whether this is a general or edge case.

sailwebs commented 7 months ago

Hi @sailwebs, thanks for letting us know about this issue. I'm wondering which IdP you are using? This could help us know whether this is a general or edge case.

I used kubesphere, which can reproduce this scene.

https://kubesphere.io/

sailwebs commented 7 months ago

According to the code in my screenshot, it can run normally

image

darcyYe commented 7 months ago

Thanks for your reporting, will make the OIDC connector compatible for different response types.