I have 2 SXA
sites running on the same Azure app service. Both sites require Okta federated authentication (OIDC)
. Is it possible to have more than one IdentityProvidersProcessor
(1 for each SXA site b/c each needs its own Okta application settings)?
1 Answer
I doubt you can have more than one IdentityProvidersProcessor
without making alot of customizations. However you could modify the OpenIdConnectAuthenticationOptions
in the RedirectToIdentityProvider
event, they are on the notification.Options
object. This event occurs before the user will get redirected to Okta, below an example:
args.App.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
Notifications = new OpenIdConnectAuthenticationNotifications
{
RedirectToIdentityProvider = async(notification) =>
{
//set the correct options depending on the site e.g.
if(site1) {
notification.Options.ClientId = "site 1 client id";
} else {
notification.Options.ClientId = "site 2 client id";
}
}
}
});