KamiSama.Modules.Identity.Core 10.0.14

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

KamiSama.Modules.Identity.Core

Back to package index

Version: 10.0.0

Description

ASP.NET Core Identity implementation for KamiSama login, token refresh, logout, user, role, password, two-factor, and session feature contracts, with revocable JWT sessions, EF Core persistence, mappings, and modular startup registration. Install it with exactly one Identity database provider and review the documented security and runtime limitations before exposing its features.

How to use

dotnet add package KamiSama.Modules.Identity.Core --version 10.0.0

Publication mismatch: version 10.0.0 in the install command is the current workspace/root documentation version, but this package version was not published at the time of review. Keep the root-version command in repository documentation; use an actually published version when installing from NuGet.

Install exactly one provider package, pass its callback, and add authentication before authorization in the application pipeline:

using KamiSama.Modules;
using KamiSama.Modules.Identity;

var webBuilder = WebApplication.CreateBuilder(args);
var builder = webBuilder.Extend()
    .AddKamiSamaIdentityModule(
        webBuilder.Configuration.GetSection("Identity"),
        webBuilder.Configuration.GetSection("Identity:Database"),
        registerIdentity: true,
        useJwtAuth: true,
        configureDbContext: database => database.AddPostgresqlIdentityDbContext());

var app = await builder.BuildAsync(CancellationToken.None);
app.UseAuthentication();
app.UseAuthorization();

The provider callback is nullable in the signature but mandatory in practice unless another registration adds the keyed concrete context. BuildAsync runs configured migration and seed work before returning the application, so startup needs database access and can fail or block while migration runs. The module configures authentication services but does not call UseAuthentication; place it before UseAuthorization and protected endpoints.

registerIdentity: true, useJwtAuth: true is the self-contained JWT configuration. true, false uses Identity application/external scheme defaults and requires the host's intended cookie setup. false, true configures JWT only but Core features still require externally registered Identity managers, stores, and token providers. false, false configures Identity scheme names without registering their handlers or Core dependencies, so it is usable only when the host supplies the complete Identity setup.

Security limitations: feature interfaces and implementations do not authorize the caller or verify that caller-controlled user IDs, role IDs, or session IDs may be operated on. Find/exists/reset behavior can disclose whether an account exists. ResetPasswordAsync looks up a user and generates its own reset token before applying the caller-supplied password; exposing it directly permits password reset without possession of an out-of-band token. ChangePassword authenticates without supplying a two-factor code, so password change fails for users whose two-factor authentication is enabled. Add endpoint authorization, ownership checks, uniform public responses, and a separate issued-token reset flow before exposing these services.

Runtime and data limitations: UpdateUserRequest.Roles, UserSearchModel.RoleName, and UserSearchModel.OrderBy are ignored. User-name/email search applies a second exact user-name predicate, so email-only and partial searches can unexpectedly return no rows. User creation can persist the user before confirmation or role assignment fails, and update/role/session workflows do not provide a cross-operation transaction or rollback. Many UserManager calls and feature paths do not propagate cancellation.

JWT bearer metadata validation is disabled, login does not reject disabled users, and the isEnabled claim is based on email confirmation rather than the DTO lockout calculation. Login resolves a matching user name before trying the same value as an email address, then creates a persistent session and returns its absolute access-token expiration. Logout operations require name-identifier and session claims from the active HTTP context; revocation invalidates later session validation but does not remove a cookie or bearer token from the client. Session validation touches and saves the session on authenticated traffic, refresh issuance performs repeated user/token lookups, and repositories save mutations immediately. User listing performs one role lookup per returned user and its unused ConvertToDto hook throws NotImplementedException, making the implementation dependent on its custom page-conversion path. Account for this database write/query amplification and do not call that conversion hook independently.

Namespaces

Types

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 KamiSama.Modules.Identity.Core:

Package Downloads
KamiSama.Modules.Identity.Sqlite

SQLite EF Core provider registration for KamiSama.Modules.Identity.Core. Install it in an Identity host and select the required provider callback so the module can resolve its database context and run startup migrations.

KamiSama.Modules.Identity.Postgresql

PostgreSQL EF Core provider registration for KamiSama.Modules.Identity.Core. Install it in an Identity host and select the required provider callback so the module can resolve its database context and run startup migrations.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.14 46 11/8/2026
10.0.13.1 118 10/22/2026
10.0.13 107 10/22/2026
10.0.11.9 166 8/24/2026
10.0.11.8 148 8/22/2026
10.0.11.7 163 8/21/2026
10.0.11.6 149 8/19/2026
10.0.11.5 141 8/18/2026
10.0.11.4 144 8/18/2026
10.0.11.3 136 8/18/2026
10.0.11.2 145 8/18/2026
10.0.11.1 151 8/15/2026
10.0.11 149 8/11/2026
10.0.10.2 147 8/4/2026