4

I have an OpenID Connect Identity Provider Processor for my Sitecore 9.0.1 site which is using federated authentication as described in Sitecore's documentation. I'm also generating the sign-in links as per this documentation. This is currently working fine, however there is a change which requires us to use different OpenIdConnectAuthenticationOptions within the same site based on a certain condition. My plan was to use App.MapWhen with my conditions and specify the correct options inside each. However even using App.MapWhen with a single condition which is always true like this does not work:

protected override void ProcessCore([NotNull] IdentityProvidersArgs args)
{
    args.App.MapWhen(context => true, app =>
    {
        app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
        {
            //my OIDC options
        });
     });
}

When I try to login now a 404 is thrown on the post from the login button to /identity/externallogin, this works fine without the App.MapWhen I understand Sitecore puts in middleware and what I'm doing might conflict with this. How do I use different OIDC options within the same site?

1 Answer 1

0

Here the response from Sitecore support:

According to the investigation performed, the App.MapWhen cannot be used in this method, since it implies direct interaction with OWIN middleware and bypasses federated authentication layer. Thus, implementation of your desired functionality would require a lot of customization and, unfortunately, falls out of scope of support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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