IdentityModel / IdentityModel.OidcClient

Certified C#/NetStandard OpenID Connect Client Library for native mobile/desktop Applications (RFC 8252)
Apache License 2.0
599 stars 175 forks source link

Load ProviderInformation from .well-known/openid-configuration #408

Open murashov-a opened 9 months ago

murashov-a commented 9 months ago

How can set EndPoints in ProviderInformation without explicitly specifying it? They are provided in .well-known/openid-configuration.

Can the library take these settings from a openid-configuration endpoint?

I get an exception that endpoints are not specified if I don't explicitly specify them

Безымянный

brockallen commented 9 months ago

Can the library take these settings from a openid-configuration endpoint?

Yes, that's how it works by default. You just need to set the Authority. See the docs here: https://identitymodel.readthedocs.io/en/latest/native/automatic.html. Or have a look at some of the samples: https://github.com/IdentityModel/IdentityModel.OidcClient.Samples

I feel like there's some confusion somewhere (by one of us), so if I'm not understanding the issue, please let us know.

murashov-a commented 9 months ago

Thanks for answering

Yes, the problem is on my side.

oidcclient throwed an "malformed endpoint" exception, but I don't understand what's wrong and what end point it is. Perhaps you could correct the exception text by indicating what exactly the library does not like in the openid-configuration?

Perhaps you can see the error from the json screenshot (first message)

the exception is thrown when I don't specify ProviderInformation

brockallen commented 9 months ago

oidcclient throwed an "malformed endpoint" exception, but I don't understand what's wrong and what end point it is. Perhaps you could correct the exception text by indicating what exactly the library does not like in the openid-configuration?

I'm not sure what the issue is, but I have a guess that something that's not JSON is returned. This is likely due to that endpoint returning HTML... perhaps due to an error page being shown? The protocol expects JSON from the endpoint.

brockallen commented 9 months ago

Hello -- any update on this issue?