Nixon.Extensions.OpenIddict.EntityFrameworkCore 10.0.5

dotnet add package Nixon.Extensions.OpenIddict.EntityFrameworkCore --version 10.0.5
                    
NuGet\Install-Package Nixon.Extensions.OpenIddict.EntityFrameworkCore -Version 10.0.5
                    
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="Nixon.Extensions.OpenIddict.EntityFrameworkCore" Version="10.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nixon.Extensions.OpenIddict.EntityFrameworkCore" Version="10.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Nixon.Extensions.OpenIddict.EntityFrameworkCore" />
                    
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 Nixon.Extensions.OpenIddict.EntityFrameworkCore --version 10.0.5
                    
#r "nuget: Nixon.Extensions.OpenIddict.EntityFrameworkCore, 10.0.5"
                    
#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 Nixon.Extensions.OpenIddict.EntityFrameworkCore@10.0.5
                    
#: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=Nixon.Extensions.OpenIddict.EntityFrameworkCore&version=10.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Nixon.Extensions.OpenIddict.EntityFrameworkCore&version=10.0.5
                    
Install as a Cake Tool

Nixon.Extensions.OpenIddict

Opinionated extensions for building OpenIddict servers/clients and EF Core models with less boilerplate.

Packages

Package Version
Nixon.Extensions.OpenIddict.EntityFrameworkCore NuGet
Nixon.Extensions.OpenIddict NuGet

What is thiss?

  • Opinionated server/client setup via AddOpinionatedServer(...) and AddOpinionatedClient(...).
  • Built-in development cert fallback when explicit signing/encryption keys are not configured.
  • Helpers for OpenIddict application registration at startup.
  • EF Core helpers to configure OpenIddict tables/schema consistently.
  • Small utility extensions for request parsing and descriptor composition.

Install

dotnet add package Nixon.Extensions.OpenIddict
dotnet add package Nixon.Extensions.OpenIddict.EntityFrameworkCore

Install only the package(s) you need.

Quick start

1) Configure EF Core + OpenIddict model

using Microsoft.EntityFrameworkCore;
using Nixon.Extensions.OpenIddict.EntityFrameworkCore;

public sealed class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.UseOpenIddict();
        
        // Places OpenIddict entities in a dedicated schema.
        modelBuilder.ConfigureOpenIddict("openiddict");
    }
}

2) Configure OpenIddict services

using Nixon.Extensions.OpenIddict;

builder.Services.AddOpenIddict()
    .AddCore(core =>
    {
        core.UseEntityFrameworkCore<AppDbContext>();
    })
    .AddOpinionatedServer(builder.Environment, server =>
    {
        server.SetIssuer("http://localhost:5000");
    
        server.AllowCustomFlow("test-grant-type");
        server.AddScopedTokenRequestHandler<TestGrantTypeHandler>();
    
        server.AddApplication(new OpenIddictApplicationRegistration
        {
            ClientId = "client-id",
            AllowedGrantTypes = { "test-grant-type" }
        });
    })
    .AddOpinionatedClient(builder.Environment);

Opinionated defaults

AddOpinionatedServer(...) configures these defaults:

  • Adds development signing/encryption certificates when missing.
  • Uses data protection and reference access tokens.
  • Access token lifetime: 1 hour.
  • Enables: authorization code, refresh token (14 days), token exchange flows.
  • Endpoint URIs:
    • connect/token
    • connect/userinfo
    • connect/authorize
  • ASP.NET Core passthrough for authorization and userinfo endpoints.
  • Disables transport security requirement in Development

AddOpinionatedClient(...) configures these defaults:

  • Adds development signing/encryption certificates when missing.
  • Redirection endpoint URI: connect/redirect.
  • Enables authorization code flow.
  • Uses data protection, System.Net.Http, and ASP.NET Core integration.
  • Disables transport security requirement in Development.

API highlights

  • IServiceCollection.AddOpenIddictApplication(...)
    • Registers application(s) and creates/updates them on startup via hosted service.
  • IOpenIddictApplicationManager.CreateOrUpdateAsync(...)
    • Upsert helper by ClientId.
  • OpenIddictServerBuilder.AllowRefreshTokenFlow(TimeSpan)
    • Flow + lifetime in one call.
  • OpenIddictServerBuilder.AllowCustomFlows(IEnumerable<string>)
    • Bulk custom flow registration.
  • OpenIddictRequest.TryGetParameter<T>(...)
    • Typed parameter parsing from token/authorization requests.
  • OpenIddictApplicationDescriptor extensions
    • Add grant-type permissions and redirect URIs from collections.
  • ModelBuilder.ConfigureOpenIddict(...)
    • Configure schema/table names for OpenIddict entities (default or generic entity types).

Samples

See src/Samples/Nixon.Extensions.OpenIddict.Samples.Alpha for a runnable reference setup.

License

MIT. See LICENSE.txt.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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
10.0.5 128 5/9/2026
10.0.4 87 5/4/2026
10.0.3 84 5/4/2026
10.0.2 97 5/4/2026
10.0.1 84 5/4/2026