This project demonstrates a simple implementation of user authentication using Django for the backend and React for the frontend. JSON Web Tokens (JWT) are used to manage user authentication.
Before you begin, make sure you have the following installed:
- Python (3.6 and above)
- Node.js
- npm
- Navigate to the
backend
directory:cd backend
API Endpoints Register User:
Endpoint: /api/register/ Method: POST Payload: { "username": "your_username", "password": "your_password" } Login User:
Endpoint: /api/login/ Method: POST Payload: { "username": "your_username", "password": "your_password" } Logout User:
Endpoint: /api/logout/ Method: POST User Profile:
Endpoint: /api/profile/ Method: GET Dependencies Backend:
Django Django REST framework djangorestframework-simplejwt Frontend:
React Axios (for API requests) Contributing Contributions are welcome! Feel free to open issues and pull requests.