{"id":16174921,"url":"https://github.com/app-generator/sample-flask-auth-session","last_synced_at":"2025-04-07T10:56:51.724Z","repository":{"id":63771429,"uuid":"410910397","full_name":"app-generator/sample-flask-auth-session","owner":"app-generator","description":"Flask User Authentication - Open-source Sample | AppSeed","archived":false,"fork":false,"pushed_at":"2022-11-25T15:56:27.000Z","size":35,"stargazers_count":21,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T18:13:35.507Z","etag":null,"topics":["appseed-sample","flask-sample"],"latest_commit_sha":null,"homepage":"https://blog.appseed.us/flask-user-authentication-free-sample/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-27T14:08:25.000Z","updated_at":"2025-03-28T17:18:59.000Z","dependencies_parsed_at":"2022-11-25T17:45:53.447Z","dependency_job_id":null,"html_url":"https://github.com/app-generator/sample-flask-auth-session","commit_stats":null,"previous_names":[],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-auth-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-auth-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-auth-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-auth-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/app-generator","download_url":"https://codeload.github.com/app-generator/sample-flask-auth-session/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640512,"owners_count":20971555,"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-sample"],"created_at":"2024-10-10T04:43:47.383Z","updated_at":"2025-04-07T10:56:51.700Z","avatar_url":"https://github.com/app-generator.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Flask User Authentication](https://blog.appseed.us/flask-user-authentication-free-sample/)\n\nOpen-source Flask project that implements a simple authentication system using `Flask-Login` library - Features:\n\n- ✅ `Up-to-date dependencies`\n- ✅ Authentication layer: `Flask-Login`\n- ✅ UI: Bootstrap5 via `CDN`\n- ✅ Free [Support](https://appseed.us/support/) via `Email` and `Discord`.\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/sample-flask-auth-session.git\n$ cd sample-flask-auth-session\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** - Create Tables (SQLite persistance)\n\n```bash\n$ # Create tables\n$ flask shell\n$ \u003e\u003e\u003e from app import db\n$ \u003e\u003e\u003e db.create_all()\n```\n\n\u003cbr /\u003e\n\n\u003e **Step #6** - (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 #7** - Start the project\n\n```bash\n$ # Run the application\n$ # --host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1)\n$ # --port=5000    - specify the app port (default 5000)  \n$ flask run --host=0.0.0.0 --port=5000\n$\n$ # Access the app in browser: http://127.0.0.1:5000/\n```\n\n\u003cbr /\u003e\n\n![Flask User Authentication - Free sample provided by AppSeed.](https://user-images.githubusercontent.com/51070104/134959525-3ad0c71c-27e4-45f7-b7b9-53b76f3884bf.png)\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   |   forms.py                       # Defines Forms (login, register) \n   |   models.py                      # Defines app models \n   |   views.py                       # Application Routes \n   |\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 Social Login](https://blog.appseed.us/flask-social-login-with-github/) - blog article (includes a free sample)\n\n\u003cbr /\u003e\n\n---\n[Flask User Authentication](https://blog.appseed.us/flask-user-authentication-free-sample/) - Free sample provided by **AppSeed**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fsample-flask-auth-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapp-generator%2Fsample-flask-auth-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fsample-flask-auth-session/lists"}