Nedo.AspNet.Authentication.Oidc 2.0.9

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

Nedo.AspNet.Authentication.Oidc

Shared OIDC plumbing reused by every social provider (Google, Microsoft, Apple, GitHub, Facebook, Keycloak). Provides:

  • OidcIdTokenValidatorBase — the cached-JWKS + standard-OIDC-validation base class every ID-token-exchange provider derives from.
  • OAuthCodePopupEndpoints — helper for the /start + /callback + postMessage-back-to-opener pattern that GitHub-style backend OAuth flows use.

Install

dotnet add package Nedo.AspNet.Authentication.Oidc

You usually don't install this directly — it ships transitively with each social-provider package. Reference it on its own only if you're building a new social provider.

Building a new social provider

public class MyOidcValidator : OidcIdTokenValidatorBase
{
    public MyOidcValidator(IHttpClientFactory http, IMemoryCache cache)
        : base(http, cache,
            issuer:    "https://my-idp.example.com",
            audience:  "my-client-id",
            jwksUri:   "https://my-idp.example.com/.well-known/jwks.json",
            cacheKey:  "my-idp-jwks")
    { }

    // Override hooks here if your IdP needs custom validation (e.g. nonce, custom claim shape).
}

Then map an endpoint that consumes an ID token from the SPA's IdP SDK and exchanges it for a Nedo session via ExternalSignInService.SignInExternalAsync. The six shipped social providers are good worked examples — see their source on GitHub.

Why factor this out

OIDC validation has a lot of boring-but-critical correctness — JWKS caching with key rotation, audience + issuer + lifetime + nonce checks, clock-skew tolerance, signature-algorithm allow-listing, etc. Doing it once + reusing across providers means the security review only happens in one place.

Package Built on this
Nedo.AspNet.Authentication.Google ID-token exchange
Nedo.AspNet.Authentication.Microsoft ID-token exchange
Nedo.AspNet.Authentication.Apple ID-token exchange
Nedo.AspNet.Authentication.GitHub OAuth code popup
Nedo.AspNet.Authentication.Keycloak OAuth code popup

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 (5)

Showing the top 5 NuGet packages that depend on Nedo.AspNet.Authentication.Oidc:

Package Downloads
Nedo.AspNet.Authentication.Google

Google sign-in (ID-token exchange) for Nedo.AspNet.Authentication.

Nedo.AspNet.Authentication.Microsoft

Microsoft sign-in (ID-token exchange) for Nedo.AspNet.Authentication.

Nedo.AspNet.Authentication.GitHub

GitHub sign-in (OAuth code-exchange) for Nedo.AspNet.Authentication.

Nedo.AspNet.Authentication.Keycloak

Keycloak OIDC authentication provider for Nedo.AspNet.Authentication.

Nedo.AspNet.Authentication.Apple

Sign in with Apple (ID-token exchange) for Nedo.AspNet.Authentication.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.9 164 5/11/2026
2.0.8 144 5/6/2026
2.0.7 153 5/5/2026
2.0.6 150 5/5/2026
2.0.4 145 5/4/2026
2.0.3 148 5/4/2026
2.0.2 164 5/2/2026
2.0.1 145 5/2/2026
2.0.0 146 5/1/2026