Welcome to Django OAuth Toolkit Documentation

Django OAuth Toolkit is an OAuth 2.0 authorization server for teams already running Django. It provides, out of the box, the endpoints, models, and logic to issue and manage OAuth2 tokens from your existing Django project. It can also act as a resource server to protect a Django or Django REST Framework API. Django OAuth Toolkit makes extensive use of the excellent OAuthLib, so that everything is rfc-compliant.

See our Changelog for information on updates.

MCP authorization

As of 3.4.0, Django OAuth Toolkit supports the authorization server role required by the Model Context Protocol (MCP) authorization specification. PKCE is required by default, and the authorization server metadata (RFC 8414) and protected resource metadata (RFC 9728) discovery endpoints are included in the default URLconf. Dynamic Client Registration (RFC 7591/7592) and Client ID Metadata Documents can be enabled with the DCR_ENABLED and CIMD_ENABLED settings. See the 3.4.0 release discussion for the supported specifications and current gaps.

Support

If you need help please submit a question.

Requirements

  • Python 3.10, 3.11, 3.12, 3.13 or 3.14

  • Django 4.2, 5.0, 5.1, 5.2 or 6.0

  • oauthlib 3.2.2+

Index

Indices and tables