Documentation Index
Fetch the complete documentation index at: https://docs.alterauth.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Connect your users to GitHub for repository management, issue tracking, pull requests, and code access.| Property | Value |
|---|---|
| Provider ID | github |
| PKCE | Supported |
| Token refresh | Not needed (tokens don’t expire) |
| Access token lifetime | Never expires (revoked after 1 year of inactivity) |
| Redirect URI | Shown in Developer Portal |
This guide covers GitHub OAuth Apps, not GitHub Apps. OAuth App tokens don’t expire, so there’s no refresh token flow.
Step 1: Create a GitHub OAuth App
Go to GitHub Developer Settings
Navigate to github.com/settings/developers and click OAuth Apps > New OAuth App.For organization-owned apps, go to Organization Settings > Developer settings > OAuth Apps.
Fill in app details
- Application name: Your app name (e.g., “My App”)
- Homepage URL: Your app’s URL (e.g.,
https://myapp.com) - Authorization callback URL: Copy the Redirect URI from the Developer Portal
- Click Register application
Step 2: Add to Alter Vault
Open the Developer Portal
Go to portal.alterauth.com and navigate to your app.
Enter credentials
- Client ID: Paste your GitHub Client ID
- Client Secret: Paste your GitHub Client Secret
Select scopes
Choose the scopes your app needs. See the Available Scopes section below.
Step 3: Test It
After a user connects via Alter Connect, use the returnedgrant_id to make API calls:
Available Scopes
Repository
| Scope | Description |
|---|---|
repo | Full access to public and private repositories |
public_repo | Access public repositories only |
repo:status | Access commit statuses |
repo_deployment | Access deployment statuses |
repo:invite | Accept/decline repository invitations |
delete_repo | Delete repositories |
User
| Scope | Description |
|---|---|
user | Full read/write access to profile (includes user:email and user:follow) |
read:user | Read-only access to profile data |
user:email | Read email addresses |
user:follow | Follow/unfollow users |
Organization
| Scope | Description |
|---|---|
admin:org | Full organization management |
write:org | Read/write access to org membership and projects |
read:org | Read-only access to org and team membership |
Webhooks & Keys
| Scope | Description |
|---|---|
admin:repo_hook | Full access to repository hooks |
admin:org_hook | Full access to organization hooks |
admin:public_key | Fully manage public keys |
admin:gpg_key | Fully manage GPG keys |
Other
| Scope | Description |
|---|---|
gist | Write access to gists |
notifications | Access notifications |
project | Read/write access to user and organization projects |
workflow | Add and update GitHub Actions workflows |
write:packages | Upload/publish packages |
read:packages | Download packages |
codespace | Create and manage Codespaces |
Common API Endpoints
| Use Case | Method | URL |
|---|---|---|
| List user’s repos | GET | https://api.github.com/user/repos |
| Get a repository | GET | https://api.github.com/repos/{owner}/{repo} |
| List issues | GET | https://api.github.com/repos/{owner}/{repo}/issues |
| Create an issue | POST | https://api.github.com/repos/{owner}/{repo}/issues |
| List pull requests | GET | https://api.github.com/repos/{owner}/{repo}/pulls |
| Get authenticated user | GET | https://api.github.com/user |
Notes
- GitHub OAuth App tokens never expire but are revoked after 1 year of inactivity. There’s no refresh token flow.
- GitHub requires the
Accept: application/jsonheader for JSON responses from the token endpoint. Alter Vault handles this automatically. - If the user’s email is not public, Alter Vault automatically fetches it via the
/user/emailsendpoint (requiresuser:emailscope). - GitHub’s API requires the
X-GitHub-Api-Versionheader. When making calls via Alter Vault, you can add it viaextra_headersif needed, though most endpoints work without it.