Исключение Значение: объект 'tuple' не имеет атрибута 'backend'
Также я получил эту ошибку 'tuple' object has no attribute
'backend', когда я делаю @login_required(login_url = "/oauth2/login")
Но когда я просто перехожу на /oauth2/login
все работает нормально.
Traceback (most recent call last):
File "/home/gluko/discord/GhostSide/GhostSideenv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/home/gluko/discord/GhostSide/GhostSideenv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/gluko/discord/GhostSide/apps/oauth2/views.py", line 55, in discord_login_redirect
discord_user = authenticate(request, user = user)
File "/home/gluko/discord/GhostSide/GhostSideenv/lib/python3.10/site-packages/django/views/decorators/debug.py", line 42, in sensitive_variables_wrapper
return func(*func_args, **func_kwargs)
File "/home/gluko/discord/GhostSide/GhostSideenv/lib/python3.10/site-packages/django/contrib/auth/__init__.py", line 85, in authenticate
user.backend = backend_path
Exception Type: AttributeError at /oauth2/login/redirect
Exception Value: 'tuple' object has no attribute 'backend'