DuendeSoftware / Support

Support for Duende Software products
20 stars 0 forks source link

How to change client id / client secret #1226

Closed greg-signi closed 4 months ago

greg-signi commented 4 months ago

Which version of Duende IdentityServer are you using? 7.0.4

Which version of .NET are you using? 8

How can I switch the clientId/clientSecret ? I've tried to modify it on the OpenIdConnectEvent.OnRedirectToIdentityProvider but its still assuming the base client which I registered in the AddOpenIdConnect.

I need this because I need to lookup and change clients based on the received host.

RolandGuijt commented 4 months ago

That is a question specific to the OpenIdConnect handler which is by Microsoft, so the issue tracker for that would be a good place to ask this question. Having said that: Dynamic clients are not supported. The only way to do it is to register multiple handlers.

greg-signi commented 4 months ago

The only way to do it is to register multiple handlers.

Thanks for the answer. This would be multiple .AddOpenIdConnect ?

AndersAbel commented 4 months ago

@greg-signi Yes, you can call .AddOpenIdConnect multiple times. If you are interacting upstream providers from your IdentityServer you might also want to look into our Dynamic Providers feature.

greg-signi commented 4 months ago

If you are interacting upstream providers from your IdentityServer you might also want to look into our Dynamic Providers feature.

multiple providers we already support 👍