Skip to main content

Use this simple module to easily enable authorization in your Django application via Twitch API

Project description

Wanna enable your awesome Django application to register and authenticate user using Twitch profiles?
This application was created especially for your needs

Features

  • Easy to use

  • Ready to Twitch channel name changes

  • Username cases are synchronized to Twitch display_name

  • User emails are synchronized to Twitch

Installation

Ensure that Django ‘sites’ framework is enabled.

Python package:

pip install django-simpletwitchauth

settings.py:

Add twitch_auth to INSTALLED_APPS

Add twitch_auth.backends.OAuth2Backend to AUTHENTICATION_BACKENDS

Set Twitch application settings

Example using django-environ:

env = environ.Env()

TWITCH_AUTH_CLIENT_ID = env('TWITCH_CLIENT_ID', default='some_client_id')
TWITCH_AUTH_CLIENT_SECRET = env('TWITCH_CLIENT_SECRET', default='some_client_secret')

All available settings:

TWITCH_AUTH_SCOPE

Defines OAuth2 token scope

Defaults to user_read

TWITCH_AUTH_PROTOCOL

Defines protocol that is used to build full authentication callback URI

Defaults to http://

TWITCH_AUTH_CLIENT_ID

Defines Twitch application client ID

TWITCH_AUTH_CLIENT_SECRET

Defines Twitch application client secret

TWITCH_AUTH_REDIRECT_URI

Defines default redirect URI after successful authentication

Defaults to /

Usage

  • Run migrations to create database tables for entities.

  • Add somewhere in your templates link to url login_twitch

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

django-simpletwitchauth-1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_simpletwitchauth-1.0-py2.py3-none-any.whl (12.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-simpletwitchauth-1.0.tar.gz.

File metadata

File hashes

Hashes for django-simpletwitchauth-1.0.tar.gz
Algorithm Hash digest
SHA256 127ef54afa6364af9476ef2c4847a7db540a2822c4b1f12b148299dd4c7fcf65
MD5 3a38437b6147e4711f6664b2bcb99417
BLAKE2b-256 c8449a4f35d6633bfceb82f1eea1717e50070b38ba24df9e36db23c23fb05a42

See more details on using hashes here.

File details

Details for the file django_simpletwitchauth-1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_simpletwitchauth-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 abe9c988a07ef58501e2445f1488451e0fe281b582405100423f4b4b20dfe33b
MD5 a492cda32a9fcf419ac6c726f4cfd612
BLAKE2b-256 b97a8e9757ad2414f278e1138dcc925b3c83991bb709f14f22dab40814a610a7

See more details on using hashes here.

Supported by

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