()
| 42 | |
| 43 | @lru_cache |
| 44 | def get_github_oauth_client() -> OAuth: |
| 45 | settings = get_settings() |
| 46 | oauth = OAuth() |
| 47 | oauth.register( |
| 48 | "github", |
| 49 | client_id=settings.github_app_client_id, |
| 50 | client_secret=settings.github_app_client_secret, |
| 51 | access_token_url="https://github.com/login/oauth/access_token", |
| 52 | authorize_url="https://github.com/login/oauth/authorize", |
| 53 | api_base_url="https://api.github.com/", |
| 54 | client_kwargs={"scope": "user:email"}, |
| 55 | ) |
| 56 | return oauth |
| 57 | |
| 58 | |
| 59 | async def get_github_primary_email(oauth_client: OAuth, token: dict) -> str | None: |
nothing calls this directly
no test coverage detected