This repository contains a Django project implementing JWT (JSON Web Token) authentication with email confirmation service using Django Rest Framework.
- User registration with email confirmation
- User login and JWT generation
- JWT authentication for protected endpoints
- Email confirmation link with token expiration
- Password reset functionality via email
- Python 3.x
- Django 4.x
- Django Rest Framework 3.x
- Clone the repository:
git clone git@github.com:sousaGab/django-jwt-authentication.git
cd django-jwt-authentication
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate
- Install the required dependencies:
pip install -r requirements.txt
-
Configure the database settings in settings.py.
-
Apply the migrations:
python manage.py migrate
- Run the development server:
python manage.py runserver
Access the API documentation at {API_URL}/swagger/
or {API_URL}/redoc/
.
- Email settings can be configured in
settings.py
. - JWT settings can be configured in
settings.py
.
To run the tests, execute the following command:
python manage.py test