2

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 their own Okta application settings)?

3

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";
            }
        }
    }
});
1
  • Thank you for the answer!
    – ashesh
    Aug 30 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.