title: IdentityServer4 - Redirect to MVC client after Logout
body: <p>I am using IdenetityServer4 and Redirecting to MVC client after Logout is not working. Following is my MVC client controller Logout action:</p>
  
  <pre><code>public async Task Logout()
  {
      await HttpContext.Authentication.SignOutAsync("Cookies");
      await HttpContext.Authentication.SignOutAsync("oidc");
  }
  </code></pre>
  
  <p>Following is identity server 4 Host config file.</p>
  
  <pre><code>public static IEnumerable&lt;Client&gt; GetClients()
  {
      return new List&lt;Client&gt;
      {
          // other clients omitted...
  
          // OpenID Connect implicit flow client (MVC)
          new Client
          {
              ClientId = "mvc",
              ClientName = "MVC Client",
              AllowedGrantTypes = GrantTypes.Implicit,
  
              // where to redirect to after login
              RedirectUris = { "http://localhost:58422/signin-oidc" },
  
              // where to redirect to after logout
              PostLogoutRedirectUris = { "http://localhost:58422/signout-callback-oidc" },
  
              AllowedScopes = new List&lt;string&gt;
              {
                  IdentityServerConstants.StandardScopes.OpenId,
                  IdentityServerConstants.StandardScopes.Profile
              }
          }
      };
  } 
  </code></pre>
  
  <p>I want user to be redirect back to MVC client after getting Logged out from IdentityServer. Right now user has to click link show in below image to redirected back to MVC site but i think user should be automatically redirected back to MVC client.</p>
  
  <p><a href="https://i.stack.imgur.com/oesvx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/oesvx.png" alt="enter image description here"></a></p>