|
| 1 | +# OAuth Provider Documentation |
| 2 | + |
| 3 | +This document contains some introductory information about how to integrate the |
| 4 | +OAuth providers in this repository into an ASP.NET Core application. |
| 5 | + |
| 6 | +It assumes a general familiarity with ASP.NET Core and authorization, and is |
| 7 | +intended to demonstrate how to configure it for your application, not how it |
| 8 | +works internally. Further integration details for a given provider can be found |
| 9 | +in the services' own documentation, which are linked to in the main [README](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers#providers "Table of OAuth providers"). |
| 10 | + |
| 11 | +## Generic Documentation |
| 12 | + |
| 13 | +Most of the OAuth providers in this repository can be configured by just |
| 14 | +specifying two settings: [`ClientId`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authentication.oauth.oauthoptions.clientid "OAuthOptions.ClientId Property") and [`ClientSecret`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authentication.oauth.oauthoptions.clientsecret "OAuthOptions.ClientSecret Property"). |
| 15 | + |
| 16 | +Let's use the Slack provider as an example: |
| 17 | + |
| 18 | +```csharp |
| 19 | +services.AddAuthentication(options => /* Auth configuration */) |
| 20 | + .AddSlack(options => |
| 21 | + { |
| 22 | + options.ClientId = "my-client-id"; |
| 23 | + options.ClientSecret = "my-client-secret"; |
| 24 | + }); |
| 25 | +``` |
| 26 | + |
| 27 | +With just two settings, you can configure the Slack provider to authenticate users. |
| 28 | + |
| 29 | +The providers all follow a convention, so you just need to add the appropriate |
| 30 | +NuGet package reference and replace the word `Slack` in the method name with the |
| 31 | +provider name you are integrating. So for Spotify, it would be `AddSpotify()`. |
| 32 | + |
| 33 | +## Provider-Specific Documentation |
| 34 | + |
| 35 | +Any providers listed here have additional configuration that is either required |
| 36 | +or optional beyond the standard built-in [OAuth configuration settings](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authentication.oauth.oauthoptions "OAuthOptions Class"). |
| 37 | + |
| 38 | +The table below lists all of the providers that provide additional configuration |
| 39 | +and a link to a provider-specific document for that provider. If the provider |
| 40 | +you are using is not listed, it does not have any specific documentation and is |
| 41 | +covered by the section above. |
| 42 | + |
| 43 | +| Provider | Required or Optional Settings | Documentation Link | |
| 44 | +|:-:|:-:|:-:| |
| 45 | +| Amazon | _Optional_ | [Documentation](amazon.md "Amazon provider documentation") | |
| 46 | +| Apple | **Required** | [Documentation](sign-in-with-apple.md "Apple provider documentation") | |
| 47 | +| BattleNet | **Required** | [Documentation](battlenet.md "BattleNet provider documentation") | |
| 48 | +| Bitbucket | _Optional_ | [Documentation](bitbucket.md "Bitbucket provider documentation") | |
| 49 | +| Discord | _Optional_ | [Documentation](discord.md "Discord provider documentation") | |
| 50 | +| EVEOnline | _Optional_ | [Documentation](eveonline.md "EVEOnline provider documentation") | |
| 51 | +| Foursquare | _Optional_ | [Documentation](foursquare.md "Foursquare provider documentation") | |
| 52 | +| GitHub | _Optional_ | [Documentation](github.md "GitHub provider documentation") | |
| 53 | +| Gitee | _Optional_ | [Documentation](gitee.md "Gitee provider documentation") | |
| 54 | +| Instagram | _Optional_ | [Documentation](instagram.md "Instagram provider documentation") | |
| 55 | +| LinkedIn | _Optional_ | [Documentation](linkedin.md "LinkedIn provider documentation") | |
| 56 | +| Odnoklassniki | _Optional_ | [Documentation](odnoklassniki.md "Odnoklassniki provider documentation") | |
| 57 | +| Okta | **Required** | [Documentation](okta.md "Okta provider documentation") | |
| 58 | +| Patreon | _Optional_ | [Documentation](patreon.md "Patreon provider documentation") | |
| 59 | +| QQ | _Optional_ | [Documentation](qq.md "QQ provider documentation") | |
| 60 | +| Reddit | _Optional_ | [Documentation](reddit.md "Reddit provider documentation") | |
| 61 | +| Salesforce | _Optional_ | [Documentation](salesforce.md "Salesforce provider documentation") | |
| 62 | +| StackExchange | _Optional_ | [Documentation](stackexchange.md "StackExchange provider documentation") | |
| 63 | +| SuperOffice | **Required** | [Documentation](superoffice.md "SuperOffice provider documentation") | |
| 64 | +| Trakt | _Optional_ | [Documentation](trakt.md "Trakt provider documentation") | |
| 65 | +| Twitch | _Optional_ | [Documentation](twitch.md "Twitch provider documentation") | |
| 66 | +| Vkontakte | _Optional_ | [Documentation](vkontakte.md "Vkontakte provider documentation") | |
| 67 | +| Weibo | _Optional_ | [Documentation](weibo.md "Weibo provider documentation") | |
0 commit comments