Skip to content

mbvgua/oauth-primer

Repository files navigation

Oauth Primer

Table Of Contents

  1. Project description
  2. Project setup
    1. Setup on local device
    2. Setup with Docker

Project Descrption

  • A minimal project primarily aimed at understanding the implementation of Oauth. I have built it with python, using Flask as my framework of choice. A comprehensive list of all required modules can be found in the requirements.txt file.

Project Setup

  • The are two main ways to setup and run the application, which I have described below:
    • Local setup on your machine with python and pip
    • Setup with docker

Setup on local device

  1. Create a virtual environment. A common and well thought out name is .venv/venv e.t.c:
$ python -m venv .venv
  1. Activate the virtual environment:
$ source .venv/bin/activate

Note

This method only works for Unix based operating systems, i.e Linux and MacOs. If you are using Windows, try .venv\Scripts\activate

  1. Next install all dependencies in the requirements.txt file:
(.venv)$ pip install -r requirements.txt
  1. Move the .env-example file and copy the environment variables. These will help you setup your own .env varibales that ae required for setting up and running the application.

  2. Finally, start the python server and navigate to https://127.0.0.1:5000/ where you'll find the server running:

(.venv)$ python app.py

Setup with Docker

  1. Pull the docker image
$ docker pull mbvgua/oauth-primer:v1
  1. Run the container:
$ docker run -p 5000:5000 mbvgua/oauth-primer:v1
  1. Navigate to https:127.0.0.1:5000/ where the server will be running

Todos

  • Add mechansim to check validity of email and password in auth module
  • Add the admin dashboard
  • Change db from sqlite3 to MySql
  • Add mechanism to send emails to user once account has been created

About

the one where I implement OAuth

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published