This is a companion example app for the tutorial blog post - Integrating SAML Single Sign-On with Python, Okta, and Stytch. Read the blog post to get started and follow along.
You need to make sure you have the following
- Python: Python 3.8+ installed on your machine. You can install it from the Python official website.
- Okta Account: Sign up for an Okta account which will be used as your Identity Provider (IdP). You can register for a free 30 days trial account.
- Stytch Account: Register with Stytch for their B2B SaaS product. Make sure you register for the B2B SaaS Authentication product.
- Node: Node v20.10.0+ installed on your machine. You can install it by following the instructions from their website.
Copy api/.env-TEMPLATE
to api/.env
and set the following environment variables from the Stytch Dashboard.
STYTCH_PROJECT_ID
STYTCH_SECRET
STYTCH_PUBLIC_TOKEN
Copy ui/.env-TEMPLATE
to ui/.env
and set the following environment variables from the Stytch Dashboard.
VITE_STYTCH_PUBLIC_TOKEN
Start by installing the needed packages
cd api
python3 -m venv venv
source venv/bin/activate
pip3 install Flask flask-cors stytch requests python-dotenv
Then run the backend with the following command :
python3 app.py
Start by installing the needed packages:
npm install
Then run the frontend with the following command:
npm run dev