Quantcast
Viewing latest article 2
Browse Latest Browse All 5

Answer by M.J. for Cookie not deleted after logout with Asp.Net 5 Identity 3.0

In addition to everything already mentioned, also make sure you are not omitting the scheme argument in the calls to SignInAsync and SignOutAsync, and that you are passing the same value to both. For example:

HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, principal);

and

HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);

So in this example the scheme is CookieAuthenticationDefaults.AuthenticationScheme. In my case I was forgetting to pass this to SignOutAsync, and while obvious after the fact, it took longer than I'd like to admit for me to track down.


Viewing latest article 2
Browse Latest Browse All 5

Trending Articles