1

How we can pass auth token to micro services when we use GraphQL schema stitching with authorization for micro services in .NET Core 6 Hotchocolate?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

4

You can use the Microsoft.AspNetCore.HeaderPropagation NuGet package to forward the Authorization header to your services.

services.AddHeaderPropagation(options =>
{
    options.Headers.Add("Authorization");
});
app.UseHeaderPropagation();
Rune Vikestad
  • 4,642
  • 1
  • 25
  • 36