title: How to combine AddOpenIdConnect() and AddIdentityServerAuthentication() in one resource server?
body: <p>Can somebody help me with my current configuration for protecting our server using Identity Server 4, currently I'm using package IdentityServer4 2.3.0. I found that when I hit one of my api with a valid token, it always return 401 Unauthorized or 302 Found. My comment on listing below show my problem:</p>
  
  <pre><code>services
     .AddAuthentication()
     .AddOpenIdConnect(
        "oidc",
        "OpenID Connect",
        x =&gt;
        {
           x.Authority = "https://localhost:44378"; // Try to set breakpoint here, it hitted.
           x.SignInScheme = "Cookies";
  
           x.ClientId = "myclient;
           x.SaveTokens = true;
           x.GetClaimsFromUserInfoEndpoint = true;
  
           x.TokenValidationParameters = new TokenValidationParameters
           {
              NameClaimType = "name",
              RoleClaimType = "role"
           };
        })
     .AddIdentityServerAuthentication(
        "Bearer",
        x =&gt;
        {
           x.Authority = "https://localhost:44378"; // Try to set breakpoint here, not hitted.
           x.ApiName = "api1";
           x.ApiSecret = "apisecret";
           x.RequireHttpsMetadata = true;
        })
     ;
  </code></pre>