I am trying to sign out of the application, but the authentication cookie is not getting deleted. Below is my implementation
//Log in action
var identity = new ClaimsIdentity(new[] {
new Claim(ClaimTypes.Name, loginModel.UserName),
},
DefaultAuthenticationTypes.ApplicationCookie,
ClaimTypes.Name,
ClaimTypes.Role);
Authentication.SignIn(new AuthenticationProperties
{
IsPersistent = loginModel.RememberMe
}, identity);
//logout action
IAuthenticationManager Authentication
{
get { return HttpContext.GetOwinContext().Authentication; }
}
Authentication.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
//startup
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
//AuthenticationMode = AuthenticationMode.Active
});