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
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:
@@ -192,6 +192,10 @@ INSTALLED_APPS = [
|
||||
'users',
|
||||
]
|
||||
|
||||
AUTHENTICATION_BACKENDS = [
|
||||
"users.auth_backends.EmailOrUsernameBackend",
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
|
||||
Reference in New Issue
Block a user