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.
Demo Images:
Login/Signup Page
Quick start
Install it by:
https://pypi.org/project/dj-all-auth/ pip install dj-all-auth
Add “dj_all_auth” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ..., 'dj_all_auth', ]
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, and use that url to url path. path('accounts/', include('dj_all_auth.urls')),
Add context processor to settings.py:
'dj_all_auth.context_processors.__config'
Add dj_all_auth settings to settings.py:
DJ_ALL_AUTH = { # static path of logo image 'LOGO': None, 'CONNECTIONS': { # name of the url that will be used once OAuth is completed 'REDIRECT_URI_NAME': None, 'GOOGLE': { # Set {domain-with-above-url-without-locale (en/gb)}/accounts/google/authenticated to google redirect url in google developer console '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-with-above-url-without-locale (en/gb)}/account/twitch/authenticated to twitch redirect url in twitch developer console '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': ['openid', 'user:read:email', 'user:read:broadcast'] }, 'DISCORD': { # Set {domain-with-above-url-without-locale (en/gb)}/account/discord/authenticated to discord redirect url in discord developer console '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'] } } }
To create migrations run:
python manage.py migrate
If you are using multilanguage then to create language file run:
python manage.py makemessages --all -i venv
Visit the /accounts/ URL to access user account.
To create multilanguage url you need to have locale/<language-code> directory, then run:
python manage.py makemessages --all -i venv # then make your changes in your local file then run python manage.py compilemessages
Notes:
These are additional packages used for UI stability - You can find them on my profile.
static/notify :: Ref: https://github.com/deviserops/notify
static/justify :: Ref: https://github.com/deviserops/justify
static/images :: All static images are present in this dir, replace them as required (Must be same name and type.)
Test, Build and upload.
python -m build
pip install –user django-all-auth/dist/path_to.tar.gz To run on local
twine upload dist/* –verbose
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 dj_all_auth-0.1b12.tar.gz
.
File metadata
- Download URL: dj_all_auth-0.1b12.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be79b37dbc9223605b5141ab85e36cc7317d9bbef22c102121c750cded8cca65 |
|
MD5 | 0eca43c13afd06c71c1bc43dad06e228 |
|
BLAKE2b-256 | 780a796b198e78b0ef59b9f8ebd22e82c7fe4de3d08e0ac7f74ba6b7cf4fcd86 |
File details
Details for the file dj_all_auth-0.1b12-py3-none-any.whl
.
File metadata
- Download URL: dj_all_auth-0.1b12-py3-none-any.whl
- Upload date:
- Size: 409.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c411b00bddf2ac0ef188177e1f54e603735af076d7334609cc0ca7ae42e8e596 |
|
MD5 | 398281393e5aabbc13b3101c87cf0d63 |
|
BLAKE2b-256 | 91493d23ae1f814c57c4f30b7d619fb76bd019c13fe0ef392ab1acd39b76c16e |