https://github.com/scalekit-developers/scalekit-fastapi-example
FastAPI SSO example - Python async authentication with modern API patterns
https://github.com/scalekit-developers/scalekit-fastapi-example
api async authentication demo fastapi pydantic python sso
Last synced: about 2 months ago
JSON representation
FastAPI SSO example - Python async authentication with modern API patterns
- Host: GitHub
- URL: https://github.com/scalekit-developers/scalekit-fastapi-example
- Owner: scalekit-developers
- License: mit
- Created: 2024-05-25T12:44:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-04T12:42:10.000Z (10 months ago)
- Last Synced: 2025-09-04T14:38:45.452Z (10 months ago)
- Topics: api, async, authentication, demo, fastapi, pydantic, python, sso
- Language: Python
- Homepage: https://docs.scalekit.com/sso/quickstart?tech-stack=py
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Scalekit FastAPI Example App
[](https://fastapi.tiangolo.com/)
[](https://www.python.org/)
[](https://opensource.org/licenses/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](https://scalekit.com) for a Scalekit account.
2. Get your ```env_url```, ```client_id``` and ```client_secret``` from the Scalekit dashboard.
## How to Run
```sh
# Add ReactJS submodule for frontend elements
git clone --recursive https://github.com/scalekit-developers/shared-ui-for-examples.git
```
```sh
# Install scalekit-fastapi-example dependencies from requirements file using below cmd
pip install -r requirements
```
```sh
# Run following command to create .env file
add cp .env.example .env
```
```sh
# 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
```
```sh
# Run the development server:
python3 main.py
```
```sh
Open http://localhost:8080 with your preferred browser
```
## API Reference
See the [Scalekit API docs](https://docs.scalekit.com) for more information about the API and authentication.