Skip to content

scalekit-developers/scalekit-fastapi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Scalekit FastAPI Example App

FastAPI Python License: MIT

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.

🚀 What This Demo Shows

  • 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

Getting Started

  1. Sign up for a Scalekit account.
  2. Get your env_url, client_id and client_secret from the Scalekit dashboard.

How to Run

# 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.py
Open http://localhost:8080 with your preferred browser

API Reference

See the Scalekit API docs for more information about the API and authentication.

About

FastAPI SSO example - Python async authentication with modern API patterns

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages