Configure GitHub OAuth authentication for your Devana.ai whitemark instance.
| Variable | Description | Required | Example |
|---|---|---|---|
GITHUB_CLIENT_ID | GitHub OAuth App Client ID | Yes | Iv1.1234567890abcdef |
GITHUB_CLIENT_SECRET | GitHub OAuth App Client Secret | Yes | your-client-secret |
GITHUB_CALLBACK_URL | Callback URL for authentication | Yes | https://your-domain.com/auth/github/callback |
Create OAuth App:
Devana.ai SSOhttps://your-domain.comhttps://your-domain.com/auth/github/callbackGet Credentials:
GITHUB_CLIENT_ID)GITHUB_CLIENT_SECRET)Add the following variables to your environment configuration:
# GitHub OAuth Configuration
GITHUB_CLIENT_ID=Iv1.1234567890abcdef
GITHUB_CLIENT_SECRET=your-client-secret
GITHUB_CALLBACK_URL=https://your-domain.com/auth/github/callback
Configure your whitemark to include GitHub as an allowed provider:
{
"allowedProviders": ["GITHUB"],
"registrationType": ["SSO"]
}
GitHub provides comprehensive user information:
| GitHub Field | Devana.ai Field | Notes |
|---|---|---|
email | email | Primary identifier from profile or emails API |
login | firstName | GitHub username used as first name |
name | lastName | Display name used as last name |
id | providerId | Unique GitHub user ID |
The application requests the following scope:
user:email: Access to user's email addressesThis scope provides:
GitHub provides extensive profile information:
interface GitHubProfile {
id: string; // Unique user ID
login: string; // Username
name: string; // Display name
email: string; // Primary email
avatar_url: string; // Profile picture URL
html_url: string; // Profile page URL
company: string; // Company name
blog: string; // Website/blog URL
location: string; // Location
bio: string; // User bio
public_repos: number; // Number of public repositories
followers: number; // Number of followers
following: number; // Number of users following
created_at: string; // Account creation date
updated_at: string; // Last profile update
}
GitHub users can set their email addresses as private. The user:email scope ensures access to:
If your GitHub OAuth App is owned by an organization, you may need to:
GitHub API has rate limits that may affect authentication:
Application suspended or blocked:
Redirect URI mismatch:
GITHUB_CALLBACK_URL exactly matches the registered callback URLInvalid client credentials:
GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET are correctUser email not available:
user:email scope is being requestedOrganization access denied:
The authentication process logs:
For enhanced security and more granular permissions, consider using GitHub Apps instead of OAuth Apps:
Benefits of GitHub Apps:
Note: The current implementation uses OAuth Apps (passport-github2 strategy). Migrating to GitHub Apps would require implementation changes.