NOTE: I could not reproduce this issue. It only happened the first time I logged on, so it may be a fluke? However, it's reproducible on local!
Traceback:
File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in login
111. backend = backend or user.backend
File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/functional.py" in inner
214. return func(self._wrapped, *args)
During handling of the above exception ('AnonymousUser' object has no attribute 'backend'), another exception occurred:
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/codedoor/views/profiles.py" in finishprofile
87. auth_login(request, user)
File "/app/.heroku/python/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in login
118. 'You have multiple authentication backends configured and '
Exception Type: ValueError at /codedoor/finishprofile/
Exception Value: You have multiple authentication backends configured and therefore must provide the `backend` argument or set the `backend` attribute on the user.```
NOTE: I could not reproduce this issue. It only happened the first time I logged on, so it may be a fluke? However, it's reproducible on local!
Steps I took:
How I resolved it: