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
<PackageReference Include="AspNetCore.Identity.CosmosDb" Version="12.0.2" />
<PackageVersion Include="AspNetCore.Identity.CosmosDb" Version="12.0.2" />
<PackageReference Include="AspNetCore.Identity.CosmosDb" />
paket add AspNetCore.Identity.CosmosDb --version 12.0.2
#r "nuget: AspNetCore.Identity.CosmosDb, 12.0.2"
#:package AspNetCore.Identity.CosmosDb@12.0.2
#addin nuget:?package=AspNetCore.Identity.CosmosDb&version=12.0.2
#tool nuget:?package=AspNetCore.Identity.CosmosDb&version=12.0.2
AspNetCore.Identity.CosmosDb
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>andRoleManager<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
- Repository: CWALabs/AspNetCore.Identity.CosmosDb
- Demo website example: AspNetCore.Identity.CosmosDb.Demo
- Full demo app template package: AspNetCore.Identity.CosmosDb.Demo.Template
- Razor page templates package: AspNetCore.Identity.CosmosDb.Templates
- Templates source in this repo: AspNetCore.Identity.Razor.PassKeyPage
- SkyCMS project: CWALabs/SkyCMS
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 | 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
- Duende.IdentityServer.EntityFramework.Storage (>= 7.4.7)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.5)
- Microsoft.AspNetCore.Identity.UI (>= 10.0.5)
- Microsoft.EntityFrameworkCore.Cosmos (>= 10.0.5)
- Microsoft.Extensions.Caching.Memory (>= 10.0.5)
- Newtonsoft.Json (>= 13.0.4)
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 |
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.