Skip to main content

Django Authetication with Twitch.

Project description

Django Twitch Auth

Dependencies

Install requests if not installed

pip install requests

Installation

  1. Install using pip
pip install django_twitch_auth
  1. Add 'django_twitch_auth' to your INSTALLED_APPS setting.
INSTALLED_APPS = [
    ...
    'django_twitch_auth',
]
  1. Add 'django_twitch_auth.middlewares.TwitchAuthenticationMiddleware' under 'django.contrib.sessions.middleware.SessionMiddleware' to your MIDDLEWARE setting.
MIDDLEWARE = [
    ...
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django_twitch_auth.middlewares.TwitchAuthenticationMiddleware',
    ...
]
  1. Add AUTHENTICATION_BACKENDS to your settings.
AUTHENTICATION_BACKENDS = [
    'django_twitch_auth.authbackends.TwitchBackend',
]
  1. Add the following to your root urls.py file.
urlpatterns = [
    ...
    path('django_twitch_auth/', include('django_twitch_auth.urls'))
]
  1. Add twitch credentials and redirect uri to your settings
TWITCH_CLIENT_ID = 'client_id_here'
TWITCH_CLIENT_SECRET = 'client_secret_here'
TWITCH_REDIRECT_URI = 'https://redirect_uri_here'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_twitch_auth-0.1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

django_twitch_auth-0.1.0-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page