Corely.IAM 2.1.0

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

Corely.IAM

Host-agnostic, multi-tenant identity and access management for .NET applications. Drop-in authentication, authorization, RBAC, and permission management — no external service dependencies.

Upgrading from 1.x? See MIGRATION-2.0.md. MariaDB support is removed, MySQL moved to Oracle's provider and its databases must be recreated, and the target framework is net10.0 only. SQL Server is unaffected.

graph LR
    subgraph Host App
        A[IAMOptions.Create] --> B[AddIAMServices]
    end
    B --> C[IRegistrationService]
    B --> D[IAuthenticationService]
    B --> E[IRetrievalService]
    B --> F[IModificationService]
    B --> G[IMfaService]
    C & D & E & F & G --> H[Processors]
    H --> I[Repositories]
    I --> J[(Database)]

    style A fill:#4a9eff,color:#fff
    style B fill:#4a9eff,color:#fff
    style C fill:#2ecc71,color:#fff
    style D fill:#2ecc71,color:#fff
    style E fill:#2ecc71,color:#fff
    style F fill:#2ecc71,color:#fff
    style G fill:#2ecc71,color:#fff
    style H fill:#f39c12,color:#fff
    style I fill:#e74c3c,color:#fff
    style J fill:#9b59b6,color:#fff

Highlights

  • Multi-tenant accounts — users belong to multiple accounts with scoped RBAC
  • CRUDX permissions — fine-grained Create / Read / Update / Delete / Execute per resource type
  • Token-based auth — JWT with custom claims, no HttpContext dependency
  • System context — headless processes (Azure Functions, background services) can call APIs without user authentication
  • Password recovery — email-based recovery tokens for unauthenticated password reset
  • Multi-factor authentication — TOTP (authenticator apps) with recovery codes
  • Google Sign-In — link Google accounts as an alternative auth method
  • Invitation system — token-based onboarding with expiry and revocation
  • Per-entity encryption — account and user-scoped key pairs, stored encrypted
  • Pluggable crypto — configure algorithms via the IAMOptions builder
  • Two database providers — SQL Server and MySQL via EF Core

Quick Start

1. Create the database schema

The library never applies migrations at runtime. Create the schema with the migration tool, which ships both providers' migrations:

dotnet tool install --global Corely.IAM.DataAccessMigrations.Cli

corely-iam-db db create -p MsSql -c "Server=(localdb)\MSSQLLocalDB;Database=CorelyIam;Trusted_Connection=True;"

See the Migration CLI docs for deployment scripting, environment-variable configuration, and running against MySQL.

2. Register and use the services

// Register services
var options = IAMOptions.Create(configuration, securityConfigProvider, efConfigFactory);
services.AddIAMServices(options);

// Register a user and account
var registrationService = serviceProvider.GetRequiredService<IRegistrationService>();

var userResult = await registrationService.RegisterUserAsync(
    new RegisterUserRequest("admin", "admin@example.com", "P@ssw0rd!"));

var accountResult = await registrationService.RegisterAccountAsync(
    new RegisterAccountRequest("My Organization"));

Documentation

Docs Description
Corely.IAM Core library — setup, services, domains, security, architecture
Corely.IAM.Web Pre-built Blazor UI — auth pages, account management, RBAC visualization
DevTools CLI Crypto operations and IAM service interaction from the command line
Migration CLI Database creation, migrations, and scripting

Solution Structure

Project Purpose
Corely.IAM Core library — business logic, data access, security
Corely.IAM.Web Blazor Server UI — pages, components, auth flow
Corely.IAM.WebApp Host application (reference implementation)
Corely.IAM.UnitTests Test suite (xUnit, Moq, AutoFixture, FluentAssertions)
Corely.IAM.DevTools Developer CLI for crypto and IAM operations
Corely.IAM.DataAccessMigrations.Cli Migration CLI — creates and migrates the IAM schema (published as a .NET tool)
Corely.IAM.DataAccessMigrations.MsSql / .MySql EF Core migrations per database provider, bundled into the CLI

License

See LICENSE 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 Corely.IAM:

Package Downloads
Corely.IAM.Web

ASP.NET Core integration for Corely IAM. Provides middleware, services, and Razor components for web-based identity and access management.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.2 42 9/15/2026
2.2.1 152 9/7/2026
2.2.0 91 9/7/2026
2.1.1 101 9/7/2026
2.1.0 96 9/7/2026
2.0.1 125 9/4/2026
2.0.0 144 9/1/2026
1.3.0 100 8/31/2026
1.1.1 158 4/25/2026
1.1.0 138 4/20/2026
1.0.0 178 3/16/2026