Microsoft.AspNetCore.Authentication.OpenIdConnect 10.0.0-preview.5.25277.114

Prefix Reserved
This is a prerelease version of Microsoft.AspNetCore.Authentication.OpenIdConnect.
dotnet add package Microsoft.AspNetCore.Authentication.OpenIdConnect --version 10.0.0-preview.5.25277.114
                    
NuGet\Install-Package Microsoft.AspNetCore.Authentication.OpenIdConnect -Version 10.0.0-preview.5.25277.114
                    
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="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.0-preview.5.25277.114" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.0-preview.5.25277.114" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
                    
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 Microsoft.AspNetCore.Authentication.OpenIdConnect --version 10.0.0-preview.5.25277.114
                    
#r "nuget: Microsoft.AspNetCore.Authentication.OpenIdConnect, 10.0.0-preview.5.25277.114"
                    
#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.
#addin nuget:?package=Microsoft.AspNetCore.Authentication.OpenIdConnect&version=10.0.0-preview.5.25277.114&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.Authentication.OpenIdConnect&version=10.0.0-preview.5.25277.114&prerelease
                    
Install as a Cake Tool

About

Microsoft.AspNetCore.Authentication.OpenIdConnect provides middleware that enables an application to support the OpenID Connect authentication workflow.

Key Features

  • Single sign-on and single sign-out support
  • Integration with external identity providers
  • Token validation and management
  • Configuration and mapping of user claims

How to Use

To use Microsoft.AspNetCore.Authentication.OpenIdConnect, follow these steps:

Installation

dotnet add package Microsoft.AspNetCore.Authentication.OpenIdConnect

Configuration

To configure Microsoft.AspNetCore.Authentication.OpenIdConnect, you need to add the necessary services and middleware to your application.

  1. In the Program.cs of your ASP.NET Core app, add the following code to register the OpenID Connect authentication services:

    builder.Services
        .AddAuthentication(options =>
        {
            options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
        })
        .AddCookie()
        .AddOpenIdConnect(options =>
        {
            // Configure the authentication options
            options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            options.Authority = "your-identity-provider";
            options.ClientId = "your-client-id";
            options.ClientSecret = "your-client-secret-from-user-secrets-or-keyvault";
            options.ResponseType = "code";
            options.Scope.Add("profile");
            options.SaveTokens = true;
        });
    

    Make sure to replace your-identity-provider, your-client-id, and your-client-secret-from-user-secrets-or-keyvault, with the appropriate values for your application and identity provider.

  2. Add the following code to enable the OpenID Connect authentication middleware:

    var app = builder.Build();
    
    app.UseAuthentication();
    

    This ensures that the authentication middleware is added to the request pipeline.

Main Types

The main types provided by Microsoft.AspNetCore.Authentication.OpenIdConnect are:

  • OpenIdConnectOptions: Represents the options for configuring the OpenID Connect authentication middleware
  • OpenIdConnectEvents: Provides event handlers for various stages of the OpenID Connect authentication workflow

For more information on these types and their usage, refer to the official documentation.

Additional Documentation

For additional documentation on using OpenID Connect authentication in ASP.NET Core, you can refer to the following resources:

Feedback & Contributing

Microsoft.AspNetCore.Authentication.OpenIdConnect is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (498)

Showing the top 5 NuGet packages that depend on Microsoft.AspNetCore.Authentication.OpenIdConnect:

Package Downloads
Microsoft.Identity.Web.TokenAcquisition

Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).

Microsoft.AspNetCore.App

Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.

Microsoft.AspNetCore.All

Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.

Microsoft.AspNetCore.Authentication.AzureAD.UI

ASP.NET Core Azure Active Directory Integration provides components for easily integrating Azure Active Directory authentication within your ASP.NET Core application. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/ab1f1c636afa3a6607f2d67bc387b586596d1d38

Duende.IdentityServer

OpenID Connect and OAuth 2.0 Framework for ASP.NET Core

GitHub repositories (128)

Showing the top 20 popular GitHub repositories that depend on Microsoft.AspNetCore.Authentication.OpenIdConnect:

