Vault42.Blazor 1.0.4

dotnet add package Vault42.Blazor --version 1.0.4
                    
NuGet\Install-Package Vault42.Blazor -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vault42.Blazor" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Vault42.Blazor" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Vault42.Blazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Vault42.Blazor --version 1.0.4
                    
#r "nuget: Vault42.Blazor, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Vault42.Blazor@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Vault42.Blazor&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Vault42.Blazor&version=1.0.4
                    
Install as a Cake Tool

Vault42 .NET SDK

Client libraries for Vault42 — a production-grade Go JWT authentication server.

This repository ships two NuGet packages:

Package Purpose
Vault42.AspNetCore ASP.NET Core authentication middleware. Validates RS256 JWTs against Vault42's JWKS endpoint, with auto-refresh, claim mapping, fingerprint validation, and authorization policies.
Vault42.Blazor Blazor WebAssembly authentication library. Implements OAuth2 Authorization Code + PKCE (S256) and integrates with AuthenticationStateProvider.

Both target .NET 10.0.

Install

dotnet add package Vault42.AspNetCore
dotnet add package Vault42.Blazor

Vault42.AspNetCore — minimal usage

using Vault42.AspNetCore;

var builder = WebApplication.CreateBuilder(args);

builder.Services
    .AddAuthentication(VaultDefaults.AuthenticationScheme)
    .AddVault(options =>
    {
        options.Authority = "https://vault42.example.com";
        // Defaults — override if needed:
        // options.MaxTokenSize       = 8192;          // 8 KB cap (matches server)
        // options.JwksRefreshInterval = TimeSpan.FromMinutes(5);
        // options.MaxJwksBytes       = 1L * 1024 * 1024;
        // options.JwksHttpTimeout    = TimeSpan.FromSeconds(10);
        // options.RequireHttpsMetadata = true;
        // options.ValidateFingerprint = false;
    });

var app = builder.Build();
await app.Services.UseVaultAuthenticationAsync();
app.UseAuthentication();
app.UseAuthorization();

Security defaults (cannot be disabled by configuration):

  • Algorithm whitelist: RS256 only — none, HS256, etc. are rejected.
  • Dangerous JWT headers (jku, x5u, x5c, jwk) are rejected.
  • JWKS keys must declare use=sig (or no use) and alg=RS256 (or no alg).
  • RSA modulus < 2048 bits is rejected.
  • JWKS body is bounded by MaxJwksBytes.
  • Token validation failures return a generic invalid_token reason — no validator-specific leakage.

Vault42.Blazor — minimal usage

using Vault42.Blazor;

builder.Services.AddVaultAuth(options =>
{
    options.Authority   = "https://vault42.example.com";
    options.ClientId    = "my-blazor-app";
    options.RedirectUri = "https://myapp.com/auth/callback";
    // Defaults — override if needed:
    // options.RefreshStorage = RefreshTokenStorage.HttpOnlyCookieOnly;
});

RefreshStorage trade-offs:

  • HttpOnlyCookieOnly (default) — refresh token never touches JS storage. Vault42 server issues HttpOnly + Secure + SameSite=Strict cookies; the browser auto-attaches them. Best XSS resistance. Requires same-origin or CORS-with-credentials origin.
  • InMemoryOnly — refresh token kept in process memory; lost on full reload. XSS-resistant.
  • SessionStorage — legacy XSS-readable persistence. Opt-in only; document the risk in your app.

Versioning

Line Targets Status
0.2.x net10.0 Current — see CHANGELOG.md
0.1.x net8.0, net10.0 Maintenance — pin if you cannot leave net8

License

MIT. See repository root LICENSE.

Security

Report vulnerabilities to vault@42-v.com (Tuta, end-to-end encrypted). Do not open a public GitHub issue. Full policy: SECURITY.md.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.4 103 8/21/2026
1.0.3 91 8/20/2026
0.9.9 101 7/31/2026
0.9.6 104 7/16/2026
0.9.4 111 7/14/2026
0.9.2 115 7/14/2026
0.9.0 105 7/14/2026
0.8.0 126 6/20/2026
0.7.0 115 5/18/2026
0.6.9 112 5/14/2026
0.6.7 109 5/13/2026
0.4.2 103 4/30/2026
0.1.0-alpha.3 76 4/28/2026