# django-oauth/django-oauth-toolkit

OAuth2 goodies for the Djangonauts!

Repository: https://github.com/django-oauth/django-oauth-toolkit
Canonical: https://ross.abutalabs.com/products/django-oauth-toolkit
Homepage: https://django-oauth-toolkit.readthedocs.io
Language: Python
License: NOASSERTION
License Family: other
Topics: python, django, oauth2
Last push: 2026-08-23T07:23:35+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 86, longevity 100
- inputs: {"age_days": 4853, "days_push": 10, "days_rel": 12, "gap_med": 47.5, "n_releases_24m": 7}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3333, forks 856 (observed 2026-08-28T04:07:56.654090+00:00)

## What it is
Django OAuth Toolkit is an OAuth 2.0 authorization server and resource server library for Django projects, built on OAuthLib and RFC 6749 compliant. It provides endpoints, models, and logic to issue and manage OAuth2 tokens within an existing Django app, including MCP authorization support with PKCE and discovery metadata.

## Use cases
- add oauth2 authentication to a django app
- protect a django rest framework api with oauth2 tokens
- run an oauth2 authorization server without a separate service
- issue and manage oauth2 access tokens in django
- support mcp authorization with pkce in django
- implement oidc login for a django project

## When to choose
- you already run Django and want OAuth2 server capabilities in-process
- you need RFC-compliant OAuth2 or OIDC with Django REST Framework integration
- you need MCP-compliant authorization for AI agent clients

## When to avoid
- you use Flask, FastAPI, or a non-Django stack
- you want a standalone identity provider service like Keycloak
- you only need simple session-based login without OAuth2

## Facets
- artifact type: library
- maturity: active
- function: auth, authorization, middleware
- domain: security, web-development, backend, apis
- platform: python
- tags: django, oauth2, oauthlib, authorization-server, oidc, pkce, mcp, resource-server, django-rest-framework, web-server

## Member repositories
- django-oauth/django-oauth-toolkit (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:56.654090+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-29T18:41:28.280135+00:00, confidence not recorded.
  - readme: https://github.com/django-oauth/django-oauth-toolkit (fetched 2026-08-28T04:07:56.654090+00:00, sha 682d7c03726b)
  - registry_pypi: https://pypi.org/pypi/django-oauth-toolkit/json (fetched 2026-08-29T09:35:05.969180+00:00, sha fde8eff75eac)
- Data as of 2026-08-30T08:39:29.467469+00:00.
