feat: add custom authentication backend to support login with email or username
All checks were successful
Build and Push Docker Image / build (push) Successful in 28s

- Implemented `EmailOrUsernameBackend` to allow authentication via email or username
- Updated settings to include the new authentication backend
- Modified tests to cover email-based login scenarios
- Fixed user lookup logic in forms to handle case-insensitive email matching
This commit is contained in:
2026-04-21 18:09:52 +02:00
parent dab33a03a1
commit d0651274d6
4 changed files with 57 additions and 2 deletions

View File

@@ -192,6 +192,10 @@ INSTALLED_APPS = [
'users',
]
AUTHENTICATION_BACKENDS = [
"users.auth_backends.EmailOrUsernameBackend",
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',