Skip to content

GitHub

  1. Go to GitHub Developer Settings → OAuth Apps → New
  2. Set the Authorization callback URL: https://yourapp.com/auth/oauth/github/callback
  3. Copy the Client ID and Client Secret
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",
)

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
Method Endpoint Description
GET /auth/oauth/github/authorize Start GitHub OAuth flow
GET /auth/oauth/github/callback Handle GitHub callback