To start with, I had an Angular app that uses the angular-auth-oidc-client client library to initiate the Idenity Server 4 authentication (authorization code flow with PKCE), using Facebook en Microsoft Account providers. That all works perfectly fine, running locally under IIS Express.
Now I wanted to add windows authentication as well. So I added this to the launchsettings:
"iisSettings": {
"windowsAuthentication": true,
}
...and in the Startup of IdentityServer:
services.Configure<IISOptions>(iis => {
iis.AuthenticationDisplayName = "Windows";
iis.AutomaticAuthentication = true;
});
If I then triggered Windows Authentication, the Challenge method of the ExternalController was executed, and in the Callback I received automatically my windows user, it did not ask to enter credentials (working under Windows 10), so this worked perfectly as well.
Now, when I try to do the same under IIS (and I enable Windows Authentication in IIS), instead of automatically logging on with my windows user, I get a popup:
So it seems that under IIS, Windows Authentication works differently because it asks for my credentials instead of using the one from the logged in windows user.
If I read the docs, I see that Kestrel or WebListener should be used. Is it really a requirement to use Kestrel or WebListener in order to get Windows Authentication in IIS working? Or am I missing something else?
EDIT: I'l trying this locally on my windows 10 laptop, and I'm not in a domain.