# yezz123/authx

Ready-to-use and customizable Authentications and Oauth2 management for FastAPI ✨

Repository: https://github.com/yezz123/authx
Canonical: https://ross.abutalabs.com/products/authx
Homepage: https://authx.yezz.me/
Language: Python
License: MIT
License Family: permissive
Topics: fastapi, pydantic, starlette, authentification, python, authorization, backend, jwt
Last push: 2026-08-31T22:42:41+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 78, longevity 100
- inputs: {"age_days": 1836, "days_push": 2, "days_rel": 67, "gap_med": 43.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1196, forks 62 (observed 2026-09-01T02:14:08.560059+00:00)

## What it is
AuthX is a Python library providing ready-to-use, customizable authentication and OAuth2 management for FastAPI applications. It offers JWT-based access and refresh tokens, multiple token locations (headers, cookies with CSRF, query, JSON body), token blocklist/revocation, and optional extras like Redis caching and Prometheus metrics.

## Use cases
- add jwt authentication to a fastapi app
- protect fastapi routes with bearer tokens
- implement login and refresh token flow in python
- verify oauth2 access tokens from an external identity provider
- cookie-based authentication with csrf for server-rendered fastapi pages
- revoke or blocklist jwt tokens in fastapi
- add prometheus metrics and redis caching to fastapi endpoints

## When to choose
- you are building an API or SSR app with FastAPI and need JWT auth out of the box
- you want configurable token locations including cookies with CSRF protection
- you need token freshness, refresh tokens, and revocation in one package
- you want optional extras like Redis session storage, HTTP caching, and Prometheus metrics

## When to avoid
- your project does not use FastAPI or the Starlette/Pydantic stack
- you need a full identity provider with user registration, password reset, and social login management
- you require enterprise SSO features like SAML or LDAP out of the box
- you need a framework-agnostic auth solution independent of FastAPI

## Facets
- artifact type: library
- maturity: active
- function: auth, authorization, middleware, caching, monitoring
- domain: web-development, backend, security, apis
- platform: python
- tags: fastapi, jwt, oauth2, pydantic, token-revocation, csrf-protection, refresh-tokens, web-server

## Member repositories
- yezz123/authx (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-09-01T02:14:08.560059+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:22:00.310875+00:00, confidence not recorded.
  - readme: https://github.com/yezz123/authx (fetched 2026-09-01T02:14:08.560059+00:00, sha c770b9ab53e8)
  - homepage: https://authx.yezz.me/ (fetched 2026-08-29T12:29:16.534880+00:00, sha 19aa4850f7f5)
  - site_page: https://authx.yezz.me/get-started/installation (fetched 2026-08-29T12:29:16.544212+00:00, sha 2f23809e5089)
  - registry_pypi: https://pypi.org/pypi/authx/json (fetched 2026-08-29T12:29:16.574133+00:00, sha 9f74c4a23697)
  - site_page: https://authx.yezz.me/extra/templates (fetched 2026-08-29T12:29:16.546256+00:00, sha 8f6a3f12129b)
  - site_page: https://authx.yezz.me/faq/faq (fetched 2026-08-29T12:29:16.548239+00:00, sha 416a74b2f5ba)
  - site_page: https://authx.yezz.me/extra/OAuth2 (fetched 2026-08-29T12:29:16.549778+00:00, sha 99b85814c90f)
  - site_page: https://authx.yezz.me/extra/Metrics (fetched 2026-08-29T12:29:16.551386+00:00, sha f14d78ba56ed)
  - site_page: https://authx.yezz.me/extra/Cache (fetched 2026-08-29T12:29:16.552928+00:00, sha 828d0479a5f4)
  - site_page: https://authx.yezz.me/api/reference (fetched 2026-08-29T12:29:16.570332+00:00, sha 03e51613156b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
