From 8f1c60a44045b2b82f122b3a07822772ee08816c Mon Sep 17 00:00:00 2001 From: Sean Morley <98704938+seanmorley15@users.noreply.github.com> Date: Sat, 31 May 2025 21:08:09 -0400 Subject: [PATCH] Update backend/server/users/backends.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- backend/server/users/backends.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/server/users/backends.py b/backend/server/users/backends.py index e71f7dc..8c985ce 100644 --- a/backend/server/users/backends.py +++ b/backend/server/users/backends.py @@ -16,7 +16,9 @@ class NoPasswordAuthBackend(ModelBackend): has_social_accounts = SocialAccount.objects.filter(user=allauth_user).exists() if has_social_accounts and getattr(allauth_user, 'disable_password', False): return None - return allauth_user + if self.user_can_authenticate(allauth_user): + return allauth_user + return None # Fallback to regular username/password authentication if username is None or password is None: