{"id":16175146,"url":"https://github.com/app-generator/flask-social-login","last_synced_at":"2025-04-07T11:13:31.828Z","repository":{"id":100502980,"uuid":"411765375","full_name":"app-generator/flask-social-login","owner":"app-generator","description":"Flask Social Login - Open-Source Seed Project | AppSeed","archived":false,"fork":false,"pushed_at":"2022-04-01T05:09:22.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T18:13:29.700Z","etag":null,"topics":["appseed-sample","flask","social-login"],"latest_commit_sha":null,"homepage":"https://blog.appseed.us/flask-social-login-with-github/","language":"HTML","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/app-generator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-09-29T17:16:59.000Z","updated_at":"2021-10-15T08:37:40.000Z","dependencies_parsed_at":"2023-05-15T11:15:46.215Z","dependency_job_id":null,"html_url":"https://github.com/app-generator/flask-social-login","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fflask-social-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fflask-social-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fflask-social-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fflask-social-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/app-generator","download_url":"https://codeload.github.com/app-generator/flask-social-login/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640466,"owners_count":20971558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["appseed-sample","flask","social-login"],"created_at":"2024-10-10T04:44:13.934Z","updated_at":"2025-04-07T11:13:31.823Z","avatar_url":"https://github.com/app-generator.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Flask Social Login](https://blog.appseed.us/flask-social-login-with-github/)\n\nOpen-source Flask sample built on top of `flask-dance` library. The project showcases the social login for Github - Features: \n\n- Up-to-date [dependencies](./requirements.txt): **Flask 2.0.1**\n- `OPENID` Social login over [Flask Dance](https://pypi.org/project/Flask-Dance/)\n  - Github Login\n  - Google Login (WIP) \n- Support via **Github** (issues tracker) and [Discord](https://discord.gg/fZC6hup).\n\n\u003cbr /\u003e\n\n![Flask Social Login - Free sample provided by AppSeed.](https://user-images.githubusercontent.com/51070104/135398234-06a43c1a-cd0a-45ad-accc-de45061d8945.png)\n\n\u003cbr /\u003e\n\n## Build from sources\n\n\u003e **Step #1** - Clone sources (this repo)\n\n```bash\n$ # Clone the sources\n$ git clone https://github.com/app-generator/flask-social-login.git\n$ cd flask-social-login\n```\n\n\u003cbr /\u003e\n\n\u003e **Step #2** - Create a virtual environment\n\n```bash\n$ # Virtualenv modules installation (Unix based systems)\n$ virtualenv env\n$ source env/bin/activate\n$\n$ # Virtualenv modules installation (Windows based systems)\n$ # virtualenv env\n$ # .\\env\\Scripts\\activate\n```\n\n\u003cbr /\u003e\n\n\u003e **Step #3** - Install dependencies\n\n```bash\n$ # Install requirements\n$ pip3 install -r requirements.txt\n```\n\n\u003cbr /\u003e\n\n\u003e **Step #4** - Set Up Environment\n\n```bash\n$ # Set the FLASK_APP environment variable\n$ (Unix/Mac) export FLASK_APP=run.py\n$ (Windows) set FLASK_APP=run.py\n$ (Powershell) $env:FLASK_APP = \".\\run.py\"\n```\n\n\u003cbr /\u003e\n\n\u003e **Step #5** - [Creating an OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) (on Github)\n\n- SignIN to Github\n- Access `Settings` -\u003e `Developer Settings` -\u003e `OAuth Apps`\n- Edit your OAuth App\n  - `App Name`\n  - `App Description`\n  - (mandatory) `HomePage`: `https://localhost:5000`\n  - (mandatory) `Authorization callback URL`: `https://localhost:5000/login/github/authorized`\n  - Generate a new `secret key`\n\n\u003cbr /\u003e\n\n\u003e **Step #6** - Rename `.env.sample` to `.env` and edit the file\n\n- `GITHUB_OAUTH_CLIENT_ID` - value provided by Github (step #5)\n- `GITHUB_OAUTH_CLIENT_SECRET` - value provided by Github (step #5)\n\n\u003cbr /\u003e\n\n\u003e **Step #7** - (optional) Enable DEBUG Environment (local development)\n\n```bash\n$ # Set up the DEBUG environment\n$ (Unix/Mac) export FLASK_ENV=development\n$ (Windows) set FLASK_ENV=development\n$ (Powershell) $env:FLASK_ENV = \"development\"\n```\n\n\u003cbr /\u003e\n\n\u003e **Step #8** - Start the project (HTTPS)\n\n```bash\n$ flask run --cert=adhoc\n$\n$ # Access the app in browser: HTTPS://127.0.0.1:5000/\n```\n\n\u003cbr /\u003e\n\n## Code-base structure\n\nThe project has a super simple structure, represented as bellow:\n\n```bash\n\u003c PROJECT ROOT \u003e\n   |\n   |-- app/\n   |    |-- static/\n   |    |    |-- \u003ccss, JS, images\u003e    # CSS files, Javascripts files\n   |    |\n   |    |-- templates/\n   |    |    |\n   |    |    |-- index.html           # Index File\n   |    |    |-- login.html           # Login Page\n   |    |    |-- register.html        # Registration Page\n   |    |    \n   |    |\n   |   config.py                      # Provides APP Configuration \n   |  __init__.py                     # Bootstrap the project\n   |\n   |-- .env                           # Injects Github Credentials\n   |-- requirements.txt\n   |-- run.py\n   |\n   |-- ************************************************************************\n```\n\n\u003cbr /\u003e\n\n## Resources\n\n- Free [Admin Dashboards](https://appseed.us/admin-dashboards/open-source) - index provided by AppSeed\n- [Flask User Authentication](https://blog.appseed.us/flask-user-authentication-free-sample/) - blog article (includes a free sample) \n \n\u003cbr /\u003e\n\n---\n[Flask Social Login](https://blog.appseed.us/flask-social-login-with-github/) - Free sample provided by **AppSeed [App Generator](https://appseed.us/app-generator)**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fflask-social-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapp-generator%2Fflask-social-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fflask-social-login/lists"}