Hey Rafal,
I am using the Misago as my backend to support forum. I recently trying to using the github login. I can locally setup the Github oauth with no error(with github callback to localhost:8000) But when I test it with remote server in AWS. It complains with NoneType
object has no attribute provider
error.
here is the detailed log:
backend_1 | Internal Server Error: /complete/github/
backend_1 | Traceback (most recent call last):
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
backend_1 | response = get_response(request)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
backend_1 | response = self.process_exception_by_middleware(e, request)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
backend_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
backend_1 | response = view_func(request, *args, **kwargs)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
backend_1 | return view_func(*args, **kwargs)
backend_1 | File "/srv/misago/misago/socialauth/views.py", line 35, in social_auth_view_wrapper
backend_1 | return f(request, backend, *args, **kwargs)
backend_1 | File "/srv/misago/misago/socialauth/views.py", line 57, in complete
backend_1 | **kwargs
backend_1 | File "/usr/local/lib/python3.7/site-packages/social_core/actions.py", line 73, in do_complete
backend_1 | social_user.provider)
backend_1 | AttributeError: 'NoneType' object has no attribute 'provider'
backend_1 | Internal Server Error: /complete/github/
backend_1 | Traceback (most recent call last):
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
backend_1 | response = get_response(request)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
backend_1 | response = self.process_exception_by_middleware(e, request)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
backend_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
backend_1 | response = view_func(request, *args, **kwargs)
backend_1 | File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
backend_1 | return view_func(*args, **kwargs)
backend_1 | File "/srv/misago/misago/socialauth/views.py", line 35, in social_auth_view_wrapper
backend_1 | return f(request, backend, *args, **kwargs)
backend_1 | File "/srv/misago/misago/socialauth/views.py", line 57, in complete
backend_1 | **kwargs
backend_1 | File "/usr/local/lib/python3.7/site-packages/social_core/actions.py", line 73, in do_complete
backend_1 | social_user.provider)
backend_1 | AttributeError: 'NoneType' object has no attribute 'provider'
backend_1 | [25/Jul/2021 03:39:21] "POST /complete/github/ HTTP/1.1" 500 21345
I did some research with github.com/python-social-auth/social-app-django/issues/284 and github.com/omab/python-social-auth/issues/989 but doesn't work.
Do you have this issue before?
Thanks in advance.