Managing Blazor Server Authentication

Manages authentication in Blazor Server applications with ASP.NET Core Identity. Solves critical Blazor Server auth issues: HttpContext NULL errors during WebSocket circuits, cookie auth operations failing silently in component handlers, login/logout not working in interactive mode, SignInManager returning null, cascading auth state parameter errors. Configures cascading authentication state and minimal API endpoints for login/logout/register (required for Interactive Server Mode). Covers Blazor auth UI (AuthorizeView, HTML form login, LoginName via @context.User.Identity?.Name). Also covers OWIN to ASP.NET Core middleware migration. Use when setting up authentication in Blazor Server, troubleshooting auth issues, encountering build errors for System.Web.Security types, or fixing runtime authentication failures in Blazor Server circuits.

Microsoft 1430b02 3 files · 41.1 KB Updated 2.7k repo stars

File contents

microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/upgrade/dotnet/skills/lazy/web/webforms/managing-blazor-server-authentication commit 1430b028a0

Frequently asked questions

npx skillmds@latest add microsoft/managing-blazor-server-authentication