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).