I have a C# project using MVC and OWIN.
I am trying to allow the use of multiple OpenID providers. I've seen how people do it by passing the parameter string in using "RedirectToIdentityProvider" in the pipeline like in this article: https://www.scottbrady91.com/Identity-Server/Identity-Server-3-Standalone-Implementation-Part-2
I am, however, not using any of the big name providers like google or github. I'm making it applicable to any Id Provider that supports OIDC.
The problem is I want to set the Authority dynamically in the RedirectToIdentityProvider Task...but I don't know how.
private async Task OnRedirectToIdentityProvider(RedirectToIdentityProviderNotification<OpenIdConnectMessage, OpenIdConnectAuthenticationOptions> notification)
{
var openIdProviderService = new OpenIdProviderService();
var openIdProvider = openIdProviderService.Get("SecureAuthA");
notification.ProtocolMessage.ClientId = openIdProvider.ClientId;//"3b11fd9d1d6f454c8ed09b837ed632cb";
notification.ProtocolMessage.ClientSecret = openIdProvider.ClientSecret;//"6e687e0f551fe32ea7df63a553f73a2206b8c69e0da436efb5191c229528bef4";
Is there a way to set the Authority dynamically?