AndreGoepel.Marten.Identity.Blazor 1.3.0

dotnet add package AndreGoepel.Marten.Identity.Blazor --version 1.3.0
                    
NuGet\Install-Package AndreGoepel.Marten.Identity.Blazor -Version 1.3.0
                    
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="AndreGoepel.Marten.Identity.Blazor" Version="1.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AndreGoepel.Marten.Identity.Blazor" Version="1.3.0" />
                    
Directory.Packages.props
<PackageReference Include="AndreGoepel.Marten.Identity.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 AndreGoepel.Marten.Identity.Blazor --version 1.3.0
                    
#r "nuget: AndreGoepel.Marten.Identity.Blazor, 1.3.0"
                    
#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 AndreGoepel.Marten.Identity.Blazor@1.3.0
                    
#: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=AndreGoepel.Marten.Identity.Blazor&version=1.3.0
                    
Install as a Cake Addin
#tool nuget:?package=AndreGoepel.Marten.Identity.Blazor&version=1.3.0
                    
Install as a Cake Tool

AndreGoepel.Marten.Identity.Blazor

Blazor Server UI for AndreGoepel.Marten.Identity — a complete set of ready-to-use Razor components for authentication and user management built on Radzen Blazor.

Requirements

  • .NET 10
  • AndreGoepel.Marten.Identity 1.x
  • Radzen.Blazor 10.x

Installation

dotnet add package AndreGoepel.Marten.Identity.Blazor

Usage

1. Register services

builder.Services.AddMartenIdentity();       // from AndreGoepel.Marten.Identity
builder.Services.AddMartenIdentityBlazor(); // registers CascadingAuthenticationState
                                            // and IdentityRevalidatingAuthenticationStateProvider
builder.Services.AddRadzenComponents();

2. Map endpoints

app.MapAdditionalIdentityEndpoints(); // /Account/Logout, passkey endpoints, personal data download, etc.

3. Include the component assembly in routing

app.MapRazorComponents<App>()
   .AddInteractiveServerRenderMode()
   .AddAdditionalAssemblies(typeof(AndreGoepel.Marten.Identity.Blazor.Initialization).Assembly);

This makes the routable pages in the RCL (e.g. /Account/Login) discoverable by the Blazor router.

Feature flags (registration, 2FA, passkeys)

The registration, two-factor and passkey features can be turned off. Disabling a feature hides its UI and makes its setup pages/endpoints unreachable by direct URL — the login-time 2FA/recovery challenge stays reachable so users who already enrolled can still sign in, and passkey login falls back to password.

1. Baseline from configuration (all default true):

builder.Services.AddMartenIdentityBlazor(options =>
{
    options.EnableUserRegistration = true;
    options.EnableTwoFactor = true;
    options.EnablePasskey = false; // e.g. passkeys off
});

2. Enforce the gate — add the middleware after authentication/authorization and before MapRazorComponents / MapAdditionalIdentityEndpoints so it can block both pages and the passkey endpoints:

app.UseAuthentication();
app.UseAuthorization();
app.UseMartenIdentityFeatureGate();   // blocks disabled-feature pages/endpoints
app.MapAdditionalIdentityEndpoints();
app.MapRazorComponents<App>() /* … */;

3. Runtime override (optional). To source the flags from a store (e.g. an admin settings page) where the persisted value beats configuration, register your own IIdentityFeatureProvider — it takes precedence over the built-in options-backed default:

builder.Services.AddScoped<IIdentityFeatureProvider, MyDbFeatureProvider>();
public sealed class MyDbFeatureProvider(IMyStore store) : IIdentityFeatureProvider
{
    public async ValueTask<IdentityFeatureFlags> GetAsync(CancellationToken ct = default)
    {
        var saved = await store.GetIdentityFlagsAsync(ct); // DB value takes precedence
        return new IdentityFeatureFlags
        {
            UserRegistration = saved.Registration,
            TwoFactor = saved.TwoFactor,
            Passkey = saved.Passkey,
        };
    }
}

Your own account-navigation links should call the same provider to hide entry points to disabled features.

What's included

Area Components / Pages
Account Login, Register, ForgotPassword, ResetPassword, ConfirmEmail, Lockout, AccessDenied, and more
Account / Manage Profile, Email, ChangePassword, SetPassword, TwoFactorAuthentication, EnableAuthenticator, GenerateRecoveryCodes, Passkeys, PersonalData, DeletePersonalData
Administration Users grid, Roles grid, user/role assignment dialogs
Shared RedirectToLogin, ShowRecoveryCodes, PasskeySubmit
Layout LoginLayout

Theming & design

The UI is styled by the AndreGoepel.Design.Blazor design system (a separate NuGet package) — an emerald-accented look with matching light and dark modes, built by remapping Radzen's variables onto a token system. Reference its stylesheet (_content/AndreGoepel.Design.Blazor/css/design.css) after Radzen's material-base.css in your host.

To build new pages or controls that fit the existing look, follow the design system's DESIGN.md — it documents the tokens, typography, component recipes (forms, buttons, cards, badges, tables, alerts, empty states), the ag-* helper classes, and the Radzen overrides to be aware of.

License

MIT

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 (2)

Showing the top 2 NuGet packages that depend on AndreGoepel.Marten.Identity.Blazor:

Package Downloads
AndreGoepel.AppFoundation

Reusable Blazor management frontend (layout, navigation, setup, and admin shell) for AndreGoepel.AppFoundation-based applications.

AndreGoepel.AppFoundation.Hosting

One-call backend seam (AddAppFoundation / UseAppFoundation) wiring Marten, identity, Wolverine messaging, email, data protection, and the request pipeline for AndreGoepel.AppFoundation hosts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.0 128 7/8/2026
1.2.0 116 7/5/2026
1.2.0-preview1 95 7/4/2026
1.1.3 195 7/4/2026
1.1.2 93 7/4/2026
1.1.1 183 7/3/2026
1.1.0 173 6/26/2026
1.1.0-preview4 111 6/26/2026 1.1.0-preview4 is deprecated.
1.1.0-preview3 116 6/26/2026 1.1.0-preview3 is deprecated.
1.1.0-preview2 120 6/26/2026 1.1.0-preview2 is deprecated.
1.1.0-preview1 125 6/26/2026 1.1.0-preview1 is deprecated.
1.0.2 138 6/25/2026 1.0.2 is deprecated.
1.0.1 134 6/13/2026 1.0.1 is deprecated.
1.0.0 252 6/13/2026 1.0.0 is deprecated.