Why GitHub OAuth?
Private Repositories
Scan your private repos without making them public
Create PRs
Automatically open PRs with Lingo.dev translation fixes
Higher Rate Limits
5,000 API requests/hour vs 60 for unauthenticated
Team Repositories
Access organization repos you’re a member of
How It Works
GitHub authorization
You’re redirected to GitHub to authorize i18n Doctor. Review the requested permissions:
repo- Access private repositoriesread:user- Read your profile informationread:org- Access organization memberships (optional)
Token stored securely
GitHub redirects back to i18n Doctor with an OAuth token. This token is:
- Encrypted at rest in the database
- Never exposed to the browser
- Only used server-side for API calls
- Automatically refreshed when needed
i18n Doctor uses GitHub OAuth via Supabase Auth, which handles token encryption and secure storage.
Connecting Your Account
First-Time Setup
Navigate to settings
From the i18n Doctor dashboard:
- Click your avatar (top right)
- Select Settings or Profile
Connect GitHub
In the Integrations section:
- Click Connect GitHub
- You’ll be redirected to GitHub’s authorization page
Review permissions
GitHub will show the permissions i18n Doctor is requesting:Click Authorize i18n-doctor.
Permissions Explained
Required Scopes
i18n Doctor requests the following OAuth scopes:repo (Repository access)
repo (Repository access)
What it allows:
- Read repository content (files, branches, commit history)
- List your private repositories
- Create pull requests
- Push commits to branches (for PR creation)
- Scanning private repositories for locale files
- Creating fix branches
- Opening PRs with Lingo.dev translations
- Delete repositories
- Modify existing commits
- Access repository settings
- Merge or close pull requests
read:user (User profile)
read:user (User profile)
What it allows:
- Read your public GitHub profile
- Access your email addresses
- View profile details (name, avatar, bio)
- Displaying your name and avatar in the dashboard
- Associating scan reports with your account
- Showing your public repos in the repo selector
- Modify your profile
- Post on your behalf
- Access private profile data beyond basic info
read:org (Organization membership)
read:org (Organization membership)
What it allows:
- View organizations you’re a member of
- List organization repositories
- Check team memberships
- Showing organization repos in the repo selector
- Scanning repos from your organizations
- Filtering repos you have access to
- Modify organization settings
- Add/remove organization members
- Create or delete organization repos
Using OAuth Features
Scanning Private Repositories
Once connected, you can scan private repos just like public ones:Automatic authentication
i18n Doctor automatically uses your OAuth token to access the repo. No additional configuration needed.
If you’re not connected to GitHub and try to scan a private repo, you’ll see an error message with a prompt to connect your account.
Creating Fix PRs (Planned)
The one-click fix feature will use your OAuth token to:- Create a new branch (e.g.,
i18n-doctor/fix-2024-03-10) - Commit translated files with a descriptive message
- Open a pull request with:
- Summary of changes (coverage improvements)
- List of translated keys per locale
- Link to the original scan report
Planned Feature: Automatic PR creation is currently in development and will be available in a future release.
Security & Privacy
How Tokens Are Protected
Encrypted storage
OAuth tokens are encrypted using AES-256 before being stored in the database. The encryption key is stored separately in environment variables, never in the codebase.
Server-side only
Tokens are NEVER sent to your browser. All GitHub API calls are made server-side from i18n Doctor’s backend.
Automatic expiration
GitHub OAuth tokens have limited lifespans. i18n Doctor automatically refreshes them or prompts you to reconnect if they expire.
What i18n Doctor Can Access
| Data | Access |
|---|---|
| Public repos | ✓ Read files and metadata |
| Private repos | ✓ Read files and metadata (only if you grant access) |
| Your profile | ✓ Read basic info (name, avatar, email) |
| Organization repos | ✓ Read files (only repos you can access) |
| Secrets & tokens | ✗ No access (not requested) |
| Repository settings | ✗ No access (not requested) |
| GitHub Actions | ✗ No access (not requested) |
| Admin permissions | ✗ No access (not requested) |
Data Retention
When you connect your GitHub account:- OAuth token: Stored encrypted until you disconnect
- Profile data: Cached for 24 hours, then refreshed
- Scan results: Stored permanently (associated with your account)
- Repository content: NOT stored - fetched on-demand for each scan
- OAuth token is immediately deleted from the database
- Cached profile data is cleared
- Past scan results remain accessible (your work is not lost)
- You can reconnect at any time to restore access
Rate Limits
Unauthenticated (No OAuth)
- 60 requests per hour - Shared across all requests from your IP
- Only public repositories
- Rate limit resets every hour
- Small public repos
- Occasional scans
- Testing i18n Doctor
Authenticated (With OAuth)
- 5,000 requests per hour - Personal to your GitHub account
- Access to private repositories
- Rate limit resets every hour
- Large monorepos with hundreds of files
- Frequent scanning
- Organization repositories
- Running scans in CI/CD
Rate limits are enforced by GitHub, not i18n Doctor. If you hit the limit, you’ll see a clear error message with a reset time.
Checking Your Rate Limit
GitHub provides rate limit headers with every API response. i18n Doctor displays your remaining requests in the dashboard:Troubleshooting
GitHub authorization fails
GitHub authorization fails
Can't scan private repo after connecting
Can't scan private repo after connecting
Symptoms: “Repository not found” error for private reposSolutions:
- Verify you have at least read access to the repo on GitHub
- For organization repos, ensure the organization has authorized i18n Doctor:
- Go to GitHub > Settings > Organizations > [Your Org]
- Click “Third-party access”
- Approve i18n Doctor if it’s pending
- Try disconnecting and reconnecting your GitHub account
- Check if the repo exists and the URL is correct
Rate limit exceeded after connecting
Rate limit exceeded after connecting
Symptoms: 403 error with “rate limit exceeded” messageSolutions:
- Wait until the rate limit resets (shown in the error message)
- Verify your OAuth connection is active (Settings > Integrations)
- If you’re making many API calls outside i18n Doctor, they count toward your limit
- For extremely large repos, scan during off-peak hours
Token expired
Token expired
Symptoms: “Unauthorized” or “bad credentials” errorsSolutions:
- Go to Settings > Integrations
- Click “Reconnect GitHub”
- Authorize again on GitHub
Organization repos not showing
Organization repos not showing
Symptoms: Can’t see repos from your organizationSolutions:
- Ensure you granted the
read:orgscope during authorization - Check that your organization has approved i18n Doctor:
- GitHub > Settings > Organizations > [Your Org] > Third-party access
- Click “Grant access” next to i18n Doctor
- Some organizations have strict OAuth app policies - contact your org admin
Organization Approval
If you’re part of a GitHub organization with strict OAuth policies:Admin approves
An organization admin must:
- Go to GitHub > Settings > Organizations > [Your Org]
- Click “Third-party access”
- Find i18n Doctor in the pending list
- Click “Review” and approve
Revoking Access
From i18n Doctor
From GitHub
Revoking from GitHub also invalidates the token in i18n Doctor. You’ll need to reconnect if you want to use OAuth features again.
Best Practices
Use OAuth for private repos
If you need to scan private repos, connect your GitHub account. Don’t try workarounds like making repos temporarily public - this creates security risks.
Review permissions before authorizing
Always check what permissions an OAuth app requests. i18n Doctor should only ask for
repo, read:user, and read:org.Keep tokens secure
Never share your OAuth token or session cookies. i18n Doctor never asks for your GitHub password or personal access tokens.
Privacy Policy
i18n Doctor is committed to protecting your privacy:- No data selling: We never sell or share your GitHub data
- Minimal collection: We only access what’s necessary for scanning
- User control: You can disconnect and delete your data at any time
- Transparency: All permissions are explained clearly before authorization
Next Steps
Lingo.dev Integration
Learn about AI-powered translation fixes
Understanding Reports
Interpret your scan results and prioritize fixes