FastAPI middleware for Clerk authentication. Version 0.0.9 released 2025-01-30. Supports JWT verification, RS256, and request state. Active development, weekly releases.
pip install fastapi-clerk-authNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Protect a FastAPI route with Clerk JWT authentication. The decoded token is available via request.state.clerk_auth.
Add verify_iat=False to ClerkConfig if needed.
Use float values for leeway, e.g., leeway=5.0.
Ensure issuer ends with '.clerk.accounts.dev' (no trailing slash) and use the API key, not a JWT template secret.
Install cryptography: pip install cryptography