# miguelgrinberg/Flask-HTTPAuth

Simple extension that provides Basic, Digest and Token HTTP authentication for Flask routes

Repository: https://github.com/miguelgrinberg/Flask-HTTPAuth
Canonical: https://ross.abutalabs.com/products/flask-httpauth
Language: Python
License: MIT
License Family: permissive
Topics: python, flask, flask-httpauth, authentication, tokens, security
Last push: 2026-05-14T19:37:53+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 82, release rhythm 45, longevity 100
- inputs: {"age_days": 4855, "days_push": 111, "days_rel": 158, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1289, forks 238 (observed 2026-08-28T04:04:15.379440+00:00)

## What it is
Flask-HTTPAuth is a Flask extension that adds HTTP authentication to routes, supporting Basic, Digest, and Token schemes. It provides decorators and callbacks for verifying credentials and protecting endpoints.

## Use cases
- add basic auth to flask routes
- protect flask api endpoints with token authentication
- implement digest authentication in flask
- require login for flask views
- secure a flask rest api with http auth

## When to choose
- you use Flask and need simple HTTP Basic, Digest, or Token authentication
- you want a lightweight, decorator-based auth layer without a full auth framework
- you need fine-grained control over credential verification callbacks

## When to avoid
- you need full user management with registration, sessions, and OAuth (use Flask-Security or Authlib)
- your app is not built on Flask
- you need social login or SSO flows

## Facets
- artifact type: library
- maturity: stable
- function: auth, middleware
- domain: web-development, backend, security, apis
- platform: python
- tags: flask, http-authentication, basic-auth, digest-auth, token-auth, flask-extension, web-server

## Member repositories
- miguelgrinberg/Flask-HTTPAuth (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:15.379440+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-30T04:55:45.520737+00:00, confidence not recorded.
  - readme: https://github.com/miguelgrinberg/Flask-HTTPAuth (fetched 2026-08-28T04:04:15.379440+00:00, sha 7377c59d3225)
  - registry_pypi: https://pypi.org/pypi/flask-httpauth/json (fetched 2026-08-29T12:11:42.951270+00:00, sha dff7c6ed6cca)
- Data as of 2026-08-30T08:39:29.467469+00:00.
