Closed kadickerss closed 3 years ago
Closing for now. Exceptions regarding CORS are being thrown and caught. I did not see them originally.
So, the problem appears to be CORS related. As I understand, the HttpClient coded in Blazor runs in the WASM/Browser sandbox and the browser is preventing the successful response containing the token from making it's way back into the HttpClient to be processed. So, I think the issue is how to configure CORS in the setup for ClientCredentialsTokenRequest that is being added to the builder services in the Blazor app startup.
Any update on this?
@leastprivilege I have not worked on this further. I have not heard from IdentityModel people either. I'm moving towards Web Assembly client with server backend and away from direct connections for my needs. Still need to do this, though.
closing due to inactivity.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue.
Sorry to open an issue. This could be a configuration problem, but before I continue, I wanted to ask "Is this even supported?"
I have working code I copied from a .Net Core console app into this Blazor app, to use the Blazor as the front-end.
I used fiddler to confirm the token is retrieved. It is just not included as a bearer token on the request that requires authentication.
None of this is internet-facing. It's all back-end code for internal systems.
255_Full.txt
public static async Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("app");