AspNet.Security.OAuth.GitHub
9.1.0
See the version list below for details.
dotnet add package AspNet.Security.OAuth.GitHub --version 9.1.0
NuGet\Install-Package AspNet.Security.OAuth.GitHub -Version 9.1.0
<PackageReference Include="AspNet.Security.OAuth.GitHub" Version="9.1.0" />
<PackageVersion Include="AspNet.Security.OAuth.GitHub" Version="9.1.0" />
<PackageReference Include="AspNet.Security.OAuth.GitHub" />
paket add AspNet.Security.OAuth.GitHub --version 9.1.0
#r "nuget: AspNet.Security.OAuth.GitHub, 9.1.0"
#addin nuget:?package=AspNet.Security.OAuth.GitHub&version=9.1.0
#tool nuget:?package=AspNet.Security.OAuth.GitHub&version=9.1.0
AspNet.Security.OAuth.Providers
AspNet.Security.OAuth.Providers is a collection of security middleware that you can use in your ASP.NET Core application to support social authentication providers like GitHub, Twitter/X or Dropbox. It is directly inspired by Jerrie Pelser's initiative, Owin.Security.Providers.
The latest official release can be found on NuGet and the nightly builds on MyGet.
[!TIP] While the aspnet-contrib providers are still fully supported, developers are encouraged to use the OpenIddict client for new applications.
For information, see the Migrating to OpenIddict section.
Getting started
Adding social authentication to your application is a breeze and just requires a few lines in your Startup
class:
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(options => { /* Authentication options */ })
.AddGitHub(options =>
{
options.ClientId = "49e302895d8b09ea5656";
options.ClientSecret = "98f1bf028608901e9df91d64ee61536fe562064b";
});
}
public void Configure(IApplicationBuilder app)
{
app.UseAuthentication();
app.UseAuthorization();
}
See the /samples directory for a complete sample using ASP.NET Core MVC and supporting multiple social providers.
Contributing
AspNet.Security.OAuth.Providers is actively maintained by:
We would love it if you could help contributing to this repository.
Special thanks to our contributors:
- Aaron Sadler
- Abhinav Nigam
- Adam Reisinger
- Albert Zakiev
- Albireo
- Anders Blankholm
- Andrew Lock
- Andrew Mattie
- Andrii Chebukin
- Anthony Yates
- Chino Chang
- Chris Sung
- CoCo Lin
- Dave Timmins
- Dmitry Popov
- Drew Killion
- Elan Hasson
- Eric Green
- Ethan Celletti
- Floris Westerman
- Galo
- Gehongyan
- Igor Simovic
- James Holcomb
- Jason Loeffler
- Jerrie Pelser
- Jesse Mandel
- Jordan Knight
- Kévin Chalet
- Konstantin Mamaev
- LeaFrock
- Levi Muriuki
- Luke Fulliton
- Mariusz Zieliński
- Martin Costello
- Matthew Moore
- Maxime Roussin-Bélanger
- Michael Knowles
- Michael Tanczos
- Patrick Westerhoff
- Robert Shade
- saber-wang
- Sinan
- Stefan
- Steffen Wenz
- Tathagata Chakraborty
- TheUltimateC0der
- Tolbxela
- Tommy Parnell
- twsl
- wplong11
- Yannic Smeets
- zAfLu
- zhengchun
- Vicente Yu
- Volodymyr Baydalka
- Logan Dam
Security policy
Please see SECURITY.md for information about reporting security issues and bugs.
Support
Need help or wanna share your thoughts? Don't hesitate to join us on Gitter or ask your question on StackOverflow:
- Gitter: https://gitter.im/aspnet-contrib/AspNet.Security.OAuth.Providers
- StackOverflow: https://stackoverflow.com/questions/tagged/aspnet-contrib
License
This project is licensed under the Apache License. This means that you can use, modify and distribute it freely. See https://www.apache.org/licenses/LICENSE-2.0.html for more details.
Migrating to OpenIddict
The OpenIddict client and its 75+ web providers have significant advantages over the simpler OAuth 2.0-only authentication handler that is used by the aspnet-contrib providers:
- OpenIddict fully supports OpenID Connect, which allows enforcing additional security checks for providers that implement it.
- The OpenIddict client is stateful and provides built-in countermeasures against nonce/token replay attacks.
- While the aspnet-contrib providers only support the OAuth 2.0 code flow, the OpenIddict providers support additional flows, including the OpenID Connect hybrid flow, the OAuth 2.0 client credentials grant, the resource owner password credentials grant or the refresh token grant.
- The OpenIddict client supports OAuth 2.0 token introspection and OAuth 2.0 token revocation.
- OpenIddict uses OAuth 2.0 and OpenID Connect server configuration discovery to avoid hardcoding the endpoint URIs of a provider when possible, making the OpenIddict web providers more robust and more future-proof.
- While the aspnet-contrib providers require targeting the latest ASP.NET Core version, the OpenIddict web providers can be used in any supported version. They can also be used in ASP.NET 4.6.1+ websites and Windows/Linux desktop applications.
- OpenIddict uses
Microsoft.Extensions.Http.Polly
(orMicrosoft.Extensions.Http.Resilience
on .NET 8+) to make backchannel HTTP communications less prone to transient network errors.
For more information on how to get started with the OpenIddict web providers, you can read:
To contribute a new OpenIddict provider, visit Contributing a new Web provider.
Providers
Links to the latest stable and nightly NuGet packages for each provider, as well as a link to their integration documentation are listed in the table below.
Documentation for the providers' settings can be found here.
If a provider you're looking for does not exist, consider making a PR to add one.
Product | Versions 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. |
-
net9.0
- No dependencies.
NuGet packages (13)
Showing the top 5 NuGet packages that depend on AspNet.Security.OAuth.GitHub:
Package | Downloads |
---|---|
FenixAlliance.ACL.Dependencies
Application Component for the Alliance Business Suite. |
|
IdentityServer4MicroService
MicroService based on IdentityServer4 + Azure API Management |
|
OAuthApp
OAuth2.0的Saas用户中心框架。 |
|
CyberEye.Identity.Lib
Package chứa các thư viện, hàm tiện ích, class model về ASP.NET Identity |
|
AuthScape.Services
Available soon |
GitHub repositories (18)
Showing the top 18 popular GitHub repositories that depend on AspNet.Security.OAuth.GitHub:
Repository | Stars |
---|---|
skoruba/IdentityServer4.Admin
The administration for the IdentityServer4 and Asp.Net Core Identity
|
|
davidfowl/TodoApp
Todo application with ASP.NET Core Blazor WASM, Minimal APIs and Authentication
|
|
SciSharp/BotSharp
AI Multi-Agent Framework in .NET
|
|
Squidex/squidex
Headless CMS and Content Managment Hub
|
|
servicetitan/Stl.Fusion
Build real-time apps (Blazor included) with less than 1% of extra code responsible for real-time updates. Host 10-1000x faster APIs relying on transparent and nearly 100% consistent caching. We call it DREAM, or Distributed REActive Memoization, and it's here to turn real-time on!
|
|
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
|
|
luoyunchong/lin-cms-dotnetcore
😃A simple and practical CMS implemented by .NET + FreeSql;前后端分离、Docker部署、OAtuh2授权登录、自动化部署DevOps、自动同步至Gitee、代码生成器、仿掘金专栏
|
|
notifo-io/notifo
Multi channel notification service for collaboration tools, e-commerce, news service and more.
|
|
csharpfritz/csharp_with_csharpfritz
Show notes, slides, and samples from the CSharp with CSharpFritz show
|
|
skoruba/Duende.IdentityServer.Admin
The administration for the Duende IdentityServer and Asp.Net Core Identity ⚡
|
|
martincostello/dotnet-minimal-api-integration-testing
An example of integration testing ASP.NET Core Minimal hosting and APIs
|
|
solenovex/Identity-Server-4-Tutorial-Demo-Code
Identity Server 4 视频教程配套源码
|
|
VirtoCommerce/vc-storefront
Virto Commerce Storefront - ASP.NET Core 8.0
|
|
TheUltimateC0der/listrr
listrr.pro creates and maintains lists on trakt.tv completely automated based on your filters.
|
|
servicetitan/Stl.Fusion.Samples
A collection of samples for Fusion library: https://github.com/servicetitan/Stl.Fusion
|
|
CnGal/CnGalWebSite
CnGal是一个非营利性的,立志于收集整理国内制作组创作的中文Galgame/AVG的介绍、攻略、评测、感想等内容的资料性质的网站。
|
|
luoyunchong/dotnetcore-examples
about learning DotNetCore via examples. DotNetCore 教程、技术栈示例代码,快速简单上手教程。
|
|
FritzAndFriends/TagzApp
An application that discovers content on social media for hashtags
|
Version | Downloads | Last updated |
---|---|---|
9.2.0 | 2,547 | 3/23/2025 |
9.1.0 | 1,308 | 3/14/2025 |
9.0.0 | 35,481 | 11/12/2024 |
8.3.0 | 19,010 | 11/7/2024 |
8.2.0 | 30,628 | 9/14/2024 |
8.1.0 | 34,745 | 6/14/2024 |
8.0.0 | 104,953 | 11/14/2023 |
7.0.4 | 46,436 | 8/15/2023 |
7.0.3 | 10,730 | 8/7/2023 |
7.0.2 | 50,091 | 4/16/2023 |
7.0.1 | 962 | 4/16/2023 |
7.0.0 | 59,379 | 11/7/2022 |
6.0.15 | 63,433 | 4/16/2023 |
6.0.14 | 13,836 | 11/2/2022 |
6.0.13 | 838 | 11/1/2022 |
6.0.12 | 5,270 | 10/10/2022 |
6.0.11 | 45,270 | 9/4/2022 |
6.0.10 | 4,409 | 8/31/2022 |
6.0.9 | 14,668 | 8/24/2022 |
6.0.8 | 27,152 | 8/19/2022 |
6.0.7 | 12,997 | 8/16/2022 |
6.0.6 | 680,023 | 4/20/2022 |
6.0.5 | 6,627 | 3/27/2022 |
6.0.4 | 25,959 | 2/10/2022 |
6.0.3 | 69,865 | 1/22/2022 |
6.0.2 | 8,385 | 1/6/2022 |
6.0.1 | 4,962 | 12/11/2021 |
6.0.0 | 9,032 | 11/8/2021 |
5.0.18 | 9,581 | 10/29/2021 |
5.0.17 | 755 | 10/26/2021 |
5.0.16 | 4,044 | 10/9/2021 |
5.0.15 | 1,528 | 10/4/2021 |
5.0.14 | 1,418 | 9/25/2021 |
5.0.13 | 619 | 9/24/2021 |
5.0.12 | 3,132 | 9/11/2021 |
5.0.11 | 4,152 | 8/24/2021 |
5.0.10 | 2,030 | 8/13/2021 |
5.0.9 | 5,195 | 7/28/2021 |
5.0.8 | 8,042 | 7/4/2021 |
5.0.7 | 18,366 | 6/20/2021 |
5.0.6 | 6,813 | 6/4/2021 |
5.0.5 | 655 | 6/3/2021 |
5.0.4 | 48,682 | 4/7/2021 |
5.0.3 | 1,632 | 3/26/2021 |
5.0.2 | 2,226 | 3/13/2021 |
5.0.1 | 13,225 | 2/1/2021 |
5.0.0 | 25,670 | 11/10/2020 |
3.1.8 | 3,147 | 8/31/2022 |
3.1.7 | 12,682 | 2/1/2021 |
3.1.6 | 35,600 | 10/26/2020 |
3.1.5 | 4,245 | 10/20/2020 |
3.1.4 | 18,240 | 10/6/2020 |
3.1.3 | 110,523 | 7/16/2020 |
3.1.2 | 3,256 | 7/8/2020 |
3.1.1 | 12,589 | 5/8/2020 |
3.1.0 | 9,942 | 4/20/2020 |
3.0.0 | 84,277 | 10/14/2019 |
2.2.2 | 4,672 | 5/8/2020 |
2.2.1 | 609 | 4/20/2020 |
2.2.0 | 8,026 | 10/14/2019 |
2.1.0 | 17,701 | 6/6/2019 |
2.0.1 | 61,329 | 1/21/2019 |
2.0.0 | 17,992 | 6/18/2018 |
2.0.0-rc2-final | 9,311 | 12/18/2017 |
1.0.1 | 827 | 1/21/2019 |
1.0.0 | 1,545 | 6/18/2018 |
1.0.0-rc2-final | 922 | 12/18/2017 |
1.0.0-rc1-final | 3,238 | 5/8/2017 |
1.0.0-beta3-final | 9,353 | 3/13/2017 |
1.0.0-beta2-final | 1,676 | 11/30/2016 |
1.0.0-beta1-final | 3,292 | 7/1/2016 |
1.0.0-alpha4-final | 1,548 | 5/18/2016 |
1.0.0-alpha3 | 1,225 | 11/20/2015 |
1.0.0-alpha2 | 1,062 | 10/16/2015 |
1.0.0-alpha1 | 1,110 | 9/3/2015 |