AspNetCore.Identity.CosmosDb 12.0.2

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

AspNetCore.Identity.CosmosDb

Build and Test NuGet

AspNetCore.Identity.CosmosDb is a .NET 10 ASP.NET Core Identity provider backed by Azure Cosmos DB and EF Core Cosmos. It stores users, roles, claims, tokens, external logins, and passkeys in Cosmos DB while preserving the standard ASP.NET Core Identity programming model.

Breaking change: This release line moved to .NET 10 and adds ASP.NET Core Identity passkey support. Detailed migration and impact notes: .NET 10 + Passkey Upgrade Summary

Versioning Note

Package versions now follow SemVer 2.0 for NuGet publishing and no longer mirror the target .NET version number.

This means you may see a larger version jump (for example, from a .NET-aligned version to 12.0.0) without an equivalent framework jump. The target framework and compatibility are still documented separately in this README and in release notes.

Why use this package

  • Cosmos DB-backed ASP.NET Core Identity without a relational database
  • Standard UserManager<TUser> and RoleManager<TRole> support
  • Passkey support for .NET 10 Identity
  • Generic key support
  • Reusable passkey endpoints and packaged JavaScript client

Install

dotnet add package AspNetCore.Identity.CosmosDb

Basic setup

using AspNetCore.Identity.CosmosDb;
using AspNetCore.Identity.CosmosDb.Extensions;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;

var connectionString = builder.Configuration.GetConnectionString("CosmosDb")!;
var databaseName = builder.Configuration["CosmosDb:DatabaseName"]!;

builder.Services.AddDbContext<ApplicationDbContext>(options =>
    options.UseCosmos(connectionString, databaseName));

builder.Services.Configure<IdentityPasskeyOptions>(options =>
{
    options.ServerDomain = builder.Configuration["Passkeys:ServerDomain"]!;
});

builder.Services
    .AddCosmosIdentity<ApplicationDbContext, IdentityUser, IdentityRole, string>()
    .AddDefaultTokenProviders()
    .AddDefaultUI();

Create your context by inheriting from CosmosIdentityDbContext<TUser, TRole, TKey> and call EnsureCreatedAsync() during startup to provision the Cosmos database and required containers.

Passkeys Integration

The package includes passkey persistence plus reusable passkey API endpoints and a packaged JavaScript client.

builder.Services.AddCosmosPasskeyUiIntegration(options =>
{
    options.RoutePrefix = "/identity/passkeys";
    options.ClientScriptPath = "/identity/passkeys/client.js";
});

app.MapCosmosPasskeyUiEndpoints<IdentityUser>();

Repository and examples

This package is part of the SkyCMS project and the demo app in this repository is the best end-to-end reference implementation.

Compatibility

  • .NET 10
  • ASP.NET Core Identity
  • Azure Cosmos DB or Azure Cosmos DB Emulator

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

Showing the top 3 NuGet packages that depend on AspNetCore.Identity.CosmosDb:

Package Downloads
Cosmos.Common

This package contains all the common methods and objects used by the Cosmos CMS editor website, and by any website service the role of a publishing website.

Cosmos.Cms.Common

This package contains all the common methods and objects used by the Cosmos CMS editor website, and by any website service the role of a publishing website.

Brupper.AspNetCore.Identity

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
12.0.2 0 4/4/2026
12.0.1 21 4/4/2026
12.0.0 26 4/4/2026
10.0.5.1 51 4/2/2026
9.1.1-beta4 228 9/1/2025
9.1.1-beta3 239 8/28/2025
9.1.0.3-preview 254 8/28/2025
9.1.0.2-preview 214 8/13/2025
9.1.0.1-preview 208 8/13/2025
9.1.0-preview 207 8/13/2025
9.0.1.2 5,574 8/11/2025
9.0.1 8,660 1/21/2025
9.0.0.3 602 1/10/2025
9.0.0 2,583 12/6/2024
8.0.7 6,129 9/3/2024
8.0.6 3,205 5/29/2024
8.0.4 748 4/18/2024
8.0.3 1,096 3/12/2024
8.0.2 1,662 2/15/2024
Loading failed

Added passkey (WebAuthn) support. Upgraded to .NET 10 and EF Core 10. Versioning now follows SemVer 2.0 and no longer mirrors the .NET target version.