Closed christopher-lawrence closed 2 years ago
I had the same problem when I tried to set the SignInScheme and SignOutScheme to the IdentityServer4 constants. The way I worked around with was to keep the SignInScheme and SignOutScheme different from the IdentityServer4 values, allow the default SAML2 AspNetCore middleware set the user principal, and then manually add the required OpenID claims. I did modify the Sustainsys.SAML2.AspNetCore2.Saml2Handler to accept an injected authentication service that will return claims to be added to the user principal.
Looks like something needs to be adjusted here. @jamescrowley321 can you please provide some more info of what you did and why?
I'm attempting to simply add a custom AuthenticationScheme name when setting up SAML2 within IdentityServer4. When the endpoint is hit upon being redirected from a successful auth from Okta, I get the error below.
Startup and controller below.
Startup.cs
Controller