Repository Stars
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
dotnet/eShop
A reference .NET application implementing an eCommerce site
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
OrchardCMS/OrchardCore
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
dotnetcore/CAP
Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
kurrent-io/KurrentDB
KurrentDB is a database that's engineered for modern software applications and event-driven architectures. Its event-native design simplifies data modeling and preserves data integrity while the integrated streaming engine solves distributed messaging challenges and ensures data consistency.
anjoy8/Blog.Core
💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
simplcommerce/SimplCommerce
A simple, cross platform, modulith ecommerce system built on .NET
Xabaril/AspNetCore.Diagnostics.HealthChecks
Enterprise HealthChecks for ASP.NET Core Diagnostics Package
vietnam-devs/coolstore-microservices
A full-stack .NET microservices build on Dapr and Tye
MicrosoftLearning/AZ-204-DevelopingSolutionsforMicrosoftAzure
AZ-204: Developing solutions for Microsoft Azure
Squidex/squidex
Headless CMS and Content Managment Hub
phongnguyend/Practical.CleanArchitecture
Full-stack .Net 9 Clean Architecture (Microservices, Modular Monolith, Monolith), Blazor, Angular 19, React 19, Vue 3.5, BFF with YARP, NextJs 15, Domain-Driven Design, CQRS, SOLID, Asp.Net Core Identity Custom Storage, OpenID Connect, EF Core, OpenTelemetry, SignalR, Background Services, Health Checks, Rate Limiting, Clouds (Azure, AWS, GCP), ..
oqtane/oqtane.framework
CMS & Application Framework for Blazor & .NET MAUI
asynkron/protoactor-dotnet
Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
ErsatzTV/ErsatzTV
Stream custom live channels using your own media
ariacom/Seal-Report
Database Reporting Tool and Tasks (.Net)
DuendeSoftware/products
The most flexible and standards-compliant OpenID Connect and OAuth 2.x framework for ASP.NET Core
Version Downloads Last Updated
10.0.0-preview.5.25277.114 734 6/6/2025
10.0.0-preview.4.25258.110 1,350 5/12/2025
10.0.0-preview.3.25172.1 2,848 4/10/2025
10.0.0-preview.2.25164.1 17,595 3/18/2025
10.0.0-preview.1.25120.3 25,156 2/25/2025
9.0.6 127,179 6/10/2025
9.0.5 383,686 5/13/2025
9.0.4 592,548 4/8/2025
9.0.3 530,172 3/11/2025
9.0.2 581,637 2/11/2025
9.0.1 713,130 1/14/2025
9.0.0 6,825,692 11/12/2024
9.0.0-rc.2.24474.3 219,848 10/8/2024
9.0.0-rc.1.24452.1 96,490 9/10/2024
9.0.0-preview.7.24406.2 2,386 8/13/2024
9.0.0-preview.6.24328.4 161,552 7/9/2024
9.0.0-preview.5.24306.11 1,077 6/11/2024
9.0.0-preview.4.24267.6 8,552 5/21/2024
9.0.0-preview.3.24172.13 63,211 4/11/2024
9.0.0-preview.2.24128.4 21,555 3/12/2024
9.0.0-preview.1.24081.5 22,965 2/13/2024
8.0.17 91,769 6/10/2025
8.0.16 257,421 5/13/2025
8.0.15 509,455 4/8/2025
8.0.14 618,033 3/11/2025
8.0.13 633,713 2/11/2025
8.0.12 855,716 1/14/2025
8.0.11 2,817,881 11/12/2024
8.0.10 3,205,111 10/8/2024
8.0.8 3,584,496 8/13/2024
8.0.7 2,108,018 7/9/2024
8.0.6 2,752,272 5/28/2024
8.0.5 953,233 5/14/2024
8.0.4 3,740,292 4/9/2024
8.0.3 4,559,791 3/12/2024
8.0.2 1,801,781 2/13/2024
8.0.1 4,290,198 1/9/2024
8.0.0 36,280,849 11/14/2023
8.0.0-rc.2.23480.2 577,627 10/10/2023
8.0.0-rc.1.23421.29 98,849 9/12/2023
8.0.0-preview.7.23375.9 425,842 8/8/2023
8.0.0-preview.6.23329.11 8,056 7/11/2023
8.0.0-preview.5.23302.2 3,924 6/13/2023
8.0.0-preview.4.23260.4 255,335 5/16/2023
8.0.0-preview.3.23177.8 3,860 4/11/2023
8.0.0-preview.2.23153.2 89,958 3/14/2023
8.0.0-preview.1.23112.2 51,996 2/21/2023
7.0.20 208,960 5/28/2024
7.0.19 30,026 5/14/2024
7.0.18 112,301 4/9/2024
7.0.17 65,265 3/12/2024
7.0.16 162,434 2/13/2024
7.0.15 627,692 1/9/2024
7.0.14 1,509,098 11/14/2023
7.0.13 611,392 10/24/2023
7.0.12 458,097 10/10/2023
7.0.11 701,397 9/12/2023
7.0.10 1,224,393 8/8/2023
7.0.9 815,453 7/11/2023
7.0.8 595,126 6/22/2023
7.0.7 255,728 6/13/2023
7.0.5 2,232,297 4/11/2023
7.0.4 732,182 3/14/2023
7.0.3 763,090 2/14/2023
7.0.2 1,088,251 1/10/2023
7.0.1 9,635,609 12/13/2022
7.0.0 4,244,392 11/7/2022
7.0.0-rc.2.22476.2 19,896 10/11/2022
7.0.0-rc.1.22427.2 71,354 9/14/2022
7.0.0-preview.7.22376.6 4,147 8/9/2022
7.0.0-preview.6.22330.3 334,848 7/12/2022
7.0.0-preview.5.22303.8 2,918 6/14/2022
7.0.0-preview.4.22251.1 2,175 5/10/2022
7.0.0-preview.3.22178.4 1,431 4/13/2022
7.0.0-preview.2.22153.2 8,834 3/14/2022
7.0.0-preview.1.22109.13 1,218 2/17/2022
6.0.36 718,273 11/12/2024
6.0.35 334,195 10/8/2024
6.0.33 489,669 8/13/2024
6.0.32 282,659 7/9/2024
6.0.31 400,564 5/28/2024
6.0.30 137,937 5/14/2024
6.0.29 933,125 4/9/2024
6.0.28 405,316 3/12/2024
6.0.27 527,390 2/13/2024
6.0.26 969,261 1/9/2024
6.0.25 1,245,162 11/14/2023
6.0.24 369,858 10/24/2023
6.0.23 266,928 10/10/2023
6.0.22 499,623 9/12/2023
6.0.21 730,263 8/8/2023
6.0.20 628,706 7/11/2023
6.0.19 556,360 6/22/2023
6.0.18 308,782 6/13/2023
6.0.16 1,989,903 4/11/2023
6.0.15 1,024,744 3/14/2023
6.0.14 1,065,358 2/14/2023
6.0.13 1,679,370 1/10/2023
6.0.12 10,342,388 12/13/2022
6.0.11 2,659,139 11/7/2022
6.0.10 2,613,852 10/11/2022
6.0.9 2,592,488 9/13/2022
6.0.8 2,727,838 8/9/2022
6.0.7 2,414,699 7/12/2022
6.0.6 1,892,563 6/14/2022
6.0.5 3,155,991 5/10/2022
6.0.4 1,785,181 4/11/2022
6.0.3 2,441,977 3/8/2022
6.0.2 1,663,786 2/8/2022
6.0.1 3,459,023 12/14/2021
6.0.0 23,715,772 11/8/2021
6.0.0-rc.2.21480.10 36,076 10/12/2021
6.0.0-rc.1.21452.15 20,934 9/14/2021
6.0.0-preview.7.21378.6 18,095 8/10/2021
6.0.0-preview.6.21355.2 7,145 7/14/2021
6.0.0-preview.5.21301.17 4,919 6/15/2021
6.0.0-preview.4.21253.5 7,628 5/24/2021
6.0.0-preview.3.21201.13 8,212 4/8/2021
6.0.0-preview.2.21154.6 1,663 3/11/2021 6.0.0-preview.2.21154.6 is deprecated because it is no longer maintained.
6.0.0-preview.1.21103.6 3,529 2/12/2021 6.0.0-preview.1.21103.6 is deprecated because it is no longer maintained.
5.0.17 585,122 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 98,569 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 210,553 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 282,371 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 422,099 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 24,148,815 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 1,076,250 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 1,120,435 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 1,142,696 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 811,084 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 1,058,620 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 847,399 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 1,167,343 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 1,001,955 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 783,167 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 991,434 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 1,874,472 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 16,967,187 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.17 82,033 10/13/2020 5.0.0-rc.2.20475.17 is deprecated because it is no longer maintained.
5.0.0-rc.1.20451.17 665,690 9/14/2020 5.0.0-rc.1.20451.17 is deprecated because it is no longer maintained.
5.0.0-preview.8.20414.8 4,667,596 8/25/2020 5.0.0-preview.8.20414.8 is deprecated because it is no longer maintained.
5.0.0-preview.7.20365.19 13,283 7/21/2020 5.0.0-preview.7.20365.19 is deprecated because it is no longer maintained.
5.0.0-preview.6.20312.15 17,858 6/25/2020 5.0.0-preview.6.20312.15 is deprecated because it is no longer maintained.
5.0.0-preview.5.20279.2 2,324 6/10/2020 5.0.0-preview.5.20279.2 is deprecated because it is no longer maintained.
5.0.0-preview.4.20257.10 1,600 5/18/2020 5.0.0-preview.4.20257.10 is deprecated because it is no longer maintained.
5.0.0-preview.3.20215.14 1,481 4/23/2020 5.0.0-preview.3.20215.14 is deprecated because it is no longer maintained.
5.0.0-preview.2.20167.3 1,305 4/2/2020 5.0.0-preview.2.20167.3 is deprecated because it is no longer maintained.
5.0.0-preview.1.20124.5 1,802 3/16/2020 5.0.0-preview.1.20124.5 is deprecated because it is no longer maintained.
3.1.32 400,485 12/13/2022
3.1.31 47,157 11/8/2022
3.1.30 56,411 10/11/2022
3.1.29 62,604 9/13/2022
3.1.28 60,631 8/9/2022
3.1.27 66,619 7/12/2022
3.1.26 65,361 6/14/2022
3.1.25 101,549 5/10/2022
3.1.24 84,190 4/11/2022
3.1.23 3,408,017 3/8/2022
3.1.22 738,459 12/14/2021
3.1.21 240,158 11/7/2021
3.1.20 265,346 10/11/2021
3.1.19 249,786 9/14/2021
3.1.18 2,405,071 8/10/2021
3.1.17 395,820 7/13/2021
3.1.16 538,732 6/8/2021
3.1.15 354,529 5/11/2021
3.1.14 563,046 4/6/2021
3.1.13 729,861 3/9/2021
3.1.12 520,293 2/9/2021
3.1.11 590,939 1/12/2021
3.1.10 1,411,544 11/9/2020
3.1.9 2,118,554 10/13/2020
3.1.8 5,613,802 9/8/2020
3.1.7 1,433,219 8/11/2020
3.1.6 1,311,844 7/14/2020
3.1.5 1,896,367 6/9/2020
3.1.4 1,559,690 5/12/2020
3.1.3 2,707,216 3/24/2020
3.1.2 1,988,117 2/18/2020
3.1.1 5,322,935 1/14/2020
3.1.0 39,446,965 12/3/2019
3.1.0-preview3.19555.2 5,862 11/13/2019 3.1.0-preview3.19555.2 is deprecated because it is no longer maintained.
3.1.0-preview2.19528.8 1,249 11/1/2019 3.1.0-preview2.19528.8 is deprecated because it is no longer maintained.
3.1.0-preview1.19508.20 1,620 10/15/2019 3.1.0-preview1.19508.20 is deprecated because it is no longer maintained.
3.0.3 1,272,352 2/18/2020 3.0.3 is deprecated because it is no longer maintained.
3.0.2 57,472 1/14/2020 3.0.2 is deprecated because it is no longer maintained.
3.0.0 4,120,510 9/23/2019 3.0.0 is deprecated because it is no longer maintained.
3.0.0-rc1.19457.4 15,690 9/16/2019 3.0.0-rc1.19457.4 is deprecated because it is no longer maintained.
3.0.0-preview9.19424.4 2,297,928 9/4/2019 3.0.0-preview9.19424.4 is deprecated because it is no longer maintained.
3.0.0-preview8.19405.7 9,355 8/13/2019 3.0.0-preview8.19405.7 is deprecated because it is no longer maintained.
3.0.0-preview7.19365.7 32,213 7/23/2019 3.0.0-preview7.19365.7 is deprecated because it is no longer maintained.
3.0.0-preview6.19307.2 7,177 6/12/2019 3.0.0-preview6.19307.2 is deprecated because it is no longer maintained.
3.0.0-preview5-19227-01 11,710 5/6/2019 3.0.0-preview5-19227-01 is deprecated because it is no longer maintained.
3.0.0-preview4-19216-03 4,642 4/18/2019 3.0.0-preview4-19216-03 is deprecated because it is no longer maintained.
3.0.0-preview3-19153-02 115,417 3/6/2019 3.0.0-preview3-19153-02 is deprecated because it is no longer maintained.
3.0.0-preview-19075-0444 4,607 1/29/2019 3.0.0-preview-19075-0444 is deprecated because it is no longer maintained.
2.3.0 6,598 1/14/2025
2.2.0 16,199,309 12/3/2018 2.2.0 is deprecated because it is no longer maintained.
2.2.0-preview3-35497 68,653 10/17/2018 2.2.0-preview3-35497 is deprecated because it is no longer maintained.
2.2.0-preview2-35157 13,584 9/12/2018 2.2.0-preview2-35157 is deprecated because it is no longer maintained.
2.2.0-preview1-35029 9,470 8/22/2018 2.2.0-preview1-35029 is deprecated because it is no longer maintained.
2.1.2 14,644,542 8/21/2018
2.1.1 11,603,461 6/18/2018
2.1.0 12,680,501 5/29/2018
2.1.0-rc1-final 23,130 5/6/2018 2.1.0-rc1-final is deprecated because it is no longer maintained.
2.1.0-preview2-final 30,466 4/10/2018 2.1.0-preview2-final is deprecated because it is no longer maintained.
2.1.0-preview1-final 30,439 2/26/2018 2.1.0-preview1-final is deprecated because it is no longer maintained.
2.0.4 4,025,833 5/7/2018 2.0.4 is deprecated because it is no longer maintained.
2.0.3 7,943,017 3/13/2018 2.0.3 is deprecated because it is no longer maintained.
2.0.1 6,674,414 11/14/2017 2.0.1 is deprecated because it is no longer maintained.
2.0.0 6,826,263 8/11/2017 2.0.0 is deprecated because it is no longer maintained.
2.0.0-preview2-final 57,549 6/27/2017 2.0.0-preview2-final is deprecated because it is no longer maintained.
2.0.0-preview1-final 25,612 5/10/2017 2.0.0-preview1-final is deprecated because it is no longer maintained.
1.1.3 226,356 9/20/2017 1.1.3 is deprecated because it is no longer maintained.
1.1.2 390,935 5/9/2017 1.1.2 is deprecated because it is no longer maintained.
1.1.1 228,498 3/6/2017 1.1.1 is deprecated because it is no longer maintained.
1.1.0 190,522 11/16/2016 1.1.0 is deprecated because it is no longer maintained.
1.1.0-preview1-final 6,039 10/24/2016 1.1.0-preview1-final is deprecated because it is no longer maintained.
1.0.5 7,868 11/14/2017 1.0.5 is deprecated because it is no longer maintained.
1.0.4 5,068 9/20/2017 1.0.4 is deprecated because it is no longer maintained.
1.0.3 8,713 5/9/2017 1.0.3 is deprecated because it is no longer maintained.
1.0.2 71,371 3/6/2017 1.0.2 is deprecated because it is no longer maintained.
1.0.1 19,329 12/12/2016 1.0.1 is deprecated because it is no longer maintained.
1.0.0 248,816 6/27/2016 1.0.0 is deprecated because it is no longer maintained.
1.0.0-rc2-final 12,460 5/16/2016 1.0.0-rc2-final is deprecated because it is no longer maintained.