Microsoft.AspNetCore.Authentication.OpenIdConnect 11.0.0-rc.1.26425.128

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.

Showing the top 20 packages that depend on Microsoft.AspNetCore.Authentication.OpenIdConnect.

Packages Downloads
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
38
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
39
Microsoft.Identity.Web
This package enables ASP.NET Core Web apps and Web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
39
Microsoft.Identity.Web
This package enables ASP.NET Core Web apps and Web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
41
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
39
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
40
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
41
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
42
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
43
Microsoft.Identity.Web
This package enables ASP.NET Core Web apps and Web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
44
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
45
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
48
Microsoft.Identity.Web
This package enables ASP.NET Core web apps and web APIs to use the Microsoft identity platform (formerly Azure AD v2.0). This package is specifically used for web applications, which sign-in users, and protected web APIs, which optionally call downstream web APIs.
51
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
40

Version Downloads Last updated
11.0.0-rc.1.26425.128 1 09/11/2026
11.0.0-preview.7.26381.103 1 08/15/2026
11.0.0-preview.6.26359.118 7 07/26/2026
11.0.0-preview.5.26302.115 12 06/15/2026
11.0.0-preview.4.26230.115 2 05/26/2026
11.0.0-preview.3.26207.106 4 04/16/2026
11.0.0-preview.2.26159.112 15 03/11/2026
11.0.0-preview.1.26104.118 16 02/12/2026
10.0.12 0 09/08/2026
10.0.11 1 08/15/2026
10.0.10 7 07/26/2026
10.0.9 10 06/15/2026
10.0.8 7 05/24/2026
10.0.7 10 05/06/2026
10.0.6 9 04/16/2026
10.0.5 6 03/15/2026
10.0.4 10 03/11/2026
10.0.3 7 02/12/2026
10.0.2 13 01/14/2026
10.0.1 15 12/11/2025
10.0.0 20 11/19/2025
10.0.0-rc.2.25502.107 15 10/19/2025
10.0.0-rc.1.25451.107 14 09/12/2025
10.0.0-preview.7.25380.108 13 08/20/2025
10.0.0-preview.6.25358.103 17 07/17/2025
10.0.0-preview.5.25277.114 19 06/07/2025
10.0.0-preview.4.25258.110 16 05/16/2025
10.0.0-preview.3.25172.1 24 04/19/2025
10.0.0-preview.2.25164.1 22 03/29/2025
10.0.0-preview.1.25120.3 21 02/26/2025
9.0.20 0 09/08/2026
9.0.19 1 08/15/2026
9.0.18 8 07/25/2026
9.0.17 6 06/15/2026
9.0.16 6 05/24/2026
9.0.15 11 04/16/2026
9.0.14 11 03/11/2026
9.0.13 15 02/12/2026
9.0.12 10 01/14/2026
9.0.11 14 11/19/2025
9.0.10 9 10/22/2025
9.0.9 12 09/12/2025
9.0.8 16 08/07/2025
9.0.7 14 07/09/2025
9.0.6 12 06/27/2025
9.0.5 18 05/16/2025
9.0.4 17 04/19/2025
9.0.3 20 03/29/2025
9.0.2 19 02/26/2025
9.0.1 19 01/19/2025
9.0.0 24 02/25/2025
9.0.0-rc.2.24474.3 25 01/19/2025
9.0.0-rc.1.24452.1 23 10/06/2024
9.0.0-preview.7.24406.2 22 10/06/2024
9.0.0-preview.6.24328.4 16 01/09/2025
9.0.0-preview.5.24306.11 24 01/19/2025
9.0.0-preview.4.24267.6 15 02/14/2025
9.0.0-preview.3.24172.13 23 11/29/2024
9.0.0-preview.2.24128.4 22 03/29/2024
9.0.0-preview.1.24081.5 26 03/09/2024
8.0.31 0 09/08/2026
8.0.30 1 08/15/2026
8.0.29 2 07/25/2026
8.0.28 12 06/15/2026
8.0.27 17 05/24/2026
8.0.26 4 04/16/2026
8.0.25 10 03/11/2026
8.0.24 10 02/12/2026
8.0.23 8 01/14/2026
8.0.22 17 11/19/2025
8.0.21 18 10/20/2025
8.0.20 18 09/12/2025
8.0.19 20 08/07/2025
8.0.18 20 07/09/2025
8.0.17 26 06/27/2025
8.0.16 30 05/16/2025
8.0.15 19 04/19/2025
8.0.14 26 03/29/2025
8.0.13 20 02/26/2025
8.0.12 22 01/19/2025
8.0.11 24 01/19/2025
8.0.10 28 12/10/2024
8.0.8 27 03/01/2025
8.0.7 22 12/28/2024
8.0.6 19 03/05/2025
8.0.5 15 03/04/2025
8.0.4 21 02/20/2025
8.0.3 25 03/29/2024
8.0.2 19 03/02/2024
8.0.1 28 03/16/2024
8.0.0 18 03/06/2024
8.0.0-rc.2.23480.2 26 03/17/2024
8.0.0-rc.1.23421.29 26 03/02/2024
8.0.0-preview.7.23375.9 17 03/02/2024
8.0.0-preview.6.23329.11 21 03/11/2024
8.0.0-preview.5.23302.2 26 03/14/2024
8.0.0-preview.4.23260.4 18 11/03/2024
8.0.0-preview.3.23177.8 24 03/10/2024
8.0.0-preview.2.23153.2 19 03/10/2024
8.0.0-preview.1.23112.2 29 03/09/2024
7.0.20 28 10/06/2024
7.0.19 22 10/06/2024
7.0.18 24 10/06/2024
7.0.17 21 03/29/2024
7.0.16 19 03/01/2024
7.0.15 15 03/18/2024
7.0.14 23 01/03/2024
7.0.13 28 03/01/2024
7.0.12 28 03/02/2024
7.0.11 23 03/01/2024
7.0.10 22 03/07/2024
7.0.9 26 03/06/2024
7.0.8 28 03/07/2024
7.0.7 30 03/07/2024
7.0.5 35 03/16/2024
7.0.4 24 03/16/2024
7.0.3 25 03/02/2024
7.0.2 22 03/01/2024
7.0.1 36 01/03/2024
7.0.0 22 01/13/2024
7.0.0-rc.2.22476.2 20 03/08/2024
7.0.0-rc.1.22427.2 31 03/15/2024
7.0.0-preview.7.22376.6 21 03/10/2024
7.0.0-preview.6.22330.3 19 03/09/2024
7.0.0-preview.5.22303.8 23 03/11/2024
7.0.0-preview.4.22251.1 20 03/28/2024
7.0.0-preview.3.22178.4 23 03/08/2024
7.0.0-preview.2.22153.2 18 03/05/2025
7.0.0-preview.1.22109.13 20 03/08/2024
6.0.36 28 01/19/2025
6.0.35 21 01/19/2025
6.0.33 16 01/19/2025
6.0.32 20 10/06/2024
6.0.31 29 10/06/2024
6.0.30 22 11/28/2024
6.0.29 17 03/05/2025
6.0.28 25 03/29/2024
6.0.27 24 03/15/2024
6.0.26 22 03/17/2024
6.0.25 27 12/02/2024
6.0.24 32 03/12/2024
6.0.23 22 03/15/2024
6.0.22 22 03/12/2024
6.0.21 25 03/15/2024
6.0.20 28 03/12/2024
6.0.19 22 03/14/2024
6.0.18 21 03/14/2024
6.0.16 27 03/12/2024
6.0.15 21 03/15/2024
6.0.14 23 03/15/2024
6.0.13 29 03/15/2024
6.0.12 25 03/14/2024
6.0.11 16 03/15/2024
6.0.10 23 03/15/2024
6.0.9 24 03/15/2024
6.0.8 18 03/15/2024
6.0.7 26 03/15/2024
6.0.6 19 03/15/2024
6.0.5 23 03/15/2024
6.0.4 26 03/15/2024
6.0.3 24 03/15/2024
6.0.2 23 03/15/2024
6.0.1 25 01/28/2024
6.0.0 21 03/02/2024
6.0.0-rc.2.21480.10 22 03/19/2024
6.0.0-rc.1.21452.15 18 03/18/2024
6.0.0-preview.7.21378.6 26 03/15/2024
6.0.0-preview.6.21355.2 24 03/17/2024
6.0.0-preview.5.21301.17 25 03/18/2024
6.0.0-preview.4.21253.5 24 03/17/2024
6.0.0-preview.3.21201.13 22 03/16/2024
6.0.0-preview.2.21154.6 22 03/06/2024
6.0.0-preview.1.21103.6 22 03/16/2024
5.0.17 25 03/15/2024
5.0.16 22 03/15/2024
5.0.15 19 03/15/2024
5.0.14 26 03/15/2024
5.0.13 26 03/07/2024
5.0.12 28 01/02/2024
5.0.11 26 03/15/2024
5.0.10 20 03/15/2024
5.0.9 24 03/07/2024
5.0.8 24 03/15/2024
5.0.7 22 03/15/2024
5.0.6 16 03/15/2024
5.0.5 28 03/20/2024
5.0.4 32 03/20/2024
5.0.3 21 03/19/2024
5.0.2 23 03/19/2024
5.0.1 31 03/18/2024
5.0.0 17 03/18/2024
5.0.0-rc.2.20475.17 25 03/17/2024
5.0.0-rc.1.20451.17 22 03/17/2024
5.0.0-preview.8.20414.8 23 03/14/2024
5.0.0-preview.7.20365.19 21 03/16/2024
5.0.0-preview.6.20312.15 20 03/16/2024
5.0.0-preview.5.20279.2 21 03/17/2024
5.0.0-preview.4.20257.10 22 03/16/2024
5.0.0-preview.3.20215.14 16 03/17/2024
5.0.0-preview.2.20167.3 23 03/17/2024
5.0.0-preview.1.20124.5 25 03/17/2024
3.1.32 27 03/06/2024
3.1.31 18 03/06/2024
3.1.30 23 03/15/2024
3.1.29 20 03/07/2024
3.1.28 28 03/07/2024
3.1.27 26 03/17/2024
3.1.26 26 03/07/2024
3.1.25 25 03/07/2024
3.1.24 22 03/07/2024
3.1.23 20 03/15/2024
3.1.22 28 03/06/2024
3.1.21 22 03/07/2024
3.1.20 17 03/07/2024
3.1.19 25 03/15/2024
3.1.18 25 03/22/2024
3.1.17 39 03/15/2024
3.1.16 26 03/15/2024
3.1.15 22 02/27/2025
3.1.14 21 03/15/2024
3.1.13 23 03/15/2024
3.1.12 30 03/15/2024
3.1.11 20 03/15/2024
3.1.10 20 03/15/2024
3.1.9 25 03/07/2024
3.1.8 17 03/15/2024
3.1.7 21 03/16/2024
3.1.6 30 03/01/2024
3.1.5 23 03/02/2024
3.1.4 21 03/16/2024
3.1.3 32 03/15/2024
3.1.2 26 03/07/2024
3.1.1 19 03/15/2024
3.1.0 19 03/02/2024
3.1.0-preview3.19555.2 18 03/14/2024
3.1.0-preview2.19528.8 23 03/11/2024
3.1.0-preview1.19508.20 20 03/16/2024
3.0.3 18 03/15/2024
3.0.2 30 03/15/2024
3.0.0 18 03/16/2024
3.0.0-rc1.19457.4 25 03/09/2024
3.0.0-preview9.19424.4 20 03/16/2024
3.0.0-preview8.19405.7 20 03/02/2024
3.0.0-preview7.19365.7 23 03/11/2024
3.0.0-preview6.19307.2 20 03/14/2024
3.0.0-preview5-19227-01 24 03/14/2024
3.0.0-preview4-19216-03 21 03/14/2024
3.0.0-preview3-19153-02 22 03/11/2024
3.0.0-preview-19075-0444 25 03/14/2024
2.3.13 0 09/08/2026
2.3.12 1 08/15/2026
2.3.11 7 06/15/2026
2.3.10 4 05/24/2026
2.3.9 11 01/09/2026
2.3.8 15 01/09/2026
2.3.0 20 01/19/2025
2.2.0 20 01/24/2024
2.2.0-preview3-35497 25 03/11/2024
2.2.0-preview2-35157 23 03/02/2024
2.2.0-preview1-35029 21 03/07/2024
2.1.2 19 03/01/2024
2.1.1 25 03/15/2024
2.1.0 23 03/06/2024
2.1.0-rc1-final 17 03/15/2024
2.1.0-preview2-final 17 03/08/2024
2.1.0-preview1-final 21 03/15/2024
2.0.4 24 03/16/2024
2.0.3 21 03/15/2024
2.0.1 26 01/21/2024
2.0.0 26 03/01/2024
2.0.0-preview2-final 31 03/06/2024
2.0.0-preview1-final 20 03/02/2024
1.1.3 16 03/15/2024
1.1.2 24 03/15/2024
1.1.1 27 03/12/2024
1.1.0 19 03/17/2024
1.1.0-preview1-final 24 03/02/2024
1.0.5 20 03/07/2024
1.0.4 20 03/15/2024
1.0.3 25 03/15/2024
1.0.2 26 03/14/2024
1.0.1 29 03/15/2024
1.0.0 20 01/25/2024
1.0.0-rc2-final 23 03/16/2024