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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file django_twitch_auth-0.1.0.tar.gz.

File metadata

  • Download URL: django_twitch_auth-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for django_twitch_auth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8811f9f40e6adc0af44a855d0c7f11f5003e922ee15085b21f6a11bfc5a85f7
MD5 94f3b187c70b58711b32a3e084d2aecf
BLAKE2b-256 030b071a4300ee5852189e8294167d6beb25a9f66641d248384873b5b184c0cf

See more details on using hashes here.

File details

Details for the file django_twitch_auth-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_twitch_auth-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for django_twitch_auth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba38b2cc2da016907ad7e13c81d8a47511c5ad2d20f8751a0c0651b252208bf2
MD5 7dbd2992ad08359659f0bbac89445c13
BLAKE2b-256 315c1be77992968286f6e31bedcecc3767edd15a0263ea01377e967e321c7ca5

See more details on using hashes here.

Supported by

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