title: Logging out from Identity Server 4 won't log out from Client
body: <p>I have a similar issue to <a href="https://github.com/IdentityServer/IdentityServer4/issues/3153" rel="noreferrer">https://github.com/IdentityServer/IdentityServer4/issues/3153</a></p>
  
  <p>I'm using the Asp Net Identity and the EF Core combined sample, everything works correctly, database, seeding, api call except for when I try to log out from the IS page. It does not delete the <code>.AspNetCore.Cookies</code> which is the one keeping the user logged in on the client.</p>
  
  <pre class="lang-cs prettyprint-override"><code>    [HttpPost]
      [ValidateAntiForgeryToken]
      public async Task&lt;IActionResult&gt; Logout(LogoutInputModel model)
      {
  
          // build a model so the logged out page knows what to display
          var vm = await BuildLoggedOutViewModelAsync(model.LogoutId);
  
          if (User?.Identity.IsAuthenticated == true)
          {
              _log.LogCustomInfo(LoggingType.Information, "&lt;AUDIT&gt;" + "Logout: User Is Authenticated" + "&lt;/AUDIT&gt;");
  
              try
              {
                  await _signInManager.SignOutAsync();
                  await HttpContext.SignOutAsync(IdentityConstants.ApplicationScheme);
                  await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);
                  // raise the logout event
                  await _events.RaiseAsync(new UserLogoutSuccessEvent(User.GetSubjectId(), User.GetDisplayName()));
              }
              catch (NotSupportedException)
              {
                  _log.LogCustomInfo(LoggingType.Information, "&lt;AUDIT&gt;" + "Logout: SignOutAsync Not Supported" + "&lt;/AUDIT&gt;");
              }
  
          }
  
          /* https://github.com/IdentityServer/IdentityServer4/issues/855 */
          // check if we need to trigger sign-out at an upstream identity provider
  
          // delete local authentication cookie
          Response.Cookies.Delete(".AspNetCore.Identity.Application");
          Response.Cookies.Delete("idserv.external");
          Response.Cookies.Delete("idserv.session");
  
  
          _log.LogCustomInfo(LoggingType.Information, "&lt;AUDIT&gt;" + "Logout: Trigger external signout " + vm.TriggerExternalSignout +  "&lt;/AUDIT&gt;");
  
          if (vm.TriggerExternalSignout)
          {
  
              // build a return URL so the upstream provider will redirect back
              // to us after the user has logged out. this allows us to then
              // complete our single sign-out processing.
              string url = Url.Action("Logout", new { logoutId = vm.LogoutId });
              //url = _configuration["AppSettings:PostLogoutRedirectUri"]; 
              url = vm.PostLogoutRedirectUri;
              //url = "redirect.html";
                                              // this triggers a redirect to the external provider for sign-out
              _log.LogCustomInfo(LoggingType.Information, "&lt;AUDIT&gt;" + "Logout: Redirect to " + url +  "&lt;/AUDIT&gt;");
  
              return SignOut(new AuthenticationProperties { RedirectUri = url }, vm.ExternalAuthenticationScheme);
          }
  
          return View("LoggedOut", vm);
      }
  </code></pre>
  
  <p>I have the same issue from the angular client and the MVC application.</p>
  
  <p>If I manually delete <code>.AspNetCore.Identity.Application</code> the client is logged out.  I am authenticating with <code>keycloak</code> and using</p>
  
  <pre class="lang-cs prettyprint-override"><code>    options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
      options.SignOutScheme = IdentityServerConstants.SignoutScheme;
  </code></pre>
  
  <p>In the startup IS configuration options.</p>