IdentityModel.OidcClient icon indicating copy to clipboard operation
IdentityModel.OidcClient copied to clipboard

Load ProviderInformation from .well-known/openid-configuration

Open murashov-a opened this issue 1 year ago • 4 comments

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

Безымянный

murashov-a avatar Feb 14 '24 08:02 murashov-a

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.

brockallen avatar Feb 16 '24 18:02 brockallen

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

murashov-a avatar Feb 17 '24 03:02 murashov-a

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 avatar Feb 17 '24 05:02 brockallen

Hello -- any update on this issue?

brockallen avatar Feb 27 '24 16:02 brockallen