Skip to content
Discussion options

You must be logged in to vote

This is a platform limitation, not a Refit one. In Blazor WebAssembly all HTTP requests go through the browser fetch API, so HttpClientHandler.UseDefaultCredentials and Windows/AD integrated auth are not available - the browser sandbox does not expose the Windows domain identity to WASM. That is why you get the runtime error.

Options for the WASM scenario:

  • Do the Windows/AD authentication on the server. Host an ASP.NET Core endpoint that uses Windows Authentication (Negotiate/Kerberos) to identify the user, issue a token (JWT), and have the Blazor WASM app call that endpoint to exchange the domain identity for a token. The browser handles the Negotiate handshake for same-origin requests …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by glennawatson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants