title: What is the point of configuring DefaultScheme and DefaultChallengeScheme on ASP.NET Core?
body: <p>I am learning how security works on ASP.NET Core 2.0 and IdentityServer4. I set up the projects with IdentityServer, API and ASP.NET Core MVC Client App.</p>
  
  <p><code>ConfigureService</code> method on Client App as in below. Here I am confusing on <code>DefaultScheme</code> and <code>DefaultChallengeScheme</code>. What is the point of configuring those? A detailed description on how it works would be really helpful if possible.</p>
  
  <p>I already seen instead of <code>DefaultScheme</code>, <code>DefaultSignInScheme</code> also works, but how does it work? What is the difference of those?</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddMvc();
      JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
  
      services.AddAuthentication(options =&gt;
      {
          options.DefaultScheme = "Cookies";
          options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
          //options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
          //options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
      })
      .AddCookie("Cookies")
      .AddOpenIdConnect(OpenIdConnectDefaults.AuthenticationScheme, options =&gt;
      {
          options.SignInScheme = "Cookies";
          options.RequireHttpsMetadata = false;
  
          options.Authority = "http://localhost:5000/";
          options.ClientId = "mvcclient";
          options.SaveTokens = true;
      });
  }
  </code></pre>