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.
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
- Installation
- Getting started
- Tutorials
- Django Rest Framework
- Django Ninja
- Using the views
- Templates
- Views code and details
- Models
AbstractAccessTokenAbstractApplicationAbstractDeviceGrantAbstractGrantAbstractIDTokenAbstractRefreshTokenAccessTokenApplicationClientSecretFieldDeviceCodeResponseDeviceGrantDeviceRequestGrantIDTokenRefreshTokenResourceJSONFieldTokenChecksumFieldget_access_token_admin_class()get_access_token_model()get_application_admin_class()get_application_model()get_device_grant_model()get_grant_admin_class()get_grant_model()get_id_token_admin_class()get_id_token_model()get_refresh_token_admin_class()get_refresh_token_model()is_origin_allowed()redirect_to_uri_allowed()refresh_token_expire_timedelta()
- Advanced topics
- RFC 9700 Security Best Current Practice
- OpenID Connect
- OAuth 2.0 Authorization Server Metadata
- OAuth 2.0 Protected Resource Metadata
- Client ID Metadata Documents (CIMD)
- Signals
- Settings
- Separate Resource Server
- Token Audience Binding (RFC 8707)
- Management commands
- Glossary