# Welcome to Django OAuth Toolkit Documentation

Django OAuth Toolkit can help you by providing, out of the box, all the endpoints, data, and logic needed to add OAuth2 capabilities to your Django projects. 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
  - Sync your database
- Getting started
  - What we will build?
  - What is OAuth?
  - Django
  - Django OAuth Toolkit
  - OAuth2 Authorization Grants
  - Authorization Code
  - Client Credential
- Tutorials
  - Part 1 - Make a Provider in a Minute
  - Part 2 - protect your APIs
  - Part 3 - OAuth2 token authentication
  - Part 4 - Revoking an OAuth2 Token
  - Part 5 - Using Celery to Automate Maintenance Chores
  - Part 6 - Device authorization grant flow
- Django Rest Framework
  - Getting started
  - Permissions
- Using the views
  - Function-based views
  - Class-based Views
  - Application Views
  - Granted Tokens Views
  - Mixins for Class Based Views
- Templates
  - base.html
  - authorize.html
  - Management
- Views code and details
  - Generic
  - Mixins
  - Base
- Models
  - `AbstractAccessToken`
  - `AbstractApplication`
  - `AbstractDeviceGrant`
  - `AbstractGrant`
  - `AbstractIDToken`
  - `AbstractRefreshToken`
  - `AccessToken`
  - `Application`
  - `ClientSecretField`
  - `DeviceCodeResponse`
  - `DeviceGrant`
  - `DeviceRequest`
  - `Grant`
  - `IDToken`
  - `RefreshToken`
  - `TokenChecksumField`
  - `get_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()`
- Advanced topics
  - Extending the Application model
  - Skip authorization form
  - Overriding views
- OpenID Connect
  - OpenID Connect support
  - Configuration
  - Setting up OIDC enabled clients
  - Customizing the OIDC responses
  - Customizing the login flow
  - OIDC Views
  - Define where to store the profile
- Signals
- Settings
  - List of available settings within OAUTH2_PROVIDER
  - List of non-namespaced settings
  - Settings imported from Django project
- Separate Resource Server
  - Setup the Authentication Server
  - Setup the Resource Server
- Management commands
  - cleartokens
  - createapplication
- Glossary

- Contributing
- Changelog

# Indices and tables

- Index

- Module Index