Scalekit is the auth stack for AI apps - from human authentication to agent authorization.
This FastAPI example demonstrates how to implement enterprise authentication flows using Scalekit's Python SDK with modern async web framework patterns.
- Enterprise SSO Integration: SAML/OIDC authentication flows using Scalekit
- FastAPI Performance: High-performance async Python web framework
- Session Management: Secure user authentication and cookies
- OAuth 2.0 Flows: Authorization code flow with callback handling
- User Profile Management: Authenticated user data access
- Clean API Design: RESTful endpoints for authentication workflows
- Sign up for a Scalekit account.
- Get your
env_url,client_idandclient_secretfrom the Scalekit dashboard.
# Add ReactJS submodule for frontend elements
git clone --recursive https://github.com/scalekit-developers/shared-ui-for-examples.git# Install scalekit-fastapi-example dependencies from requirements file using below cmd
pip install -r requirements# Run following command to create .env file
add cp .env.example .env# Update .env file with env_url, client_id and client_secret fetched from the Scalekit dashboard as below
SCALEKIT_ENV_URL = env_url
SCALEKIT_CLIENT_ID = client_id
SCALEKIT_CLIENT_SECRET = client_secret# Run the development server:
python3 main.pyOpen http://localhost:8080 with your preferred browserSee the Scalekit API docs for more information about the API and authentication.