/stytch-b2b-flask-magic-links-example

B2B auth quickstart using Stytch's email magic links and sessions

Primary LanguagePython

Stytch B2B Quickstart with Python Flask

Quickstart example app covering the basics for getting up and running with B2B authentication:

  • Email Magic Links
  • Sessions
  • RBAC

Get Started

Ensure you have pip, python and virtualenv installed

1. Clone the repository.

git clone https://github.com/stytchauth/stytch-b2b-flask-magic-links.git
cd stytch-b2b-flask-magic-links

2. Setup a virtualenv

We suggest creating a virtualenv and activating it to avoid installing dependencies globally

virtualenv -p python3 venv
source venv/bin/activate

3. Install dependencies:

pip install -r requirements.txt

4. Set ENV vars

Copy .env.template to .env and update the values with your Stytch project ID, secret and public token from the API Keys section of the Stytch Dashboard.

7. Run the Server

Run

python3 main.py

Go to http://localhost:3000/

Next steps

This example app showcases a small portion of what you can accomplish with Stytch. Next, explore adding additional login methods, such as OAuth or SSO.

Get help and join the community

💬 Stytch community Slack

Join the discussion, ask questions, and suggest new features in our ​Slack community!

❓ Need support?

Check out the Stytch Forum or email us at support@stytch.com.