Identity.Base 0.7.12

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

Identity.Base

Identity.Base is a reusable Identity + OpenIddict service library for .NET 9.0. It bundles ASP.NET Core Identity, OpenIddict server configuration, MFA, external providers, and optional email integrations into ergonomic extension methods that can be hosted by any ASP.NET Core application.

Getting Started

var builder = WebApplication.CreateBuilder(args);

var identity = builder.Services.AddIdentityBase(
    builder.Configuration,
    builder.Environment,
    configureDbContext: (sp, options) =>
    {
        var configuration = sp.GetRequiredService<IConfiguration>();
        var connectionString = configuration.GetConnectionString("Primary")
            ?? throw new InvalidOperationException("ConnectionStrings:Primary is required.");

        options.UseNpgsql(connectionString, sql => sql.EnableRetryOnFailure());
        // or options.UseSqlServer(connectionString);
    });
identity
    .UseTablePrefix("Contoso")          // optional: overrides default "Identity_" prefix
    .AddConfiguredExternalProviders() // Google / Microsoft / Apple based on configuration
    .AddExternalAuthProvider("github", auth =>
    {
        // register custom external providers here
        return auth.AddOAuth("GitHub", options => { /* ... */ });
    })
    .UseMailJetEmailSender();          // optional add-on package

var app = builder.Build();
app.UseApiPipeline(); // Add request logging middleware if desired
app.MapControllers();
app.MapApiEndpoints();
app.Run();

Note: browser-based calls to /auth/* endpoints are protected against CSRF-style cross-origin requests. If your SPA is hosted on a different origin, ensure Cors:AllowedOrigins includes that SPA origin. Session cookies are SameSite=Lax and intended only for the Identity host; SPAs should use access tokens for API calls.

Identity.Base no longer ships EF Core migrations. Hosts are responsible for generating and applying migrations (typically from their web/API project) for whichever database provider they choose. Call dotnet ef migrations add InitialIdentityBase from your host, run the migrations, then start the application. Call UseTablePrefix if you need the tables to be emitted with a prefix other than the default Identity_. Enable Mailjet delivery by referencing Identity.Base.Email.MailJet and calling UseMailJetEmailSender().

See the repository README for the full architecture, configuration schemas, and microservice/React integration guides.

Documentation

License

Identity.Base is released under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 (5)

Showing the top 5 NuGet packages that depend on Identity.Base:

Package Downloads
Identity.Base.Roles

Role-based access control primitives for Identity Base: roles, permissions, default configuration, and effective permission resolution.

Identity.Base.Organizations

Organization management layer for Identity Base, providing domain entities, EF Core integration, services, and HTTP APIs for organization membership and roles.

Identity.Base.Admin

Administrative endpoints, authorization handlers, and helpers for managing Identity Base users, roles, and audit trails.

Identity.Base.Email.MailJet

Optional Mailjet email sender integration for Identity Base hosts.

Identity.Base.Email.SendGrid

Optional SendGrid email sender integration for Identity Base hosts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.12 40 12/30/2025
0.7.9 289 12/17/2025
0.7.7 202 12/3/2025
0.7.6 206 11/26/2025
0.7.5 342 11/14/2025
0.7.4 297 11/13/2025
0.7.3 299 11/10/2025
0.7.2 206 11/9/2025
0.7.1 147 11/9/2025
0.6.3 145 11/8/2025
0.6.2 153 11/8/2025
0.6.1 193 11/6/2025
0.5.10 196 11/5/2025
0.5.1 202 11/2/2025
0.4.3 147 11/2/2025
0.4.2 146 11/2/2025
0.3.6 131 11/1/2025
0.3.4 129 11/1/2025
0.2.7 120 11/1/2025
0.2.4 180 10/29/2025
0.2.3 180 10/29/2025