OidcForge.EntityFramework
4.2.0
dotnet add package OidcForge.EntityFramework --version 4.2.0
NuGet\Install-Package OidcForge.EntityFramework -Version 4.2.0
<PackageReference Include="OidcForge.EntityFramework" Version="4.2.0" />
<PackageVersion Include="OidcForge.EntityFramework" Version="4.2.0" />
<PackageReference Include="OidcForge.EntityFramework" />
paket add OidcForge.EntityFramework --version 4.2.0
#r "nuget: OidcForge.EntityFramework, 4.2.0"
#:package OidcForge.EntityFramework@4.2.0
#addin nuget:?package=OidcForge.EntityFramework&version=4.2.0
#tool nuget:?package=OidcForge.EntityFramework&version=4.2.0
OidcForge.EntityFramework
Adds Entity Framework Core persistence to the OidcForge OpenID Connect / OAuth 2.0 framework (a maintained fork of IdentityServer4 4.x) on .NET 10: the configuration store (clients, resources), the operational store (grants, device codes) and the store for automatically managed signing keys.
dotnet add package OidcForge.EntityFramework
Usage
var migrationsAssembly = typeof(Program).Assembly.GetName().Name;
services.AddIdentityServer(options => options.KeyManagement.Enabled = true)
.AddConfigurationStore(options =>
{
options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));
})
.AddOperationalStore(options =>
{
options.ConfigureDbContext = b => b.UseSqlServer(connectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));
options.EnableTokenCleanup = true; // remove expired grants in the background
});
AddConfigurationStore()registers the client and resource stores;AddConfigurationStoreCache()adds caching on top.AddOperationalStore()registers the grant and device flow stores, the token cleanup host and the signing key store: withKeyManagement.Enabledthe keys live in theKeystable of the operational store instead of files. In a server farm share the ASP.NET Core data protection keys between all instances — the keys are protected with them.- Use
AddConfigurationStore<TContext>()/AddOperationalStore<TContext>()with your own DbContext types when you need to extend the model.
Migrations
The packages do not ship migrations. Create them in your project:
dotnet ef migrations add Grants -c PersistedGrantDbContext -o Migrations/PersistedGrantDb
dotnet ef migrations add Configuration -c ConfigurationDbContext -o Migrations/ConfigurationDb
Upgrading from IdentityServer4 4.x: the operational store has a new Keys table, so add a migration for PersistedGrantDbContext
and apply it before the first start. EF Core 9+ throws on Migrate() when the model has pending changes
(dotnet ef migrations has-pending-model-changes -c PersistedGrantDbContext tells you). Reference migrations for SQL Server:
src/EntityFramework.Storage/migrations/SqlServer;
the Quickstart 5 sample shows a complete setup.
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, Scott Brady; 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)
- OidcForge.EntityFramework.Storage (>= 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 | 136 | 10/2/2026 |