Lyo.Authentication.Web.Components
1.0.6
See the version list below for details.
dotnet add package Lyo.Authentication.Web.Components --version 1.0.6
NuGet\Install-Package Lyo.Authentication.Web.Components -Version 1.0.6
<PackageReference Include="Lyo.Authentication.Web.Components" Version="1.0.6" />
<PackageVersion Include="Lyo.Authentication.Web.Components" Version="1.0.6" />
<PackageReference Include="Lyo.Authentication.Web.Components" />
paket add Lyo.Authentication.Web.Components --version 1.0.6
#r "nuget: Lyo.Authentication.Web.Components, 1.0.6"
#:package Lyo.Authentication.Web.Components@1.0.6
#addin nuget:?package=Lyo.Authentication.Web.Components&version=1.0.6
#tool nuget:?package=Lyo.Authentication.Web.Components&version=1.0.6
Lyo.Authentication.Web.Components
Host-agnostic Razor / MudBlazor components for Lyo authentication. Ships the Login, Auth Debug, and Profile pages plus the abstractions that the Server and Wasm host adapters implement.
Examples
Configuration
{
"LyoAuthWebComponents": {
"EnablePasswordSignIn": true,
"ShowRememberMe": true,
"Providers": [
{ "Name": "google", "DisplayName": "Sign in with Google", "IconKey": "Icons.Material.Filled.Google" },
{ "Name": "keycloak:my-realm", "DisplayName": "Sign in with Keycloak", "IconKey": "Icons.Material.Filled.Lock" }
]
}
}
Register services
services.AddLyoAuthWebComponents(configuration);
// then pick exactly one host adapter:
services.AddLyoAuthWebComponentsServer();
// or
services.AddLyoAuthWebComponentsWasm(configuration);
Pages
| Route(s) | Component | Purpose |
|---|---|---|
/auth/login, /auth/login/{*ReturnUrl} |
LoginPage |
Provider buttons + optional username/password card. |
/auth/debug |
DebugPage |
Active session inspector: expiry, scopes, claims, decoded JWT. |
/auth/profile, /auth/profile/{userId:guid} |
ProfilePage |
Current user (no segment) or arbitrary user (with {userId}, requires auth.users.read scope). |
All three are wrapped in LyoElementRoot so each rendered root gets a deterministic DOM id. Override via ElementId.
Abstractions (Abstractions/)
IAuthSignInLauncher.SignInAsync(provider, returnUrl)andSignOutAsync().IAuthUserClient.GetMeAsync()andGetUserAsync(id). WrapsGET /auth/meandGET /auth/users/{id}.IAuthSessionAccessor.GetCurrentAsync()andRefreshAsync(). Reads the host's session store. Never exposes the refresh token itself.IAuthProviderCatalog.Source of the provider buttons. A config-bound implementation is registered by default.IAuthPasswordSignIn(optional). Local username/password sign-in. Not registered by default. When absent, the password card onLoginPageis hidden.
Configuration
Providers[].Name must match the canonical OIDC provider name registered on the API (the same value used in /auth/login/{provider}).
Registration
The consuming Blazor host discovers the Razor pages via the standard Router AppAssembly=... plus AdditionalAssemblies mechanism. Add typeof(Lyo.Authentication.Web.Components.Pages.LoginPage).Assembly to your router if your app does not auto-scan referenced assemblies.
Password card (optional)
The username/password card on LoginPage renders only when IAuthPasswordSignIn is registered and LyoAuthWebComponentsOptions.EnablePasswordSignIn is true (default). The Lyo BFF / API stack does not ship a password grant. Consumers that want this card supply their own IAuthPasswordSignIn, for example against a custom /account/login endpoint.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Authentication.Models(direct, lyo)Lyo.Web.Components(direct, lyo)Microsoft.AspNetCore.Components.Authorization10.0.5(direct, microsoft)MudBlazor9.3(direct, third-party)Lyo.Api.Client(transitive, lyo)Lyo.Api.Models(transitive, lyo)Lyo.Cache(transitive, lyo)Lyo.Common(transitive, lyo)Lyo.Compression(transitive, lyo)Lyo.DataTable.Models(transitive, lyo)Lyo.DateAndTime(transitive, lyo)Lyo.Diagnostic(transitive, lyo)Lyo.Encryption(transitive, lyo)Lyo.Exceptions(transitive, lyo)Lyo.Hashing(transitive, lyo)Lyo.Health(transitive, lyo)Lyo.IO.Temp(transitive, lyo)Lyo.KeyStore(transitive, lyo)Lyo.Metrics(transitive, lyo)Lyo.PackageMetadata(transitive, lyo)Lyo.Query(transitive, lyo)Lyo.Query.Models(transitive, lyo)Lyo.Result(transitive, lyo)Lyo.Streams(transitive, lyo)Lyo.Validation(transitive, lyo)Blazored.LocalStorage4.5.0(transitive, third-party)BouncyCastle.Cryptography2.6.2(transitive, third-party, netstandard2.0)EasyCompressor2.1.0(transitive, third-party)Konscious.Security.Cryptography.Argon21.3.1(transitive, third-party)Microsoft.Bcl.AsyncInterfaces10.0.5(transitive, microsoft, netstandard2.0)Microsoft.Extensions.Caching.Memory10.0.5(transitive, microsoft)Microsoft.Extensions.Configuration.Binder10.0.5(transitive, microsoft)Microsoft.Extensions.DependencyInjection10.0.5(transitive, microsoft)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5(transitive, microsoft, net10.0, netstandard2.0)Microsoft.Extensions.Hosting.Abstractions10.0.5(transitive, microsoft)Microsoft.Extensions.Http10.0.5(transitive, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5(transitive, microsoft)Microsoft.Extensions.Options.ConfigurationExtensions10.0.5(transitive, microsoft)System.Buffers4.6.1(transitive, microsoft, netstandard2.0)System.ComponentModel.Annotations5.0.0(transitive, microsoft)System.IO.Hashing10.0.5(transitive, microsoft, net10.0)System.Memory4.6.3(transitive, microsoft, netstandard2.0)System.Text.Json10.0.5(transitive, microsoft, netstandard2.0)System.Threading.Tasks.Extensions4.6.3(transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Lyo.Authentication.Models (>= 1.0.6)
- Lyo.Web.Components (>= 1.0.6)
- Microsoft.AspNetCore.Components.Authorization (>= 10.0.5)
- MudBlazor (>= 9.3.0 && < 10.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Lyo.Authentication.Web.Components:
| Package | Downloads |
|---|---|
|
Lyo.Authentication.Web.Components.Wasm
Blazor WebAssembly host adapter for `Lyo.Authentication.Web.Components`. Pure-browser token flow: exchanges the API's handoff code in the WASM client, holds the resulting access/refresh tokens in `Blazored.LocalStorage`, and injects the bearer (with auto-refresh) into outbound `HttpClient` calls. |
|
|
Lyo.Authentication.Web.Components.Server
Blazor Server host adapter for `Lyo.Authentication.Web.Components`. Wires the shared login / debug / profile pages to the BFF-cookie auth runtime in `Lyo.Authentication.Client` (HttpOnly session cookie + server-side session store + delegating handler). |
GitHub repositories
This package is not used by any popular GitHub repositories.