Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 04:45 UTC
| 1 | ## How do I set up custom OAuth credentials for GitHub? |
| 2 | |
| 3 | Use your own GitHub OAuth App when you want users to see your app's name on the consent screen and control scopes and credential rotation yourself. These steps cover OAuth Apps; for GitHub Apps, see the next question. |
| 4 | |
| 5 | ### Create the GitHub OAuth App |
| 6 | |
| 7 | 1. Sign in to [GitHub](https://github.com/) with the account that should own the app. To keep the app with a team, register it under an organization you can manage apps for. |
| 8 | 2. Click your avatar, then **Settings**. In the sidebar, click **Developer settings** > **OAuth Apps** > **New OAuth App** (or **Register a new application** if it's the first one). |
| 9 | |
| 10 |  |
| 11 | 3. Fill in the form: |
| 12 | - **Application name**: a name users will recognize on the consent screen. |
| 13 | - **Homepage URL**: the public site for your product. |
| 14 | - **Application description**: optional, but helps users understand the request. |
| 15 | - **Authorization callback URL**: `https://backend.composio.dev/api/v1/auth-apps/add`. It must exactly match the `oauth_redirect_uri` field in your Composio auth config. |
| 16 | |
| 17 | These fields are public, so don't put secrets or internal URLs in them. Leave **Enable Device Flow** off; the browser flow doesn't need it. |
| 18 | |
| 19 |  |
| 20 | |
| 21 |  |
| 22 | 4. Click **Register application**, copy the **Client ID**, then click **Generate a new client secret** and copy it right away. GitHub shows it only once. |
| 23 | |
| 24 | ### Create the auth config in Composio |
| 25 | |
| 26 | 1. In the Composio dashboard, go to **Auth Configs**, click **Create Auth Config**, and select **GitHub**. |
| 27 | 2. Confirm the authentication method is **OAuth2**, review the scopes, and turn on **Use your own developer credentials**. |
| 28 | 3. Paste the **Client ID** and **Client Secret**, then create the auth config. |
| 29 | |
| 30 |  |
| 31 | 4. Click **Connect Account**, enter a user ID, and click **Authorize** on the GitHub consent screen. Confirm the account shows as **Active**. |
| 32 | |
| 33 | See [Custom auth configs](/docs/auth-configuration/custom-auth-configs) for the general flow. |
| 34 | |
| 35 | ### Scopes |
| 36 | |
| 37 | The default auth config requests `repo`, `user`, `gist`, `notifications`, `project`, `workflow`, and `codespace`. Remove any your tools don't need. If you support several permission levels, create a separate auth config for each. |
| 38 | |
| 39 | ### Organization access |
| 40 | |
| 41 | If the consent screen shows an organization with a **Request** button, the user can still authorize for their personal account, but an organization owner may need to approve the app before it can reach the organization's private resources. |
| 42 | |
| 43 | ## Does Composio support GitHub Apps? |
| 44 | |
| 45 | Yes. You can bring your own GitHub App by configuring its client ID and client secret in the GitHub auth config. |
| 46 | |
| 47 | The GitHub App installation step is separate from the OAuth credential setup. The user still needs to install the GitHub App on the relevant account or organization and grant repository access before GitHub App based tool calls can work. GitHub App permissions come from the app's GitHub settings and installation grant, not from auth config scopes. |
| 48 | |
| 49 | Composio does not currently provide the GitHub App installation link automatically during this flow. Provide your GitHub App installation link to the user, have them install the app, then complete the connection. Built-in installation-link handling is being worked on. |