|
5 | 5 |
|
6 | 6 | ## Overview |
7 | 7 |
|
8 | | -**BitzArt.Blazor.Auth** is a tearless authentication library for Blazor United. |
| 8 | +**Blazor.Auth** is a developer-friendly JWT & Cookie authentication library for Blazor (Server, WASM, United, SSR, Auto). Built for .NET 8+ and designed to make Blazor authentication less painful, more secure, and (dare we say) enjoyable. |
9 | 9 |
|
10 | 10 | > 🍪 |
11 | 11 | > The package uses [Blazor.Cookies](https://github.com/BitzArt/Blazor.Cookies) for persisting user authentication state via browser cookies. |
12 | 12 |
|
13 | | -This package simplifies implementing custom JWT-based authentication schemes with Blazor. |
| 13 | +This package is for developers who want to: |
14 | 14 |
|
15 | | -- Built for dotnet 8+ |
16 | | -- Supports all Blazor United render modes |
17 | | -- Supports custom authentication flows |
18 | | -- Supports Blazor built-in authorization utilities |
19 | | -- Uses browser cookies to persist authentication state |
| 15 | +- Add JWT authentication to Blazor apps (Server, WebAssembly, United) |
| 16 | +- Use secure cookie authentication in .NET 8+ Blazor projects |
| 17 | +- Implement custom login, logout, and token refresh flows |
| 18 | +- Leverage Blazor's built-in authorization capabilities (such as `[AuthorizeView]` and `[CascadingAuthenticationState]`) |
| 19 | +- Persist authentication state in browser cookies (no localStorage/sessionStorage) |
| 20 | +- Use in public-facing Blazor sites, SaaS dashboards, or internal enterprise Blazor apps |
20 | 21 |
|
21 | | -## Blazor render mode support |
| 22 | +### Why Blazor.Auth? |
22 | 23 |
|
23 | | -| Blazor Rendermode | Support | |
24 | | -|-------------------------|:-------:| |
25 | | -| Static SSR | ✔️ | |
26 | | -| Interactive Server | ✔️ | |
27 | | -| Interactive WebAssembly | ✔️ | |
28 | | -| Interactive Auto | ✔️ | |
| 24 | +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. |
| 25 | + |
| 26 | +## Install via NuGet |
| 27 | + |
| 28 | +**Server project:** |
| 29 | +```sh |
| 30 | +dotnet add package BitzArt.Blazor.Auth.Server |
| 31 | +``` |
| 32 | + |
| 33 | +**Client project:** |
| 34 | +```sh |
| 35 | +dotnet add package BitzArt.Blazor.Auth.Client |
| 36 | +``` |
| 37 | + |
| 38 | +## Quickstart |
| 39 | + |
| 40 | +1. Add the NuGet package(s) to your Blazor project (see above). |
| 41 | +2. Configure authentication in your `Program.cs` (see [docs](https://bitzart.github.io/Blazor.Auth)). |
| 42 | +3. Use your favorite Blazor auth patterns. |
| 43 | +4. Enjoy secure, cookie-based authentication without the headaches. |
29 | 44 |
|
30 | 45 | ## Resources |
31 | 46 |
|
32 | | -Refer to the [documentation](https://bitzart.github.io/Blazor.Auth) for more information. |
| 47 | +Find guides, API docs, and real-world Blazor authentication examples in the [documentation](https://bitzart.github.io/Blazor.Auth). |
33 | 48 |
|
34 | 49 | [](https://bitzart.github.io/Blazor.Auth) |
35 | 50 |
|
36 | 51 | ## License |
37 | 52 |
|
38 | 53 | [](https://github.com/BitzArt/Blazor.Auth/blob/main/LICENSE) |
| 54 | + |
| 55 | +<!-- |
| 56 | +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 |
| 57 | +--> |
0 commit comments