This is a Fast API application which depicts usage of Oauth2
This is a specification that handles authorization and authentication. It is an example of what systems with "login with google or login with facebook".
In Oauth2 the several ways to handle security are called flows
.
The various kinds of flows include:
- implicit
- clientCredentials
- authorizationCode
- password
In this application I have implemented thepassword flow
.
Download and install python. Be sure to check the checkbox add python to path.
Navigate to your projec directory for this case will be simple-oauth2-FastAPI.
git clone https://github.com/mbuthi/simple-oauth2-FastAPI
Check to make sure you are in the same directory where you did the git clone,if not navigate to that specific directory.
Depending on your operating system, make a virtual env to prevent messing with your system's primary dependencies
cd simple-oauth2-FastAPI
py -3 -m venv venv
cd simple-oauth2-FastAPI
python3 -m venv venv
venv\Scripts\activate
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload