# GitHub

Use these instructions to set up GitHub as your SSO provider for Tonic Structural.

{% hint style="info" %}
The Structural GitHub SSO integration does not support GitHub group membership.
{% endhint %}

## GitHub configuration

### Create an OAuth application

In GitHub, navigate to **Settings** -> **Developer Settings** -> **OAuth Apps,** then create a new application.

1. For **Application Name**, enter `Tonic`**.**
2. For **Homepage URL**, enter `https://tonic.ai`.
3. For **Authorization callback URL**, enter `https://your-tonic-url/sso/callback`.\
   \
   Replace `your-tonic-url` with the URL of your Structural instance.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2F6ZJBg4BIg98TyMbbg2fj%2F1.png?alt=media&#x26;token=6c717cad-638b-4d01-94a8-1da5436cf249" alt="" width="546"><figcaption><p>OAuth application creation panel in GitHub</p></figcaption></figure>

### Create a client secret

After you create the application, to create a new secret, click **Generate a new client secret**.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FzZyYpkNf27pBlDyjZX3F%2F2.png?alt=media&#x26;token=4c505b77-87a3-4547-9b62-5f533760e802" alt="" width="563"><figcaption><p>Option to generate a new client secret</p></figcaption></figure>

You use the **Client ID** and the **Client secret** in the Structural configuration.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FiJVeEmmpvpbwuTJDlJQe%2F3.png?alt=media&#x26;token=59bc3507-51b3-4a19-9c9f-2223d0ba11a1" alt="" width="563"><figcaption><p>Client ID and client secret values</p></figcaption></figure>

## Structural configuration

In the Structural web server container, set the following [Structural environment settings](../../environment-variables-setting) :

* `TONIC_SSO_PROVIDER`: `GitHub`
* `TONIC_SSO_CLIENT_ID`: \<GitHub Client ID>
* `TONIC_SSO_CLIENT_SECRET`: \<GitHub Client Secret>
