Skip to content

chrisK824/fastapi-sso-example

Repository files navigation

fastapi-sso-example

FastAPI Single Sign On example with various providers and minimal home page that presents counters for users from each provider

Cloud deployed demo

https://fastapi-sso-example.vercel.app/

Installation

  • Create a python virtual environment: python3.11 -m venv venv
  • Activate the virtual environment: source venv/bin/activate
  • Install dependencies: python3.11 -m pip install -r requirements.txt

Setup and Configuration

  • Create a .env file in the project root directory with the keys just like shown in .env.example
  • Fill the values for each environment variable
  • For creating client IDs and secrets for each provider you can follow these guides:

Use the project

  • While in activated virtual environment, run with: python3.11 main.py

To sign up a local user

Use the swagger documentation at localhost:9999/v1/documentation, example:

  • img.png

Browse in the app

  • Visit the user interface in the browser at: localhost:9999
  • Use form to sign-in with local users
  • Use sign-in buttons to sign-in via a provider

About

FastAPI SSO example with various providers

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •