This project sets up a user authentication system using Django, Django REST Framework, and Djoser for token-based authentication and password reset functionality.
- โ User Signup
- โ User Login with Token Authentication
- โ User Logout
- โ Password Reset via Email (Console backend)
- ๐ Email-based password reset confirmation via UID and token
- ๐ Secure password hashing and write-only password field
- ๐ฆ Djoser integrated for standardized auth endpoints
https://github.com/kihuni/authAPP-API.git
cd authapi
python -m venv env
source env/bin/activate # On Windows: env\Scripts\activate
pip install -r requirements.txt
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
| Endpoint | Method | Description |
|---|---|---|
/signup/ |
POST | Custom user registration |
/login/ |
POST | Custom user login (token) |
/logout/ |
POST | Custom user logout (token delete) |
auth/users/reset_password/ |
POST | Request password reset |
/auth/users/reset_password/confirm/ |
POST | Reset password using token+uid |
-
Send a POST to auth/users/reset_password/ with your email.
-
Check the terminal for the reset link.
-
Extract uid and token from the link.
-
Send a POST to /auth/users/reset_password/ for example with:
{
"email": "stephenkihuni55@gmail.com"
}
In settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
-
Django
-
Django REST Framework
-
Djoser
-
SQLite (default for dev)