Django OAuth Toolkit provides out of the box all the endpoints, data and logic needed to add OAuth2 capabilities to Django. The use of OAuthLib, makes it completely RFC-Compliant, but it’s modularity also allows you to have extra horsepower if you need it.

Get Started
Get Started

Easy to use

Secure your API infrastructure with OAuth2 in a few lines of code, set up the scopes you need and let DOT handle all the logic to ensure your website has RFC-Compliant authorization handling and the security your users deserve.

Extensible

DOT can be as complex as your project requires it to be. It’s modular nature gives you a tailored implementation for each of your projects, ensuring it will always work as you need it to without anything more or less than the necessary.

Open Source

DOT has almost 1000 commits, 1000 stars, 85 contributors and more than 300 forks. It’s used in more than 6000 projects and it’s under the permissive BSD License.

How to setup

djangonaut: ~ (zsh)
~ pip install django-oauth-toolkit

Install with pip

Requirements:

  • Python 2.7, 3.4, 3.5, 3.6
  • Django 1.10, 1.11
djangonaut: ~ (zsh)
01 INSTALLED_APPS = (
02 ...
03 'oauth2_provider'
04 )

Add oauth2_provider to your INSTALLED_APPS.

djangonaut: ~ (zsh)
01 urlpatterns = [
02 ...
03 url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
04 ]

If you need an OAuth2 provider you’ll want to add the following to your urls.py.