SomeAuth
A Python package based on Django Allauth, simplified to bypass repetitive setup. Comes with pre-styled Tailwind templates for quick integration of authentication and social login.
Features
- Email/password authentication.
- Password Reset.
- Email notifications.
- Optional social login (Google, GitHub, Discord, etc.).
- Pre-styled forms using Tailwind CSS with DaisyUI.
- Minimal configuration required.
- Supports template overrides for full customization.
- All Allauth views
Installation
pip install django-someauth
Add to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
# Django default apps
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites', # required
# SomeAuth
'someauth',
# Tailwind (optional)
'tailwind',
'theme',
# Allauth
'allauth',
'allauth.account',
'allauth.socialaccount',
# Social providers (only include the ones enabled in SOMEAUTH)
'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.github',
]
Set SITE_ID:
SITE_ID = 1
SomeAuth Configuration
SOMEAUTH = {
"USE_SOCIAL": True, # Set False to disable social login
"ENABLED_PROVIDERS": ["google", "github"], # Must match provider apps in INSTALLED_APPS
"PROVIDERS": {
"google": {
"client_id": "<your-google-client-id>",
"secret": "<your-google-secret>",
},
"github": {
"client_id": "<your-github-client-id>",
"secret": "<your-github-secret>",
},
}
}
Optional Allauth Settings (Inherited Defaults)
SomeAuth sets sensible defaults for most Allauth settings. You can override them if needed:
MIDDLEWARE = [
# default Django middleware
'allauth.account.middleware.AccountMiddleware',
]
AUTHENTICATION_BACKENDS = [
"django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
]
LOGIN_REDIRECT_URL = "/"
ACCOUNT_LOGOUT_REDIRECT_URL = "/"
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_EMAIL_VERIFICATION = "optional" # or 'mandatory'
SOCIALACCOUNT_AUTO_SIGNUP = True
SOCIALACCOUNT_LOGIN_ON_GET = True
ACCOUNT_FORMS = {
'login': 'someauth.forms.CustomLoginForm',
'signup': 'someauth.forms.CustomSignupForm',
}
SOCIALACCOUNT_ADAPTER = 'someauth.adapters.MySocialAccountAdapter'
ACCOUNT_ADAPTER = 'someauth.adapters.CustomAccountAdapter'
⚠️ Override only when necessary; changing some of these may break SomeAuth behavior.
Email Configuration
SomeAuth supports email notifications. Configure email in settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 465
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True
EMAIL_HOST_USER = 'youraddress@email.com'
EMAIL_HOST_PASSWORD = 'emailpassword'
DEFAULT_FROM_EMAIL = 'youraddress@email.com' # Should match EMAIL_HOST_USER
Template Overrides
To customize the look, create template files matching those in SomeAuth (someauth/templates/someauth/...). Django will automatically use your custom templates instead.
First Steps
URLs
Add SomeAuth URLs to your urls.py:
from django.urls import path, include
urlpatterns = [
path('accounts/', include('someauth.urls')), # handles login, logout, signup, social auth
]
Customization
- Override templates in
templates/someauth/... - Override forms via
ACCOUNT_FORMSinsettings.py - Override adapters via
SOCIALACCOUNT_ADAPTERorACCOUNT_ADAPTER
With this setup, your project is fully ready for email/password authentication and optional social login without extra boilerplate.
Metadata
Release files for django-someauth 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_someauth-0.1.0.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_someauth-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.3 kB
Release files / django_someauth-0.1.0.tar.gz
| Download URL | django_someauth-0.1.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6e3a5c2fc6793abcc72b22dc53069dca26834609ba92f2738ffd38576669484
|
|
BLAKE2b-256 checksum How to use checksums |
29b920514251b42ca77127139fc448d6071c330b6065cec0b9275edfdfd052ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / django_someauth-0.1.0-py3-none-any.whl
| Download URL | django_someauth-0.1.0-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a746241b51b191eb8b5e9f2272373c24d3194e7ee2bbae37f015431484f57c6a
|
|
BLAKE2b-256 checksum How to use checksums |
93f43fe6e464d9288ca5acb065938493bbaf8affbb895f86f6945a965f7a3b5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|