Overview
Forge integrates deeply with GitHub for repository management, authentication, and collaboration. GitHub OAuth enables secure, seamless access to your repositories.Quick Start (Default Credentials)
For most users, no configuration is needed:Launch Forge
Click GitHub Sign In
Authorize Namastex Labs
Start Building
Custom GitHub OAuth App
Want to use your own OAuth app? Here’s how to set it up.Why Use Custom OAuth?
- Production deployments on custom domains
- Enterprise environments with specific security requirements
- Team collaboration with your organization’s branding
- Higher rate limits specific to your app
Creating Your OAuth App
Go to GitHub Settings
Fill in Application Details
Register Application
Generate Client Secret
Save Credentials
- Client ID:
Iv1.1234567890abcdef - Client Secret:
1234567890abcdef1234567890abcdef12345678
Configuration
Environment Variables
Set your custom credentials via environment variables:.env file:
Start Forge
Multiple Environments
Development
Staging
Production
Permissions & Scopes
Required Scopes
Forge requests these GitHub OAuth scopes:Why Each Scope?
repo - Repository Access
repo - Repository Access
- Clone repositories for tasks
- Create and manage git worktrees
- Commit changes from AI agents
- Push branches and create PRs
user:email - Email Access
user:email - Email Access
- Associate commits with correct author
- Send notifications (if enabled)
- User identification in audit logs
read:user - Profile Access
read:user - Profile Access
- Display username and avatar in UI
- Team collaboration features
- Activity tracking
workflow - GitHub Actions (Optional)
workflow - GitHub Actions (Optional)
- Trigger CI/CD on task completion
- Monitor workflow status
- Auto-deployment features
Testing Your OAuth Setup
Verify Configuration
Test Authentication Flow
Open Forge UI
Click GitHub Sign In
Verify OAuth App Name
Authorize Access
Check User Info
Troubleshooting
Callback URL mismatch
Callback URL mismatch
- Check your OAuth app settings on GitHub
- Ensure callback URL exactly matches (including protocol and port)
- For local dev:
http://localhost:3000/auth/github/callback - Update OAuth app if needed
Invalid client
Invalid client
- Verify
GITHUB_CLIENT_IDis correct - Check for extra spaces or quotes
- Ensure OAuth app isn’t deleted
- Try regenerating client secret
Rate limit errors
Rate limit errors
- Create authenticated OAuth app (higher limits)
- Use personal access token for development
- Implement caching for repository data
- Contact GitHub for higher limits
Localhost not working
Localhost not working
127.0.0.1 instead of localhost:Security Best Practices
Rotate Secrets Regularly
Use Minimal Scopes
workflow scope if not using ActionsMonitor Access Logs
Secure Production Secrets
Advanced: Organization OAuth Apps
For team deployments, use GitHub Organization OAuth apps:Go to Organization Settings
https://github.com/organizations/YOUR_ORG/settings/applicationsCreate OAuth App
Set Organization Restrictions
Add to Forge
Organization Benefits
- Centralized management: Admins control OAuth apps
- Fine-grained permissions: Restrict repository access
- Audit logs: Track all OAuth usage
- Team collaboration: Share Forge instance across team
Production Deployment Checklist
Create Production OAuth App
- Use your production domain
- Set HTTPS callback URL
- Document client ID/secret securely
Store Secrets Securely
Configure Environment
Test Production Flow
- Test OAuth from production domain
- Verify callback redirects correctly
- Check user can access repositories
Monitor & Rotate
- Set calendar reminder for 90-day rotation
- Monitor OAuth access logs
- Track API rate limits
Rate Limits
GitHub API Limits
Optimizing Rate Limit Usage
- Caching
- Batch Requests
- Webhooks

