Skip to main content

Django all auth includes all account, including django default, OAuth (Google, Discord, Twitch), openId (Steam).

Project description

Django all auth includes all account, including django default, OAuth (Google, Discord, Twitch), openId (Steam).

Detailed documentation is in the “docs” directory.

Quick start

  1. Add “account” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...,
        'dj_all_auth',
    ]
  2. Include the polls URLconf in your project urls.py like this:

    # if you are not using /accounts url then you need to add `LOGIN_URL = '<your-url>'` in your settings.py
    
    path('accounts/', include('dj_all_auth.urls')),
  3. Add context processor to settings.py:

    'dj_all_auth.context_processors.__config'
  4. Add dj_all_auth settings to settings.py:

    DJ_ALL_AUTH = {
        'LOGO': 'images/logo.webp',
        'CONNECTIONS': {
            # name of the url that will be used once OAuth is completed
            'REDIRECT_URI_NAME': None,
            'GOOGLE': {
                # Set {domain-without-local}/account/google/authenticated to twitch redirect url
                'CLIENT_ID': os.getenv('GOOGLE_CLIENT_ID') if os.getenv('GOOGLE_CLIENT_ID') else None,
                'CLIENT_SECRET': os.getenv('GOOGLE_CLIENT_SECRET') if os.getenv('GOOGLE_CLIENT_SECRET') else None,
                'SCOPE': ['openid', 'email', 'https://www.googleapis.com/auth/drive.file']
            },
            'TWITCH': {
                # Set {domain-without-local}/account/twitch/authenticated to twitch redirect url
                'CLIENT_ID': os.getenv('TWITCH_CLIENT_ID') if os.getenv('TWITCH_CLIENT_ID') else None,
                'CLIENT_SECRET': os.getenv('TWITCH_CLIENT_SECRET') if os.getenv('TWITCH_CLIENT_SECRET') else None,
                'SCOPE': ['user:read:email', 'user:read:broadcast']
            },
            'DISCORD': {
                # Set {domain-without-local}/account/discord/authenticated to discord redirect url
                'CLIENT_ID': os.getenv('DISCORD_CLIENT_ID') if os.getenv('DISCORD_CLIENT_ID') else None,
                'CLIENT_SECRET': os.getenv('DISCORD_CLIENT_SECRET') if os.getenv('DISCORD_CLIENT_SECRET') else None,
                'SCOPE': ['identify', 'email', 'connections', 'guilds', 'guilds.join']
            }
        }
    }
  1. To create models run:

    python manage.py migrate
  2. If you are using multilanguage then to create language file run:

    python manage.py makemessages -i venv --all
  3. Visit the /accounts/ URL to access user account.

Notes:

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

dj_all_auth-0.1b6.tar.gz (396.4 kB view details)

Uploaded Source

Built Distribution

dj_all_auth-0.1b6-py3-none-any.whl (415.2 kB view details)

Uploaded Python 3

File details

Details for the file dj_all_auth-0.1b6.tar.gz.

File metadata

  • Download URL: dj_all_auth-0.1b6.tar.gz
  • Upload date:
  • Size: 396.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for dj_all_auth-0.1b6.tar.gz
Algorithm Hash digest
SHA256 b19ff09fd28c8f8979e2e6368009cc5c6fcc8d6ea3117c46a6f19dffc3ad6933
MD5 4c14c8561843691d8eeb2221582d2a69
BLAKE2b-256 e60dc0df79aff92c6d963ac4bf5f7d5a9ae5eaf71010b530026becae1a37f5be

See more details on using hashes here.

File details

Details for the file dj_all_auth-0.1b6-py3-none-any.whl.

File metadata

  • Download URL: dj_all_auth-0.1b6-py3-none-any.whl
  • Upload date:
  • Size: 415.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for dj_all_auth-0.1b6-py3-none-any.whl
Algorithm Hash digest
SHA256 80e87bfc713eed823904b24a9c8eb1c67b799c23fc9304b9f163b6cdad8e06dc
MD5 6444d3d481039b83ad33a0e67982b969
BLAKE2b-256 cf2d7fd5c8bf54ded9743c3e08b208dc60499c8bb3434244cf2a1a8d07e5781d

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page