Get Current User in a Blazor component
问题 I'm starting a new site with Blazor and Windows Authentication and need to identify the current user viewing the page/component. For a Razor Page, the current user name can be accessed with Context.User.Identity.Name , but that doesn't seem to work in a Blazor component. I've tried injecting HttpContext into the component but the Context is null at runtime. As a bonus, I will eventually want to incorporate this into Startup.cs so I only need to get the username once and can leverage a