I have a .NET Core web application where I'm using ServiceStack. For authentication I'm using two auth providers; ApiKeyAuthProvider and CredentialsAuthProvider. I have specified a redirect URL when creating the AuthFeature. In the case of the credentials provider authentication is done through a SSO-portal using Windows Authentication. If a Windows auth user is logged out for some reason I want them to be redirected back to the SSO site.
When I'm no longer logged I have these two scenarios:
Scenario 1: I go to the application root in the browser and a request for /foo is automatically made using Axios resulting in a 401 response.
Scenario 1 Result: The browsers shows a Basic login prompt.
Scenario 2: I enter /foo in my address bar in the browser and navigate there.
Scenario 2 Result: The HtmlRedirect I entered when creating the AuthFeature kicks in and I get redirected back to the SSO-site.
What I want is the result i get in the second scenario for all requests resulting in a 401. Shouldn't this already be the case? And how can I make this happen?