GitHub
- Go to GitHub Developer Settings → OAuth Apps → New
- Set the Authorization callback URL:
https://yourapp.com/auth/oauth/github/callback - Copy the Client ID and Client Secret
Configuration
Section titled “Configuration”from authfort import GitHubProvider
GitHubProvider(
client_id="your-github-client-id",
client_secret="your-github-client-secret",
)from authfort import GitHubProvider
GitHubProvider(
client_id="your-github-client-id",
client_secret="your-github-client-secret",
)Scopes
Section titled “Scopes”Required scopes (read:user, user:email) are always included automatically. Use extra_scopes to request additional GitHub API access:
GitHubProvider( client_id="...", client_secret="...", extra_scopes=("repo",),)| Required Scope | Description |
|---|---|
read:user |
Access the user’s profile (name, avatar) |
user:email |
Access the user’s email address |
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
| GET | /auth/oauth/github/authorize |
Start GitHub OAuth flow |
| GET | /auth/oauth/github/callback |
Handle GitHub callback |