Integrating the GitHub Provider

July 11, 2020 ยท View on GitHub

Example

services.AddAuthentication(options => /* Auth configuration */)
        .AddGitHub(options =>
        {
            options.ClientId = "my-client-id";
            options.ClientSecret = "my-client-secret";

            // Optional domain name for GitHub Enterprise on-premises deployments
            options.EnterpriseDomain = "github.corp.local";
        });

Required Additional Settings

None.

Optional Settings

Property NameProperty TypeDescriptionDefault Value
EnterpriseDomainstring?The domain name to use for a GitHub Enterprise on-premises deployment.null
UserEmailsEndpointstringThe address of the endpoint exposing the email addresses associated with the logged in user.GitHubAuthenticationDefaults.UserEmailsEndpoint