What it enables
Connecting your GitHub account unlocks these widgets:- GitHub Widget: Browse repositories, track issues and pull requests
- GitHub Heatmap: Visualize your contribution activity over time
Required OAuth Scopes
Forge requests the following scopes from GitHub:repo- Full control of private repositories (read access to public and private repos)user:email- Access to read your email addresses
The
repo scope is required to access both public and private repository data. If you prefer to limit access to public repositories only, you’ll need to modify the source code.Setup Instructions
Create a GitHub OAuth App
- Go to your GitHub account settings
- Navigate to Developer settings > OAuth Apps
- Click New OAuth App or create one directly
Configure OAuth App Settings
Fill in the application details:
- Application name:
Forge(or your preferred name) - Homepage URL:
- Development:
http://localhost:3000 - Production:
https://yourdomain.com
- Development:
- Application description: Optional description of your Forge instance
- Authorization callback URL:
- Development:
http://localhost:3000/api/auth/callback/github - Production:
https://yourdomain.com/api/auth/callback/github
- Development:
Generate Client Secret
- After creating the app, you’ll see your Client ID
- Click Generate a new client secret
- Copy both the Client ID and Client Secret immediately
Connect Your Account
Once the OAuth app is configured:- Open your Forge dashboard and go to Settings
- Click Connect GitHub Account
- Authorize the application with the requested scopes
- You’ll be redirected back to Forge with your account connected
Account Linking
GitHub is configured as a trusted provider for account linking in Forge. This means:- You can link your GitHub account to an existing Forge account
- Multiple OAuth providers can be connected to the same user account
- GitHub can be used as a sign-in method if configured
Forge uses BetterAuth for authentication with account linking enabled for GitHub, Google, and Notion.
Managing Your Connection
From the Settings page, you can:- View connection status: See if your GitHub account is linked
- Disconnect: Remove the integration and revoke access tokens
- Reconnect: Re-authorize if tokens become invalid
Troubleshooting
Authorization Failed
If authorization fails during connection:- Verify the Authorization callback URL in your GitHub OAuth App matches exactly
- Check that
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETare correctly set in.env - Ensure your application is running on the same URL as the callback URL
Missing Repository Data
If you can’t see certain repositories:- Verify the
reposcope is included in your authorization - For organization repositories, you may need to grant organization access during authorization
- Disconnect and reconnect to refresh permissions
Rate Limiting
GitHub has API rate limits:- Authenticated requests: 5,000 requests per hour per user
- Unauthenticated requests: 60 requests per hour per IP