[Answer]-Anonymous User Error Edit

1👍

basically you are calling

self.login(request, user)

without calling

authenticate(username=user, password=pwd)

first

when you call authenticate, django sets the backend attribute on the user, noting which backend to use, see here for more details https://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.authenticate

Leave a comment