Configure GitHub
Enable users to sign in with their GitHub accounts.
Authority instance running
Admin access to Authority dashboard
Step 1: Create GitHub OAuth App
Click OAuth Apps > New OAuth App
Fill in the application details:
Application name: Your app name
Homepage URL: https://your-app.com
Authorization callback URL: https://your-authority-domain/auth/github/callback
Click Register application
On the app page:
Click Generate a new client secret
Copy the Client Secret immediately (shown only once)
Using Admin Dashboard
Log in to Authority admin dashboard
Navigate to Settings > Social Login
Enter your credentials:
Client ID: Your GitHub client ID
Client Secret: Your GitHub client secret
Using Environment Variables
With forward URL:
Step 4: Test the Integration
Click your GitHub sign-in button
Authorize the OAuth app on GitHub
You'll be redirected back to Authority
Account created/linked automatically
Redirected to your application
User Data Retrieved
Primary email (if public or authorized)
GitHub Organizations
To restrict access to specific organizations, you can check membership after authentication in your application logic.
Troubleshooting
"Bad credentials" Error
Client ID or secret is incorrect.
Solution: Regenerate the client secret in GitHub and update Authority settings.
No Email Retrieved
GitHub email is private and user didn't authorize email scope.
Solution: The user:email scope is requested by default. If email is still missing:
User may not have a verified email on GitHub
User may have denied email permission
"Redirect URI mismatch"
Callback URL doesn't match GitHub app configuration.
Solution: Ensure exact match:
GitHub Enterprise
For GitHub Enterprise Server, contact your administrator about custom OAuth endpoints.