INNER CODE UNIT · Python

get_github_oauth_client

hunvreus/devpush · app/dependencies.py:44

def get_github_oauth_client() -> OAuth:
    settings = get_settings()
    oauth = OAuth()
    oauth.register(
        "github",
        client_id=settings.github_app_client_id,
        client_secret=settings.github_app_client_secret,
        access_token_url="https://github.com/login/oauth/access_token",
        authorize_url="https://github.com/login/oauth/authorize",
        api_base_url="https://api.github.com/",
        client_kwargs={"scope": "user:email"},
    )
    return oauth


async def get_github_primary_email(oauth_client: OAuth, token: dict) -> str | None:
    """Get user's primary verified email from GitHub."""
    try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…