Microsoft.AspNetCore.Authentication.OpenIdConnect 10.0.15

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
Volo.Abp.AspNetCore
Package Description
46
Volo.Abp.AspNetCore
Package Description
45
Volo.Abp.AspNetCore
Package Description
44
Volo.Abp.AspNetCore
Package Description
43
Volo.Abp.AspNetCore
Package Description
42

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