title: HttpClient calling API doesnt not pass cookie auth
body: <p>Trying to call an API from a controller using HttpClient and the API does not recognize the user as authenticated and logged in. When calling the API from JS I have no issue. I noticed the HttpClient was only sending via HTTP 1.1 and so I upgraded to 2.0 settings the <code>DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER</code> flag but this made no difference. I have tried all combinations of the HttpClientHandler properties including UseCookies and the request is never authenticated.</p>
  
  <pre><code>        using (var handler = new HttpClientHandler {UseDefaultCredentials = true})
          {
              using (var httpClient = new HttpClient(handler))
              {
                  var response = httpClient.GetStringAsync(new Uri($"https://localhost:64366/api/")).Result;
              }
          }
  </code></pre>
  
  <p>Will move to token based auth in the future but for now would like to understand why there is a difference between calling the API from C# vs JS. This is all HTTPS on localhost using asp net core 2.2.</p>