We are using Windows Authentication on one endpoint in our C#/ASPNet Core 3.1 API. It is configured like:
Startup.ConfigureServices():
services.AddAuthentication(NegotiateDefaults.AuthenticationScheme).AddNegotiate();
Startup.Configure():
app.UseAuthentication();
app.UseAuthorization();
and the endpoint on which we require authentication has the [Authorize] attribute on the Post method in the controller:
[Authorize]
[HttpPost]
[Route("somewhere"]
public IActionResult Post() { ... }
In Chrome, I am prompted for credentials and then allowed to use the endpoint on subsequent requests (even if I cancel the prompt).
How to prevent the prompt?