> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dezerx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub login

> Let customers sign in with their GitHub account.

![The OAuth app section of the GitHub login settings](https://mintcdn.com/dezerx/5Dcc9_tGN8Ne6sDs/public/providers/github/settings.webp?fit=max\&auto=format\&n=5Dcc9_tGN8Ne6sDs\&q=85\&s=07ee40b41c97f03a4d0bf5a9e3c973bf)

## Create the GitHub app

**1. Open developer settings**

In GitHub go to Settings, Developer settings, OAuth Apps, New OAuth App.

**2. Enter the details**

Give it a name and set the Homepage URL to your billing site.

**3. Add the callback URL**

Set Authorization callback URL to the redirect URL from the Spartan settings page. It looks like this, with your own billing domain:

```text theme={null}
https://billing.example.com/auth/github/callback
```

**4. Copy the keys**

Register the app and copy the Client ID. Then press Generate a new client secret and copy it, GitHub shows it only once.

## Fill in Spartan

Open Admin, Integrations, Modules, Sign-in providers and press Settings on GitHub.

| Field | Value |
| - | - |
| Show on the login page | On by default. Turn it off to hide the button without removing the keys |
| Client ID | From GitHub |
| Client secret | From GitHub. Once saved it is never shown again, leave the field blank to keep it |
| Redirect URL | Filled in with this site's callback URL. Press Copy and paste the same URL into GitHub |

Press Save settings. The Setup checklist on the right ticks off each step, and Details shows whether the button is shown and the redirect URL matches this site. Spartan asks GitHub for the user:email scope.

> [!NOTE]
>
> The GitHub button only appears once a client ID and secret are saved, even if Show on the login page is on.

> [!NOTE]
>
> An existing account is only linked by e-mail when GitHub confirms it as the verified primary address.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.