(I try to learn web development)
When creating a hosted Blazor WASM from template we get a server and a client using IdS and Identity. How do we add a new web API project (because of separation of concerns?) and protect it via this template setup?
Thanks for your time and help.
I understood that you currently have 2 apps - an Identity Server and a Blazor app -, and that you want to create a 3rd app: an API that can be consumed by the Blazor app, right?
If so, then you are probably already using authentication in your Blazor app, with the Identity Server. What you will need to do is to take the JWT that you probably have and to pass it to the new API, which must also be registered in the Identity Server.
The IdentityServer4 GitHub has many samples here. I believe that the quickstart for AspNetCoreAndApis may be useful for you: