SkillAgentSearch skills...

Blazor.Auth

Blazor authentication package

Install / Use

/learn @BitzArt/Blazor.Auth

README

Tests

NuGet version NuGet downloads

Overview

Blazor.Auth is a developer-friendly JWT & Cookie authentication library for Blazor. Built for .NET 8+ and designed to make Blazor authentication less painful, more secure, and (dare we say) enjoyable.

🍪 The package uses Blazor.Cookies for persisting user authentication state via browser cookies.

This package is for developers who want to:

  • Add JWT authentication to Blazor apps (Server, WebAssembly, United)
  • Use secure cookie authentication in .NET 8+ Blazor projects
  • Implement authentication & authorization in public-facing Blazor sites, SaaS dashboards, or internal enterprise Blazor apps
  • Implement custom login, logout, and token refresh flows
  • Leverage Blazor's built-in authorization capabilities (such as [AuthorizeView] and [CascadingAuthenticationState])

Why Blazor.Auth?

Because you shouldn't have to fight your framework just to log users in. This library skips the boilerplate, handles Blazor's quirks (SSR, WASM, Server, you name it), and keeps your sanity intact. Built by developers who have already made all the mistakes—so you don't have to.

Install via NuGet

Server project:

dotnet add package BitzArt.Blazor.Auth.Server

Client project:

dotnet add package BitzArt.Blazor.Auth.Client

Quickstart

  1. Add the NuGet package(s) to your Blazor project (see above).
  2. Configure authentication in your Program.cs (see docs).
  3. Use your favorite Blazor auth patterns.
  4. Enjoy secure, cookie-based authentication without the headaches.

Resources

Find guides, API docs, and examples in the documentation.

documentation

License

License

<!-- Keywords: Blazor authentication, JWT, cookie auth, .NET 8, ASP.NET Core, OpenID Connect, OAuth2, login, token, claims, identity, middleware, secure, session, refresh token, user management, authorization, Blazor WASM, Blazor Server, NuGet, C#, Microsoft, browser cookies, no localStorage, no sessionStorage, SSR, WASM, Server, Auto, developer-friendly, secure authentication, Blazor security, authentication library, Blazor identity, Blazor login, Blazor token, Blazor claims, Blazor middleware, Blazor authorization, Blazor user management -->
View on GitHub
GitHub Stars247
CategoryDevelopment
Updated20d ago
Forks34

Languages

C#

Security Score

100/100

Audited on Mar 11, 2026

No findings