# 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="/files/npkHxOVAP0rH1c6d5wwO" 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="/files/UmVERLe14RB2MAm5E4qK" 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="/files/6Cw0hddBKii0sSelsg0m" 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](/app/admin/environment-variables-setting.md) :

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/admin/tonic-user-access/single-sign-on/github.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
