Benday.Identity.CosmosDb 1.0.0-alpha

This is a prerelease version of Benday.Identity.CosmosDb.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Benday.Identity.CosmosDb --version 1.0.0-alpha
                    
NuGet\Install-Package Benday.Identity.CosmosDb -Version 1.0.0-alpha
                    
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="Benday.Identity.CosmosDb" Version="1.0.0-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Benday.Identity.CosmosDb" Version="1.0.0-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Benday.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 Benday.Identity.CosmosDb --version 1.0.0-alpha
                    
#r "nuget: Benday.Identity.CosmosDb, 1.0.0-alpha"
                    
#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 Benday.Identity.CosmosDb@1.0.0-alpha
                    
#: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=Benday.Identity.CosmosDb&version=1.0.0-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Benday.Identity.CosmosDb&version=1.0.0-alpha&prerelease
                    
Install as a Cake Tool

Benday.Identity.CosmosDb

ASP.NET Core Identity implementation using Azure Cosmos DB as the backing store.

Features

  • Full ASP.NET Core Identity support with Cosmos DB storage
  • User management (create, update, delete, find)
  • Role-based access control
  • Claims-based authorization
  • Account lockout protection
  • Two-factor authentication (2FA) support
  • External login providers (Google, Facebook, Microsoft, etc.)
  • Phone number verification
  • Security stamp management for token invalidation
  • LINQ query support

Installation

dotnet add package Benday.Identity.CosmosDb --prerelease

Dependencies

  • Benday.CosmosDb - Cosmos DB repository pattern library
  • Microsoft.Extensions.Identity.Core

Implemented Interfaces

User Store

  • IUserStore<IdentityUser>
  • IUserPasswordStore<IdentityUser>
  • IUserEmailStore<IdentityUser>
  • IUserRoleStore<IdentityUser>
  • IUserSecurityStampStore<IdentityUser>
  • IUserLockoutStore<IdentityUser>
  • IUserClaimStore<IdentityUser>
  • IUserTwoFactorStore<IdentityUser>
  • IUserPhoneNumberStore<IdentityUser>
  • IUserAuthenticatorKeyStore<IdentityUser>
  • IUserTwoFactorRecoveryCodeStore<IdentityUser>
  • IUserLoginStore<IdentityUser>
  • IQueryableUserStore<IdentityUser>

Role Store

  • IRoleStore<IdentityRole>
  • IRoleClaimStore<IdentityRole>
  • IQueryableRoleStore<IdentityRole>

Usage

Register the identity stores in your Program.cs or startup configuration:

// Register Cosmos DB repositories
services.AddCosmosRepository<IdentityUser, CosmosDbUserStore>(options =>
{
    options.DatabaseId = "YourDatabase";
    options.ContainerId = "Users";
});

services.AddCosmosRepository<IdentityRole, CosmosDbRoleStore>(options =>
{
    options.DatabaseId = "YourDatabase";
    options.ContainerId = "Roles";
});

// Register Identity
services.AddIdentity<IdentityUser, IdentityRole>()
    .AddDefaultTokenProviders();

License

MIT License - see LICENSE file for details.

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

Showing the top 1 NuGet packages that depend on Benday.Identity.CosmosDb:

Package Downloads
Benday.Identity.CosmosDb.UI

ASP.NET Core Identity UI for Azure Cosmos DB. Provides pre-built Login/Logout/AccessDenied Razor Pages, a RedirectToLogin Blazor component, and AddCosmosIdentityWithUI() convenience method that combines core identity registration with cookie authentication. Built on top of Benday.Identity.CosmosDb.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.10 126 5/10/2026
6.0.9-alpha 103 4/27/2026
6.0.8-alpha 104 4/20/2026
6.0.7-alpha 103 4/20/2026
6.0.2-alpha 110 4/4/2026
6.0.1-alpha 120 4/3/2026
6.0.0-alpha 116 3/25/2026
3.2.0 167 3/13/2026
3.1.2 164 3/10/2026
3.1.1 160 3/10/2026
3.1.0 126 3/9/2026
3.0.0 125 2/27/2026
2.1.0 146 2/9/2026
2.0.0 144 2/5/2026
1.1.0 115 2/4/2026
1.0.0-alpha 480 12/9/2025