title: How to remove identity cookies on sign out or invalid user credentials
body: <p>We are using ASP.Net identity for user authentication. Our security team has requested when a user enters valid username but wrong password the response should be the same as invalid username and password.</p>
  
  <p>I am using the following to sign in user:</p>
  
  <pre><code>await _signInManager.PasswordSignInAsync(loginDetails.Username, loginDetails.Password, false, true);
  </code></pre>
  
  <p>when the browser returns response , I see the following cookies for invalid credentials.</p>
  
  <pre><code>HeaderSetCookie = 
  {.AspNetCore.Identity.Application=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax,Identity.External=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax,Identity.TwoFactorUserId=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesit...
  }
  </code></pre>
  
  <p>Is there some configuration which can take off these cookies?</p>
  
  <p>Thank you!</p>