Rystem.Api.Client.Authentication.BlazorWasm
10.0.7
dotnet add package Rystem.Api.Client.Authentication.BlazorWasm --version 10.0.7
NuGet\Install-Package Rystem.Api.Client.Authentication.BlazorWasm -Version 10.0.7
<PackageReference Include="Rystem.Api.Client.Authentication.BlazorWasm" Version="10.0.7" />
<PackageVersion Include="Rystem.Api.Client.Authentication.BlazorWasm" Version="10.0.7" />
<PackageReference Include="Rystem.Api.Client.Authentication.BlazorWasm" />
paket add Rystem.Api.Client.Authentication.BlazorWasm --version 10.0.7
#r "nuget: Rystem.Api.Client.Authentication.BlazorWasm, 10.0.7"
#:package Rystem.Api.Client.Authentication.BlazorWasm@10.0.7
#addin nuget:?package=Rystem.Api.Client.Authentication.BlazorWasm&version=10.0.7
#tool nuget:?package=Rystem.Api.Client.Authentication.BlazorWasm&version=10.0.7
Rystem.Api.Client.Authentication.BlazorWasm
Rystem.Api.Client.Authentication.BlazorWasm adds bearer-token request enhancers for generated Rystem.Api.Client proxies in Blazor WebAssembly applications.
Like the Blazor Server package, it is an enhancer layer, not a full auth/client registration package.
Installation
dotnet add package Rystem.Api.Client.Authentication.BlazorWasm
What this package adds
The package exposes:
| Method | Scope |
|---|---|
AddAuthenticationForAllEndpoints(settings) |
all generated clients |
AddAuthenticationForEndpoint<T>(settings) |
one generated client |
AuthorizationSettings currently exposes only:
Scopes
There are no social-auth variants in this package.
Typical Blazor WASM setup
var scopes = new[] { builder.Configuration["AzureAd:Scopes"]! };
builder.Services.AddMsalAuthentication(options =>
{
builder.Configuration.Bind("AzureAd", options.ProviderOptions.Authentication);
options.ProviderOptions.DefaultAccessTokenScopes.Add(scopes[0]);
});
builder.Services.AddBusiness();
builder.Services.AddClientsForAllEndpointsApi(http =>
{
http.ConfigurationHttpClientForApi(client =>
{
client.BaseAddress = new Uri("https://api.myapp.io");
});
});
builder.Services.AddAuthenticationForAllEndpoints(settings =>
{
settings.Scopes = scopes;
});
Token flow
The package registers a request enhancer (TokenManager / TokenManager<T>) that:
- asks
IAccessTokenProviderfor an access token - caches the last token in memory
- refreshes it when it is missing or within five minutes of expiry
- attaches it as
Bearer <token>to the outgoing request
If Scopes is configured, token acquisition uses those scopes. Otherwise it requests the default token.
Important caveats
This package does not register clients
You still need:
Rystem.Api.Client- shared endpoint registrations
- generated client registration with
AddClientsForAllEndpointsApi(...)orAddClientForEndpointApi<T>(...)
Endpoint-specific settings are weaker than they look
The package exposes AddAuthenticationForEndpoint<T>(...), but the base token manager currently resolves AuthorizationSettings without using the named client key.
So per-endpoint auth settings are not as isolated as the API shape suggests.
Failed acquisition handling is rough
When token acquisition fails, the current implementation can produce an empty token string rather than a cleaner null-or-challenge flow.
So treat this package as a lightweight enhancer, not as a replacement for the richer AuthorizationMessageHandler patterns in custom Blazor WASM code.
No social helpers here
If you need the separate social-login helpers from this repo, they are not part of the WASM auth package.
Grounded by source files
src/Api/Client/Rystem.Api.Client.Authentication.BlazorWasm/DefaultInterceptor/ServiceCollectionExtensionsForAuthenticator.cssrc/Api/Client/Rystem.Api.Client.Authentication.BlazorWasm/Authorization/TokenManager.cssrc/Api/Test/Rystem.Api.Test.Domain/ServiceCollectionExtensions.cs
Use this package when you already have Blazor WebAssembly MSAL auth configured and you want generated Rystem.Api.Client calls to pick up bearer tokens automatically.
| 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
- Microsoft.AspNetCore.Components.WebAssembly.Authentication (>= 10.0.5)
- Rystem.Api.Client (>= 10.0.7)
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 |
|---|---|---|
| 10.0.7 | 80 | 3/26/2026 |
| 10.0.6 | 170,510 | 3/3/2026 |
| 10.0.5 | 102 | 2/22/2026 |
| 10.0.4 | 104 | 2/9/2026 |
| 10.0.3 | 147,907 | 1/28/2026 |
| 10.0.1 | 209,084 | 11/12/2025 |
| 9.1.3 | 234 | 9/2/2025 |
| 9.1.2 | 764,472 | 5/29/2025 |
| 9.1.1 | 97,790 | 5/2/2025 |
| 9.0.32 | 186,677 | 4/15/2025 |
| 9.0.31 | 5,791 | 4/2/2025 |
| 9.0.30 | 88,844 | 3/26/2025 |
| 9.0.29 | 9,011 | 3/18/2025 |
| 9.0.28 | 240 | 3/17/2025 |
| 9.0.27 | 239 | 3/16/2025 |
| 9.0.26 | 243 | 3/13/2025 |
| 9.0.25 | 52,118 | 3/9/2025 |
| 9.0.20 | 19,583 | 3/6/2025 |
| 9.0.19 | 293 | 3/6/2025 |
| 9.0.18 | 303 | 3/4/2025 |