mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
- AsyncJWKSFetcher and SyncJWKSFetcher construction and key retrieval - TTL cache behavior with 5-minute expiry - Force-refresh on unknown kid - verify_token for valid, expired, invalid signature, missing kid tokens - CVE-2022-29217 protection: HS256 tokens rejected |
||
|---|---|---|
| .. | ||
| src/stack_auth | ||
| tests | ||
| pyproject.toml | ||
| README.md | ||
Stack Auth Python SDK
Python SDK for Stack Auth - authentication, user management, and team management for your Python backend.
Installation
pip install stack-auth
Quick Start
from stack_auth import StackServerApp
app = StackServerApp(
project_id="your-project-id",
secret_server_key="your-secret-key",
)
# Verify a request's access token
user = await app.authenticate_request(request)
Requirements
- Python 3.10+