REST API for user authentication
Creating the project
- Run your code with Python (3.9) and Django (3.2).
- Setup a local mongodb database for storing the data.
- Use Firebase to authorise (create and verify custom token) the User using Middleware
- Clone the project
git clone https://github.com/5h15h1r/BeWyse-task
- Go to the project directory
cd BeWyse-task
- Create a Virtual Environment (Optional/Preferred)
python3 -m venv /path/to/new/virtual/environment
- Install dependencies
pip install -r requirements.txt
-
Get the service account JSON file from your firebase project console and store it. Rename it with the "creds.json"
-
Start a mongodb instance using docker
docker run -d -p 27017:27017 --name=mongo mongo:latest
-
Change the name of your database in settings.py
-
Apply the migrations and run the server
python3 manage.py runserver