https://github.com/sami-bre/flask_minimal_auth
A bare minimal flask webapp that implements authentication functionality
https://github.com/sami-bre/flask_minimal_auth
authentication back-end flask python session
Last synced: 2 months ago
JSON representation
A bare minimal flask webapp that implements authentication functionality
- Host: GitHub
- URL: https://github.com/sami-bre/flask_minimal_auth
- Owner: sami-bre
- Created: 2022-11-23T18:36:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-01T21:09:06.000Z (almost 3 years ago)
- Last Synced: 2025-06-13T12:50:10.779Z (about 1 year ago)
- Topics: authentication, back-end, flask, python, session
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A simple authentication functionality implemented with Flask
This is a webapp showcasing a bare minimum auth functionality.
The main ingredient is Flask. On top of that, we use the Flask-Session
extension to keep login data across a session. For the database, we're
using sqlite. (python supports sqlite with the built-in sqlite3 module)
## To clone and run the app ...
- First, well, clone it : ) and go into the cloned directory
- Create a new python virtual environment with `python3 -m venv [env_name]` and activate the environment.
- Download the dependencies listed in the requirements.txt file manually or just do `pip install -r requirements.txt`
- In a terminal window, do `flask run`
- Open your browser and navigate to the url mentioned in the terminal.
- You'll run into a problem while trying to register or login. This is because the database is not set up yet. Hit the "/setup" route and the database will be set up automatically.
### EXTRA
- If you want to change the database file or switch between databases, edit the `DATABASE_FILE_NAME = "test_database.db"` line in the database_helper.py file and hit the "/setup" url again.
### FINALLY
This is probably the minimal auth functionality one can implement. It lacks many important things like password hashing. DO NOT use it without modification for any real world application.