GrayMint.Identity 1.0.3

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

GrayMint.Identity

An OpenID Connect identity service for .NET that one deployment runs for many tenants. Accounts are kept by ASP.NET Core Identity and the protocol is OpenIddict's, both in one PostgreSQL database, with tenants built underneath both.

  • Pools, tenants and applications. A pool is one product; a tenant is a set of accounts with its own host, which is its issuer; an application is a client of one tenant.
  • Walls between tenants, in the database and at every request, each with a test that tries to cross it.
  • Email and password sign-in, with sign-up and password reset by a mailed link, limits on guessing and mailing, and the most common passwords refused.
  • Sign-in with Google and with Apple for a tenant that has a client id there, with no secret, no key and no script of theirs on the pages.
  • Its own pages for all of that, in the tenant's name, drawn on the server and working without a script.
  • The authorization code flow with PKCE, which gives an application an ID token, and sign-out.
  • Keys outside the process: certificates in files and the key ring in the database, with a new signing certificate published before it signs.
  • Accounts from Firebase keep their passwords.

Projects

Project What it is
src/GrayMint.Identity The service, as a library: the GrayMint.Identity package on nuget.org
src/GrayMint.Identity.Host The ready-to-run host and its commands
tests/GrayMint.Identity.Test Tests that run the host against a real PostgreSQL and a real mail server

Documents

  • Design (docs/design.md): how it is built, and the rules for changing it.
  • Deployment (docs/deployment.md): settings, certificates, setting up, and importing accounts.

Develop

You need the .NET 10 SDK and Docker.

docker compose up -d   # PostgreSQL 18 on 127.0.0.1:5433, and a mail catcher on 127.0.0.1:1025
dotnet test

Each test makes a database of its own on that server and drops it when it ends. The mail catcher takes every mail and delivers none.

dotnet run --project src/GrayMint.Identity.Host starts the service at http://localhost:5280 with one example tenant; its sign-in page is http://localhost:5280/account/sign-in. In Development it sets up its database by itself, and makes its own certificates under the user's profile at the first start. Its mails go to the mail catcher, where you read them at http://localhost:8025.

After a change to the model, add a migration:

dotnet ef migrations add <Name> --project src/GrayMint.Identity --startup-project src/GrayMint.Identity -o Persistence/Migrations
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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 0 11/16/2026
1.0.3 0 11/16/2026
1.0.2 0 11/16/2026
1.0.1 0 11/16/2026