diff --git a/api/base/authentication/backends.py b/api/base/authentication/backends.py index 68954988658..b2766b094a7 100644 --- a/api/base/authentication/backends.py +++ b/api/base/authentication/backends.py @@ -2,10 +2,11 @@ from framework.auth.core import get_user from django.contrib.auth.backends import ModelBackend -# https://docs.djangoproject.com/en/1.8/topics/auth/customizing/ + +# https://docs.djangoproject.com/en/3.2/topics/auth/customizing/ class ODMBackend(ModelBackend): - def authenticate(self, username=None, password=None): + def authenticate(self, request, username=None, password=None, **kwargs): return get_user(email=username, password=password) or None def get_user(self, user_id):