public ActionResult SignOut() { if (Request.IsAuthenticated) { var tokenStore = new SessionStore(null, System.Web.HttpContext.Current, ClaimsPrincipal.Current); tokenStore.Clear(); Request.GetOwinContext().Authentication.SignOut( CookieAuthenticationDefaults.AuthenticationType); } return(RedirectToAction("Index", "Home")); }
/// <summary> /// Clear session on logout /// </summary> /// <param name="sessionCtx"></param> private void ClearEmployeeDetails(ISessionContext sessionCtx) { SessionStore.Clear(); }