Django Authetication with Twitch.
Project description
Django Twitch Auth
Dependencies
Install requests if not installed
pip install requests
Installation
- Install using pip
pip install django_twitch_auth
- Add 'django_twitch_auth' to your INSTALLED_APPS setting.
INSTALLED_APPS = [
...
'django_twitch_auth',
]
- 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',
...
]
- Add AUTHENTICATION_BACKENDS to your settings.
AUTHENTICATION_BACKENDS = [
'django_twitch_auth.authbackends.TwitchBackend',
]
- Add the following to your root urls.py file.
urlpatterns = [
...
path('django_twitch_auth/', include('django_twitch_auth.urls'))
]
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_twitch_auth-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba38b2cc2da016907ad7e13c81d8a47511c5ad2d20f8751a0c0651b252208bf2 |
|
MD5 | 7dbd2992ad08359659f0bbac89445c13 |
|
BLAKE2b-256 | 315c1be77992968286f6e31bedcecc3767edd15a0263ea01377e967e321c7ca5 |