{"id":17346744,"url":"https://github.com/staciax/github-oauth2","last_synced_at":"2026-06-28T05:31:58.770Z","repository":{"id":242238860,"uuid":"809050221","full_name":"staciax/github-oauth2","owner":"staciax","description":"A basic github oauth2 for python.","archived":false,"fork":false,"pushed_at":"2024-06-01T14:47:01.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T17:56:43.117Z","etag":null,"topics":["asyncio","github","oauth2","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/staciax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-01T14:45:37.000Z","updated_at":"2024-06-01T14:51:59.000Z","dependencies_parsed_at":"2024-06-01T17:07:46.661Z","dependency_job_id":null,"html_url":"https://github.com/staciax/github-oauth2","commit_stats":null,"previous_names":["staciax/github-oauth2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/staciax/github-oauth2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staciax%2Fgithub-oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staciax%2Fgithub-oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staciax%2Fgithub-oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staciax%2Fgithub-oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/staciax","download_url":"https://codeload.github.com/staciax/github-oauth2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/staciax%2Fgithub-oauth2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34878963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","github","oauth2","python"],"created_at":"2024-10-15T16:46:33.570Z","updated_at":"2026-06-28T05:31:58.752Z","avatar_url":"https://github.com/staciax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github OAuth2 Client \nA simple Github OAuth2 client for Python.\n\n## Installation\n```bash\npip install git+https://github.com/staciax/github-oauth2.git\n```\n\n## Quick Example with FastAPI\n```python\nfrom fastapi import FastAPI\nfrom starlette.responses import RedirectResponse\n\nfrom github_oauth2 import GithubOAuth2Client\nfrom github_oauth2.utils import oauth2_url\n\napp = FastAPI()\n\ngithub_client_id = 'client_id'\ngithub_client_secret = 'client_secret'\n\n\n@app.get('/github-login')\nasync def github_login() -\u003e RedirectResponse:\n    url = oauth2_url(client_id=github_client_id, scope='user:email')\n    return RedirectResponse(url, status_code=302)\n\n\n@app.get('/github-code')\nasync def github_code(code: str) -\u003e dict:\n    client = GithubOAuth2Client(\n        client_id=github_client_id,\n        client_secret=github_client_secret,\n    )\n    data = await client.get_access_token(code=code, scope='user:email')\n    user = await client.get_user(access_token=data['access_token'])\n\n    return user\n\n```\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaciax%2Fgithub-oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaciax%2Fgithub-oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaciax%2Fgithub-oauth2/lists"}