-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something wrong with AuthorizationMessageHandler in .net 6 #38486
Comments
Hi @NbN12. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project (ideally a GitHub repo) that illustrates the problem. |
For context, here are the two issues reported here:
|
I can confirm the same issue, using net6.0, and using the code from the Refit library/docs https://github.com/reactiveui/refit#bearer-authentication for non-DI: var api = RestService.For<ISomeThirdPartyApi>(new HttpClient(new AuthHeaderHandler(tenantProvider, authTokenStore))
{
BaseAddress = new Uri("https://api.example.com")
}
); and I get the following crash:
|
@mkArtakMSFT You point to the need to assign Innerhandler, but other docs say that should not be needed, and doesn't seem needed in earlier dotnet versions. Anyway, what is the exact assignment one need to do? If I just do: InnerHandler = new HttpClientHandler(); Then the call goes through. Is this the right way - or is anything being missed then? |
I am also getting the same error as your second issue |
Still waiting to fix this |
I had the same problem with |
Thanks for contacting us. |
To learn more about what this message means, what to expect next, and how this issue will be handled you can read our Triage Process document. |
Thanks for contacting us. |
Hello, I currently follow this doc about attaching token to outgoing request for my blazor wasm (.net 6) based on this doc ASP.NET Core Blazor WebAssembly additional security scenarios but I got 2 issues:
and when I use it. It give me error in console chrome like this
CustomAuthorizationMessageHandler.cs
It seems fine when first loading but when I go to another url and start use it. It gives me those error below:
which indicates line 48 in my AuthService:
P\S: Before I use those everything still normal.
Thank you.
The text was updated successfully, but these errors were encountered: