ASP .NET Core Identity auth with Okta,

I am starting a new service layer in .NET 8 in which I hope to use Okta middleware to authenticate, using OpenIdConnect, and using ASP.NET Core Identity Auth. Okta provides several C# samples, one of which is a razor sample which relies on using the Challenge method in their Controller class to start the OAuth2 process. I won’t be using MVC or Razor however in my project, which will be an api for a site written by other developers using traditional html/vue and no Msft tech.

I am wondering how I could incorporate the Challenge method found within MVC controllers into my non-mvc app (or if there’s a non-mvc equivalent to the Challenge method).

Best place to ask about 3rd Party products integration with Identity Auth is in the ASP .NET Core’s GitHub Issues or Discussions or the Okta Community Forums:

I am using Kinde with ServiceStack using the standard asp net identity jwt token validation, presumably you would do the same with Okta.

The quirks were about mapping the provided claims to the claims principal and also when creating the Custom User Session, having to set FromToken to true… that last one took hours as I just couldn’t work out why authorisation worked ok mvc controllers but not servicestack services!