GitHub is the default connector for developer tools. The account is already open in the browser, the profile is rich, and sign-in doubles as proof that the user is a developer.

## Copy the redirect URI

In the [Authdog console](https://console.authdog.com), select the project and environment, open **Authentication > Providers**, find **GitHub**, and click **Enable**. Copy the redirect URI shown in the form:

```url
https://identity.authdog.com/api/v1/callback/<connectionId>
```

## Create the OAuth app

1. Open [Developer settings > OAuth Apps](https://github.com/settings/developers).
2. Select **New OAuth App**.
3. Fill in:
   - **Application name** — shown on the consent screen.
   - **Homepage URL** — your site.
   - **Authorization callback URL** — the redirect URI from Authdog.
4. Register the application.
5. Copy the **Client ID**, then select **Generate a new client secret** and copy the secret.

An OAuth App accepts exactly one callback URL, so each Authdog environment needs its own OAuth App. Name them distinctly (`Acme (dev)`, `Acme`) — the name is what users see when they authorize.

> **Note**
>
> Use an **OAuth App**, not a **GitHub App**. GitHub Apps are built around
> repository installations and short-lived tokens; this connector expects the
> OAuth App authorization flow.

Create the app under an organization rather than a personal account if more than one person needs to manage it. Organization-owned apps may also need owner approval before members can authorize them.

## Configure Authdog

| Field | Value |
| --- | --- |
| **Client ID** | From the OAuth App page |
| **Client Secret** | Shown once when generated |

Save, then toggle the connection **active**.

## What GitHub returns

Authdog requests the `user` scope and reads the profile from `https://api.github.com/user` — login, name, avatar, and the numeric ID that identifies the account permanently. A user can rename their GitHub account; the numeric ID stays put, and that is what Authdog links on.

The profile endpoint returns the user's **public** email, which is frequently `null` — many developers keep their address private, and GitHub's `noreply` setting hides it by default. Expect a share of GitHub users with no email address and prompt for one after sign-up if your product needs it.

## Test it

1. Open your environment's hosted sign-in page, or link to `https://identity.authdog.com/api/v1/signin/<connectionId>`.
2. Select **Continue with GitHub** and authorize.
3. Confirm the user appears under **Users** with a GitHub identity linked.
4. Revoke the authorization in [GitHub's applications settings](https://github.com/settings/applications) and sign in again to check the consent screen.

## Troubleshooting

| Symptom | Cause |
| --- | --- |
| `The redirect_uri MUST match the registered callback URL` | The callback URL differs from Authdog's, or you are testing the wrong environment's connection |
| `Bad verify code` | Client secret mismatch, or a reused authorization code |
| No email on the user record | The account's email is private — expected behaviour |
| Members cannot authorize | The organization requires owner approval for OAuth Apps |

## Related

| Read | To learn how to |
| --- | --- |
| [Connectors](/docs/connectors) | Set up any other social provider |
| [GitLab](/docs/connectors/gitlab) | Offer the other developer identity most teams expect |
| [Users](/docs/users) | Collect a verified email after a first sign-in |
