{"id":25558685,"url":"https://github.com/code4mk/py-socialite","last_synced_at":"2026-02-12T20:01:50.602Z","repository":{"id":270745812,"uuid":"911246429","full_name":"code4mk/py-socialite","owner":"code4mk","description":"Python social OAuth2 authentication","archived":false,"fork":false,"pushed_at":"2025-02-12T09:03:06.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-20T11:54:35.262Z","etag":null,"topics":["django-social-auth","fastapi-social-auth","oauth2","python-socialite","socialite"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/py-socialite/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code4mk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-01-02T15:17:04.000Z","updated_at":"2025-02-25T10:11:59.000Z","dependencies_parsed_at":"2025-01-02T20:28:19.414Z","dependency_job_id":"3e00a518-0037-41d0-9009-00cb8f5b04a7","html_url":"https://github.com/code4mk/py-socialite","commit_stats":null,"previous_names":["code4mk/py-socialite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/code4mk/py-socialite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Fpy-socialite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Fpy-socialite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Fpy-socialite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Fpy-socialite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code4mk","download_url":"https://codeload.github.com/code4mk/py-socialite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Fpy-socialite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29379660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T19:05:20.189Z","status":"ssl_error","status_checked_at":"2026-02-12T19:01:44.216Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["django-social-auth","fastapi-social-auth","oauth2","python-socialite","socialite"],"created_at":"2025-02-20T16:19:23.132Z","updated_at":"2026-02-12T20:01:50.585Z","avatar_url":"https://github.com/code4mk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Python package for OAuth authentication with various social providers, inspired by Laravel Socialite.\n\n## Installation\n\n```bash\npip install py-socialite\n```\n\n## Configuration\n\nCreate a configuration file (e.g., socialite.py) with your OAuth credentials:\n\n```python\n# socialite.py\n\nSOCIAL_PROVIDERS = {\n    'google': {\n        'client_id': 'your-client-id',\n        'client_secret': 'your-client-secret',\n        'redirect_uri': 'your-callback-url',\n        'scope': 'openid email profile'\n    },\n    'github': {\n        'client_id': 'your-client-id',\n        'client_secret': 'your-client-secret',\n        'redirect_uri': 'your-callback-url',\n        'scope': 'read:user user:email'\n    },\n    'dropbox': {\n        'client_id': 'your-client-id',\n        'client_secret': 'your-client-secret',\n        'redirect_uri': 'your-callback-url'\n    },\n    'x': {\n        'client_id': 'your-client-id',\n        'client_secret': 'your-client-secret',\n        'redirect_uri': 'your-callback-url',\n        'scope': 'tweet.read users.read follows.read offline.access'\n    },\n    'linkedin': {\n        'client_id': 'your-client-id',\n        'client_secret': 'your-client-secret',\n        'redirect_uri': 'your-callback-url',\n        'scope': 'openid profile email'\n    },\n    'facebook': {\n        'client_id': 'your-client-id',\n        'client_secret': 'your-client-secret',\n        'redirect_uri': 'your-callback-url',\n        'scope': 'email public_profile'\n    },\n    'microsoft': {\n        'client_id': 'your-client-id',\n        'client_secret': 'your-client-secret',\n        'redirect_uri': 'your-callback-url',\n        'scope': 'openid email profile User.Read'\n    }\n}\n```\nSet the configuration path in your environment:\n\n```bash\nexport SOCIALITE_CONFIG_PATH=\"modules.common.config.socialite\"\n\n# or add it to your .env file\nSOCIALITE_CONFIG_PATH='modules.common.config.socialite'\n```\n\n## Usage\n\n```python\nfrom py_socialite.socialite import Socialite\n\n# Initialize Socialite\nsocialite = Socialite()\n\n# Get authorization URL\nauth_url = socialite.provider('google').get_auth_url()\n\n# After callback, get user info\nuser = socialite.provider('google').get_user(code)\n```\n\n## Error Handling\n\nThe package raises `SocialAuthError` for any authentication issues.\n\n```python\ntry:\n    user = socialite.provider('google').get_user(code)\nexcept SocialAuthError as e:\n    print(f\"Authentication failed: {str(e)}\")\n```\n\n## Project Structure\n\n```bash\npy-socialite/\n├── py_socialite/\n│   ├── __init__.py         # Version and package info\n│   ├── exceptions.py       # Custom exceptions\n│   ├── config.py           # Provider configurations\n│   ├── socialite.py        # Main service class\n│   └── providers/\n│       ├── base.py         # Abstract base provider\n│       └── google.py       # Google implementation\n├── setup.py                # Package setup\n└── deploy.sh              # Deployment script\n```\n\n## Requirements\n\n- python 3.10+\n- requests\n- python-dotenv\n\n## support providers\n\n- google\n- github\n- dropbox\n- x\n- facebook\n- microsoft\n- linkedin\n\n\n## Response sample data\n\n```bash\n{\n    \"provider\": \"google\",\n    \"id\": \"1234567890\",\n    \"email\": \"example@example.com\",\n    \"name\": \"John Doe\",\n    \"avatar\": \"https://example.com/avatar.jpg\",\n    \"raw\": {\n        .....\n    }\n}\n```\n\n## Resources\n\n- [How to use py-socialite on django - medium](https://code4mk.medium.com/py-socialite-implement-on-django-and-drf-2b2531bdb6e9)\n- [How to use py-socialite on fastapi - medium](https://code4mk.medium.com/py-socialite-implement-on-fastapi-b1d585c7f915)\n\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Fpy-socialite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode4mk%2Fpy-socialite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Fpy-socialite/lists"}