stack/sdks/implementations/python
Ejiro Asiuwhu 7b75ba81a8 feat: add jwt verification with async jwks fetcher and ttl cache
- AsyncJWKSFetcher and SyncJWKSFetcher with 5-minute in-memory TTL cache
- verify_token (async + sync) decodes RS256 JWTs via PyJWT
- Algorithm hardcoded to RS256 to prevent CVE-2022-29217 algorithm confusion
- Force-refresh on unknown kid for key rotation handling
2026-03-24 22:23:23 +01:00
..
src/stack_auth feat: add jwt verification with async jwks fetcher and ttl cache 2026-03-24 22:23:23 +01:00
tests feat: add user, team, session, contact channel, and permission pydantic models 2026-03-24 22:23:11 +01:00
pyproject.toml test: add failing tests for python sdk error hierarchy and base model 2026-03-24 22:17:03 +01:00
README.md test: add failing tests for python sdk error hierarchy and base model 2026-03-24 22:17:03 +01:00

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+