A production-ready authentication API built using Django, Django REST Framework, and JWT (SimpleJWT).
This project implements a fully custom user model with email-based authentication, secure JWT login, and password reset via email.
- ✅ Custom User Model (Email as username)
- ✅ User Registration API
- ✅ JWT Login (Access + Refresh Tokens)
- ✅ Protected Profile Endpoint
- ✅ Password Reset via Email (Token-based)
- ✅ Gmail SMTP Integration
- ✅ Admin Panel Support
- Python 3.x
- Django
- Django REST Framework
- SimpleJWT
- Gmail SMTP
POST /api/user/register/
POST /api/user/login/
POST /api/user/token/refresh/
GET /api/user/profile/
Authorization: Bearer <access_token>
POST /api/user/send-reset-password-email/
POST /api/user/reset-password/<uid>/<token>/
git clone https://github.com/ajumishra5/django-jwt-auth-api.git
cd django-jwt-auth-apipython -m venv venv
venv\Scripts\activate # Windowspip install -r requirements.txtCreate a .env file:
EMAIL_USER=yourgmail@gmail.com
EMAIL_PASSWORD=your_app_password
python manage.py migratepython manage.py runserver- User registers
- User logs in → receives JWT access & refresh tokens
- Access token used to access protected routes
- Password reset uses Django token generator + uid encoding
- Implemented a fully custom user model using
AbstractBaseUser - Overrode serializer
create()method for secure password handling - Implemented token-based authentication
- Integrated SMTP email system
- Debugged real-world email delivery issues
account/
config/
manage.py
- Docker Support
- PostgreSQL integration
- Token Blacklisting
- HTML Email Templates
- Unit Tests
Ajay Mishra
Backend Developer | Django & DRF
Open to backend opportunities
GitHub: https://github.com/ajumishra5