Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Set Up GitHub Login

This guide walks through configuring GitHub as an external identity provider so users can sign in with their GitHub accounts.

1. Create a GitHub OAuth App

Go to GitHub Developer Settings

Navigate to GitHub Developer Settings → OAuth Apps → New OAuth App.

Fill in the application details

FieldValue
Application nameYour app name (e.g., "Aero2")
Homepage URLhttps://aero2.dev
Authorization callback URLhttps://aero2.dev/rp/callback/github

Save the credentials

After creating the app, copy the Client ID and generate a Client Secret.

2. Configure Aero2

You can configure the GitHub IdP either via environment variables (for the built-in provider) or via the Admin API (for dynamic configuration).

Option A: Admin API

curl -X POST https://aero2.dev/api/idps \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "github",
    "type": "oauth2",
    "display_name": "GitHub",
    "client_id": "Iv1.your_client_id",
    "client_secret": "your_client_secret",
    "authorization_endpoint": "https://github.com/login/oauth/authorize",
    "token_endpoint": "https://github.com/login/oauth/access_token",
    "userinfo_endpoint": "https://api.github.com/user",
    "scopes": "read:user user:email"
  }'

3. Test It

  1. Visit your Aero2 login page
  2. Click "Sign in with GitHub"
  3. Authorize the application on GitHub
  4. You should be redirected to the dashboard with your GitHub profile

Troubleshooting

IssueSolution
"Failed to load identity providers"Check that database migrations have been applied
"Invalid callback URL"Verify the callback URL matches exactly: https://aero2.dev/rp/callback/github
"Error exchanging code"Check that GITHUB_CLIENT_SECRET is correct

GitHub Scopes

ScopePurpose
read:userAccess user profile (name, avatar)
user:emailAccess user email addresses