title: ChallengeAsync() from HttpContext does not redirect
body: <p>We have a javascript app "wrapped" in an ASP Core MVC Application. Each AJAX-request from the javascript app hits a controller decorated with [Authorize].</p>
  
  <p>In our startup method we've defined an AuhenticationScheme pointing toward our Identity Server. And then another scheme for the cookies that they are ultimately signed in as.</p>
  
  <p>To ensure that all requests coming in are authenticated we use the following:</p>
  
  <pre><code> app.Use(async (context, next) =&gt;
              {
                  if (!context.User.Identity.IsAuthenticated)
                  {
                      string auth = context.Request.Headers["Authorization"];
                      if (string.IsNullOrEmpty(auth) ||     !auth.StartsWith("Bearer ", System.StringComparison.OrdinalIgnoreCase))
                      {
                          await context.ChallengeAsync("oidce", new     AuthenticationProperties {
                               RedirectUri = "/"
                          });
                      }
                      else
                      {
                          await next();
                      }
                  }
                  else
                  {
                      await next();
                  }
              });
  </code></pre>
  
  <p>Now if the cookie expires it triggers the "ChallengeAsync" - that doesn't really work if the call originated from an AJAX request made from the browser. I thought since I had the context here that it would simply override the AJAX and make the browser start the round-trip.</p>
  
  <p>Is there a way to say to the browser that "no, this isn't an AJAX-response, go where I tell you to"? </p>