AttributeError: 'NoneType' object has no attribute 'provider'
See original GitHub issueWhen I try to signup via the social app(Twitter, Linkedin, etc. ) I got an error:
AttributeError at /oauth/complete/linkedin-oauth2/ 'NoneType' object has no attribute 'provider'
AttributeError at /oauth/complete/twitter/ 'NoneType' object has no attribute 'provider'
AUTHENTICATION_BACKENDS = (
'social_core.backends.facebook.FacebookOAuth2',
'social_core.backends.twitter.TwitterOAuth',
'social_core.backends.linkedin.LinkedinOAuth2',
'social_core.backends.google.GoogleOAuth2',
'social_core.backends.patreon.PatreonOAuth2',
'accounts.backends.EmailModelBackend',
'accounts.backends.CaseInsensitiveModelBackend',
'django.contrib.auth.backends.ModelBackend',
)
SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.user.get_username',
'social_core.pipeline.social_auth.associate_by_email',
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'accounts.helpers.social_pipeline.set_user_group',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
)
Traceback (most recent call last):
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 63, in callback
return old_callback(*args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 63, in callback
return old_callback(*args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/social_django/utils.py", line 49, in wrapper
return func(request, backend, *args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/social_django/views.py", line 31, in complete
return do_complete(request.backend, _do_login, user=request.user,
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/social_core/actions.py", line 73, in do_complete
social_user.provider)
AttributeError: 'NoneType' object has no attribute 'provider'
ERROR log Internal Server Error: /oauth/complete/linkedin-oauth2/
Traceback (most recent call last):
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 63, in callback
return old_callback(*args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/sentry_sdk/integrations/django/views.py", line 63, in callback
return old_callback(*args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/social_django/utils.py", line 49, in wrapper
return func(request, backend, *args, **kwargs)
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/social_django/views.py", line 31, in complete
return do_complete(request.backend, _do_login, user=request.user,
File "/Users/whs/.local/share/virtualenvs/wh/lib/python3.8/site-packages/social_core/actions.py", line 73, in do_complete
social_user.provider)
Issue Analytics
- State:
- Created 3 years ago
- Comments:14
Top Results From Across the Web
Why do I get AttributeError: 'NoneType' object has no attribute ...
NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None .
Read more >[Solved] AttributeError: Nonetype Object Has No Attribute Group
In this article we will discuss AttributeError:Nonetype object has no Attribute Group. We will understand it and then find solution for it.
Read more >AttributeError: 'NoneType' object has no attribute 'call' on ...
AttributeError : 'NoneType' object has no attribute 'call' on sync_portal ... Hello, I'm at a loss to explain why this flow fails and...
Read more >Django Social Auth - Google: AttributeError: 'NoneType' object ...
Coding example for the question Django Social Auth - Google: AttributeError: 'NoneType' object has no attribute 'provider'-django.
Read more >18/18 AttributeError: 'NoneType' object has no attribute 'append'
18/18 AttributeError: 'NoneType' object has no attribute 'append'. n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]] def flatten(lists): results =...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@balajeeraman Yes the versions is mismatched, So I have updated it. Thank you
@krastykovyaz I have update the following plugins with specified version and issue was fixed for me pip install social-auth-app-django==4.0.0 pip install social-auth-core==3.3.3
Is there a solution for this? I’m still facing the issue. I’m using google-auth 1.11.0 and django 3.0.5