better-auth-python

Verify Better Auth JWTs in Python FastAPI backends using JWKS.

1|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/Hamza123545/Todo_giaic_five_phases --skill better-auth-python-hamza123545
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-python
Source: https://github.com/Hamza123545/Todo_giaic_five_phases/tree/main/.claude/skills/better-auth-python
Command: npx skills add https://github.com/Hamza123545/Todo_giaic_five_phases --skill better-auth-python-hamza123545

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integrates Better Auth JWT verification with Python FastAPI backends to securely validate tokens from a centralized TypeScript auth server, enabling protected routes and a consistent user context.

Core Features & Use Cases

  • JWKS-based JWT verification to fetch public keys and verify tokens
  • Protected routes integration via FastAPI dependencies (get_current_user)
  • Templates and guidance for SQLModel/SQLAlchemy integrations with FastAPI

Quick Start

  1. Install dependencies: pip install fastapi uvicorn pyjwt cryptography httpx
  2. Set the BETTER_AUTH_URL environment variable to the address of your Better Auth server
  3. Protect endpoints by injecting get_current_user into your route handlers

Frequently Asked Questions about better-auth-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Better Auth JWTs in a Python FastAPI backend?

FastAPI integrates Better Auth JWT verification by fetching public keys through JWKS from the BETTER_AUTH_URL, validating tokens via dependency injection to secure protected routes and maintain consistent user context.

What dependencies do I need to validate Better Auth tokens with FastAPI?

Validating Better Auth tokens with FastAPI requires installing pyjwt, cryptography, and httpx using pip to enable JWKS fetching and cryptographic signature verification.

Can I use SQLModel or SQLAlchemy with Better Auth JWT verification?

Yes, you can use SQLModel or SQLAlchemy with Better Auth JWT verification by applying provided templates and guidance that integrate database backends via FastAPI dependency injection.

How does a TypeScript Better Auth server integrate with Python applications?

A TypeScript Better Auth server integrates with Python applications by exposing a BETTER_AUTH_URL, allowing the Python backend to fetch JWKS public keys and securely validate issued JWTs across protected endpoints.