Open-source OAuth 2.0 / OIDC toolkit for .NET 10+
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.
- Token endpoint —
client_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 tool —
dotnet coreident init, key generation, client management - Metrics — OpenTelemetry-compatible via
System.Diagnostics.Metrics - Aspire integration — Health checks, distributed tracing, service defaults
dotnet run --project tests/CoreIdent.TestHostVisit /.well-known/openid-configuration to see the discovery document.
dotnet new install CoreIdent.Templates
dotnet new coreident-server -n MyAuthServer
cd MyAuthServer && dotnet runAvailable templates:
coreident-api— Minimal API with token endpointscoreident-server— Full server with consent UI and passkeyscoreident-api-fsharp— F# version
builder.Services.AddDbContext<CoreIdentDbContext>(options =>
options.UseSqlite(builder.Configuration.GetConnectionString("CoreIdent")));
builder.Services.AddEntityFrameworkCoreStores();| 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 |
CoreIdent is MIT-licensed and open source. See CONTRIBUTING.md to get started.