Skip to content

CoreIdent: A modern, open-source, developer-centric identity and authentication solution for .NET. Built on modern .NET, convention-driven, and extensible.

License

Notifications You must be signed in to change notification settings

stimpy77/CoreIdent

Repository files navigation

CoreIdent

Open-source OAuth 2.0 / OIDC toolkit for .NET 10+

Build Status MIT License .NET 10 Open in Codespaces


CoreIdent is a complete, open-source authentication toolkit for .NET 10+. Add secure OAuth 2.0 / OpenID Connect to your app in minutes—with full code-level control and no vendor lock-in.

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCoreIdent(o => {
    o.Issuer = "https://auth.example.com";
    o.Audience = "https://api.example.com";
});
builder.Services.AddSigningKey(o => o.UseRsa("/path/to/key.pem"));

var app = builder.Build();
app.MapCoreIdentEndpoints();
app.Run();

That's it. You now have token issuance, OIDC discovery, JWKS, and more.

Features

  • Token endpointclient_credentials, refresh_token, authorization_code (PKCE required), password (deprecated)
  • Authorization Code + PKCE — Full flow with consent UI
  • OIDC discovery & JWKS — Standards-compliant metadata and public key publishing
  • Token revocation (RFC 7009) & introspection (RFC 7662)
  • Passwordless authentication — Email magic links, passkeys/WebAuthn, SMS OTP
  • Pluggable storage — In-memory for dev, EF Core for production
  • Secure by default — RS256/ES256 signing, refresh token rotation, theft detection
  • CLI tooldotnet coreident init, key generation, client management
  • Metrics — OpenTelemetry-compatible via System.Diagnostics.Metrics
  • Aspire integration — Health checks, distributed tracing, service defaults

Quick Start

Option 1: Use the Test Host

dotnet run --project tests/CoreIdent.TestHost

Visit /.well-known/openid-configuration to see the discovery document.

Option 2: Use Templates

dotnet new install CoreIdent.Templates
dotnet new coreident-server -n MyAuthServer
cd MyAuthServer && dotnet run

Available templates:

  • coreident-api — Minimal API with token endpoints
  • coreident-server — Full server with consent UI and passkeys
  • coreident-api-fsharp — F# version

Add EF Core Persistence

builder.Services.AddDbContext<CoreIdentDbContext>(options =>
    options.UseSqlite(builder.Configuration.GetConnectionString("CoreIdent")));
builder.Services.AddEntityFrameworkCoreStores();

Documentation

Guide Description
Developer Guide Start here — Configuration, endpoints, persistence
Passkeys Guide WebAuthn/passkey setup
CLI Reference dotnet coreident commands
Aspire Integration Health checks, tracing, service defaults
Project Overview Architecture and vision
Development Plan Roadmap and task checklist

Contributing

CoreIdent is MIT-licensed and open source. See CONTRIBUTING.md to get started.

License

MIT

About

CoreIdent: A modern, open-source, developer-centric identity and authentication solution for .NET. Built on modern .NET, convention-driven, and extensible.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages