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
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8811f9f40e6adc0af44a855d0c7f11f5003e922ee15085b21f6a11bfc5a85f7 |
|
MD5 | 94f3b187c70b58711b32a3e084d2aecf |
|
BLAKE2b-256 | 030b071a4300ee5852189e8294167d6beb25a9f66641d248384873b5b184c0cf |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba38b2cc2da016907ad7e13c81d8a47511c5ad2d20f8751a0c0651b252208bf2 |
|
MD5 | 7dbd2992ad08359659f0bbac89445c13 |
|
BLAKE2b-256 | 315c1be77992968286f6e31bedcecc3767edd15a0263ea01377e967e321c7ca5 |