I am used to using Blazor server-side, where (basically) all the action happens on the server, so you don't need to expose APIs that need securing.
I'm now exploring client-side Blazor (ie WASM), and am looking at using minimal APIs to provide the data, secured by bearer token auth. We use this approach elsewhere in the solution for communication from our mobile apps and it seems to work fine.
However, the WASM runs in the browser, which makes it very easy to see any network calls made, you just open the browser's dev tools and there they are. The problem is that the auth header is in full view, making the auth redundant, as anyone can see the token and the endpoint being called, and access the API from their own code.
So, is there a way to prevent this? We want the WASM to be able to call the API, but not expose the credentials for any casual observer to see.