5h15h1r / BeWyse-task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auth-API

REST API for user authentication

Assignment

Creating the project

  1. Run your code with Python (3.9) and Django (3.2).
  2. Setup a local mongodb database for storing the data.
  3. Use Firebase to authorise (create and verify custom token) the User using Middleware

Installation and Usage

Local setup

  1. Clone the project
  git clone https://github.com/5h15h1r/BeWyse-task
  1. Go to the project directory
  cd BeWyse-task
  1. Create a Virtual Environment (Optional/Preferred)
  python3 -m venv /path/to/new/virtual/environment
  1. Install dependencies
  pip install -r requirements.txt
  1. Get the service account JSON file from your firebase project console and store it. Rename it with the "creds.json"

  2. Start a mongodb instance using docker

  docker run -d -p 27017:27017 --name=mongo mongo:latest
  1. Change the name of your database in settings.py

  2. Apply the migrations and run the server

  python3 manage.py runserver

(back to top)

forthebadge

About


Languages

Language:Python 100.0%