OidcForge.AspNetIdentity
4.2.0
dotnet add package OidcForge.AspNetIdentity --version 4.2.0
NuGet\Install-Package OidcForge.AspNetIdentity -Version 4.2.0
<PackageReference Include="OidcForge.AspNetIdentity" Version="4.2.0" />
<PackageVersion Include="OidcForge.AspNetIdentity" Version="4.2.0" />
<PackageReference Include="OidcForge.AspNetIdentity" />
paket add OidcForge.AspNetIdentity --version 4.2.0
#r "nuget: OidcForge.AspNetIdentity, 4.2.0"
#:package OidcForge.AspNetIdentity@4.2.0
#addin nuget:?package=OidcForge.AspNetIdentity&version=4.2.0
#tool nuget:?package=OidcForge.AspNetIdentity&version=4.2.0
OidcForge.AspNetIdentity
ASP.NET Core Identity integration for the OidcForge OpenID Connect / OAuth 2.0 framework (a maintained fork of IdentityServer4 4.x) on .NET 10: users, passwords and roles come from ASP.NET Core Identity; the framework issues the tokens.
dotnet add package OidcForge.AspNetIdentity
Usage
services.AddDbContext<ApplicationDbContext>(options => options.UseSqlite(connectionString));
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddIdentityServer(options => options.KeyManagement.Enabled = true)
.AddInMemoryApiScopes(Config.ApiScopes)
.AddInMemoryClients(Config.Clients)
.AddAspNetIdentity<ApplicationUser>();
AddAspNetIdentity<TUser>() registers:
- an
IProfileService(ProfileService<TUser>) that turns the ASP.NET Core Identity user's claims and roles into token claims; the user id, user name and role claim types are mapped tosub,nameandrole, - a resource owner password validator (
ResourceOwnerPasswordValidator<TUser>) backed bySignInManager<TUser>; failed attempts count towards lockout, - a security-stamp callback that keeps the claims captured at sign-in (
idp,auth_time,amr) when ASP.NET Core Identity refreshes the principal, - cookie configuration: the ASP.NET Core Identity application cookie becomes the default scheme and, like the external and
two-factor cookies, is marked essential; the application and external cookies use
SameSite=None(required for the iframe-based authorize and check-session requests); browsers acceptSameSite=Nonecookies only over HTTPS.
Login, logout and consent pages are your application's UI — see the Quickstart 6 sample for a complete one.
Notes
IdentityConstantsexists both inMicrosoft.AspNetCore.Identityand inIdentityServer4; add a using alias (using IdentityConstants = Microsoft.AspNetCore.Identity.IdentityConstants;) when a file needs both.- Only clients whose
AllowedGrantTypescontain thepasswordgrant can use the password validator; prefer the authorization code flow with PKCE.
Status and license
Not certified, not affiliated with Duende Software or the .NET Foundation, no commercial support. See the release notes and the issue tracker. Report vulnerabilities privately (SECURITY.MD).
Apache 2.0. Copyright (c) Brock Allen & Dominick Baier; modifications copyright (c) Yaroslav Tatarenko.
| Product | Versions 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. |
-
net10.0
- OidcForge (>= 4.2.0)
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 |
|---|---|---|
| 4.2.0 | 114 | 10/2/2026 |