Installation

Install with pip

  1. pip install django-oauth-toolkit

Add oauth2_provider to your INSTALLED_APPS

  1. INSTALLED_APPS =(
  2. ...
  3. 'oauth2_provider',
  4. )

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

  1. urlpatterns =[
  2. ...
  3. path('o/', include('oauth2_provider.urls',namespace='oauth2_provider')),
  4. # using re_path
  5. re_path(r'^o/', include('oauth2_provider.urls',namespace='oauth2_provider')),
  6. ]

Sync your database

  1. $ python manage.py migrate oauth2_provider

Next step is our first tutorial.