> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/app/structural-user-access/single-sign-on/github.md).

# 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&amp;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&amp;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&amp;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](/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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
