Should I authenticate Blazor through an API?
asked 15 hours ago by @qa-9huwthbamdalrlnjbaxs 0 rep · 47 views
asp.net core webapi blazor webassembly microsoft entra id
I have a Blazor standalone app and I have an ASP.NET Core web API.
My question is: should I authenticate with EntraId directly from the Blazor app, or is it better to authenticate via the API (i.e. call an endpoint with the username and password and return a JWT which can then be used for auth on the Blazor side)?
My issue is that the Blazor app will need to authenticate with the API anyway, and the API really needs to know the user that is signed in to the web site.