Skip to main content
Auth0 supports sign in with GitHub, allowing your users to authenticate with their GitHub accounts through . Adding GitHub as a social login option provides a fast, familiar sign-in experience for developers and technical users. To set up this connection, you register an OAuth application in GitHub, then configure the connection in the Auth0 Dashboard using the credentials GitHub provides.

Before you start

Before you configure GitHub as a social connection, you need:
  1. An Auth0 account. If you do not have one, you can sign up for free.
  2. A GitHub account.
  3. An application registered in the Auth0 Dashboard.

Configure GitHub

Create an OAuth application in GitHub to generate the credentials Auth0 needs to establish the connection.
1

Open GitHub Developer Settings

Log in to your GitHub account. Select your profile photo in the upper-right corner, then select Settings. In the left sidebar, select Developer settings, then select OAuth Apps.
2

Register a new OAuth application

Select New OAuth App. If you have not created any applications before, select Register a new application.Complete the following fields:
FieldValue
Application nameA name your users will recognize and trust, for example My App (Auth0)
Homepage URLThe full URL to your application homepage, for example https://myapp.example.com
Application description(Optional) A description displayed to all users of your application
Authorization callback URLhttps://YOUR_AUTH0_DOMAIN/login/callback
Replace YOUR_AUTH0_DOMAIN with your Auth0 tenant domain. You can find this value in Auth0 Dashboard > Applications > Applications under the Settings tab.You can leave Enable Device Flow unchecked unless your application requires device-based authorization.Select Register application.
3

Copy the Client ID and Client Secret

After registration, GitHub displays the application details page. Copy the Client ID value.Select Generate a new client secret to create a secret. Copy the generated value immediately.
GitHub displays the Client Secret only once. Store it securely before navigating away from the page. If you lose it, you must generate a new one.

Configure Auth0

Add the GitHub connection to your Auth0 tenant and enter the credentials from the previous section.
1

Create a GitHub connection

Navigate to Auth0 Dashboard > Authentication > Social and select Create Connection. Select GitHub from the list of providers.
2

Select the connection purpose

Under Purpose, specify how this connection will be used: for login, connected accounts, or both.
3

Enter your GitHub credentials

In General, enter the Client ID and Client Secret you copied from GitHub.
4

Select permissions

Under Permissions, select the permissions your application requires. Most applications need Email address for the user’s email and Read user for profile information.
5

Save and enable the connection

Select Create to save the connection.Select the Applications tab and enable the connection for the applications that should offer GitHub login.

Test the connection

Verify that the GitHub connection works before deploying to production.
  1. Navigate to Auth0 Dashboard > Authentication > Social.
  2. Select the GitHub connection from the list.
  3. Select Try Connection.
  4. Authenticate with your GitHub account when prompted.
  5. Confirm that Auth0 returns user profile data, including the user’s GitHub username and email address.

Keep reading