Arc4u.OAuth2.AspNetCore.Blazor
9.1.0
Prefix Reserved
dotnet add package Arc4u.OAuth2.AspNetCore.Blazor --version 9.1.0
NuGet\Install-Package Arc4u.OAuth2.AspNetCore.Blazor -Version 9.1.0
<PackageReference Include="Arc4u.OAuth2.AspNetCore.Blazor" Version="9.1.0" />
<PackageVersion Include="Arc4u.OAuth2.AspNetCore.Blazor" Version="9.1.0" />
<PackageReference Include="Arc4u.OAuth2.AspNetCore.Blazor" />
paket add Arc4u.OAuth2.AspNetCore.Blazor --version 9.1.0
#r "nuget: Arc4u.OAuth2.AspNetCore.Blazor, 9.1.0"
#:package Arc4u.OAuth2.AspNetCore.Blazor@9.1.0
#addin nuget:?package=Arc4u.OAuth2.AspNetCore.Blazor&version=9.1.0
#tool nuget:?package=Arc4u.OAuth2.AspNetCore.Blazor&version=9.1.0
Arc4u.OAuth2.AspNetCore.Blazor
Sets the Arc4u AppPrincipal of the signed-in user in the IApplicationContext of Blazor Interactive Server components, whose SignalR circuit has its own dependency injection scope.
Install
dotnet add package Arc4u.OAuth2.AspNetCore.Blazor
Usage
builder.Services.AddScoped<IApplicationContext, ApplicationInstanceContext>();
builder.Services.AddScoped<AuthenticationStateProvider, AppPrincipalServerAuthenticationStateProvider>();
builder.Services.AddScoped<CircuitHandler, ApplicationContextCircuitHandler>();
The principal is built from the claims of the authenticated user with the registered IClaimAuthorizationFiller and IClaimProfileFiller.
To end a circuit whose sign-in has ended (sign-out in another tab, expired session), register the provider this way instead. The call is required: it also wraps the cookie's session store so each principal carries its session key, which the check reads. It can come before or after AddOidcAuthentication.
builder.Services.AddAppPrincipalCircuitRevalidation(builder.Configuration); // Authentication:CircuitRevalidation:Enabled, :Interval (2 minutes)
To send the WebAssembly client only the claims it reads, instead of SerializeAllClaims = true:
builder.Services.AddRazorComponents()
.AddInteractiveWebAssemblyComponents()
.AddAuthenticationStateSerialization(o => o.SerializationCallback = AuthenticationStateClaimsSerializer.Create(ClaimTypes.Email));
Documentation
- Guide: Blazor
- API reference: Arc4u.OAuth2.AspNetCore.Blazor
- Source and issues: github.com/Arc4u-org/Arc4u
| 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. net11.0 is compatible. |
-
net10.0
- Arc4u.OAuth2 (>= 9.1.0)
-
net11.0
- Arc4u.OAuth2 (>= 9.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.1.0 | 106 | 11/18/2026 |
| 9.0.0 | 100 | 11/10/2026 |
| 9.0.0-preview46 | 95 | 11/3/2026 |
| 9.0.0-preview45 | 93 | 11/2/2026 |
| 9.0.0-preview44 | 105 | 11/1/2026 |
| 9.0.0-preview43 | 100 | 11/1/2026 |
| 9.0.0-preview42 | 95 | 10/30/2026 |
| 9.0.0-preview41 | 99 | 10/30/2026 |
| 9.0.0-preview40 | 99 | 10/27/2026 |
| 9.0.0-preview39 | 102 | 10/24/2026 |
| 9.0.0-preview38 | 99 | 10/22/2026 |
| 9.0.0-preview37 | 564 | 8/11/2026 |
| 9.0.0-preview36 | 424 | 7/28/2026 |
| 9.0.0-preview35 | 106 | 7/27/2026 |
| 9.0.0-preview34 | 110 | 7/27/2026 |
| 9.0.0-preview33 | 122 | 6/15/2026 |
| 9.0.0-preview32 | 116 | 6/14/2026 |
| 9.0.0-preview31 | 124 | 5/20/2026 |
| 9.0.0-preview30 | 119 | 5/19/2026 |
| 9.0.0-preview29 | 120 | 5/15/2026 |