A Flask-based User Authentication System implementing secure user registration, login, logout, and session management.
This project focuses on authentication fundamentals such as password hashing, session handling, and access control.
A minimal Todo module is included only to demonstrate authenticated user access.
- User Registration
- User Login & Logout
- Session-based Authentication
- Secure Password Hashing using bcrypt
- Protected Routes (authorized access only)
- SQLite database with SQLAlchemy ORM
- Authentication-first architecture
- Backend: Flask (Python)
- Database: SQLite
- ORM: SQLAlchemy
- Authentication: Flask Sessions
- Security: bcrypt password hashing
- Frontend: HTML, CSS (Jinja Templates)
User-Authentication-System/
│── app.py
│── requirements.txt
│── .gitignore
│── templates/
│ ├── login.html
│ ├── register.html
│ ├── index.html
│ └── update.html
│── static/
git clone https://github.com/your-username/User-Authentication-System.git
cd User-Authentication-Systempython -m venv env
env\Scripts\activate # Windowspip install -r requirements.txtpython app.pyhttp://127.0.0.1:2711
- User registers with email and password
- Password is securely hashed using bcrypt
- User logs in with valid credentials
- Session is created and stored server-side
- Protected routes are accessible only to authenticated users
- Logout clears session data
| Route | Purpose |
|---|---|
/register |
User registration |
/login |
User login |
/logout |
End user session |
/home |
Protected route (authentication required) |
/ |
Redirects based on authentication status |
- Passwords are never stored in plain text
- bcrypt hashing ensures strong password security
- Session-based authentication prevents unauthorized access
- Database and environment files excluded via
.gitignore
The Todo functionality exists only as a demonstration layer to validate:
- Successful authentication
- User-specific access
- Session persistence
The primary focus of this repository is user authentication, not task management.
- Flask-Login integration
- Role-based access control (RBAC)
- Password reset & email verification
- JWT-based authentication
- OAuth (Google / GitHub login)
Suresh Thevar
Focused on backend development, authentication systems, and Flask-based web applications.
Give the repository a ⭐ and feel free to fork!