Hi, I am trying to integrate python-social-auth into my application. I meet some problems when enable weibo backend.
The configurations like below.
1.
AUTHENTICATION_BACKENDS = (
'social.backends.weibo.WeiboOAuth2',
'django.contrib.auth.backends.ModelBackend',
)
SOCIAL_AUTH_WEIBO_KEY = '*****' // repalce the confidential key with star
SOCIAL_AUTH_WEIBO_SECRET = '***' // remove the confidential secret with star
- use the Django example to run the social authentication.
After I enter my weibo account and click on login, the authentication failed at the step of http://test.com/complete/weibo/?state=A5aliysJJjDpLyPLdxjVZQirhPaPkAHs&code=9ea8dc11dba1b494415ad82d2b48e804
Some exceptions thrown:
HTTPError at /complete/weibo/
405 Client Error: Method Not Allowed
Stacktrace:
/Library/Python/2.7/site-packages/social/apps/django_app/utils.py in wrapper
return func(request, backend, *args, **kwargs) ...
▶ Local vars
/Library/Python/2.7/site-packages/social/apps/django_app/views.py in complete
redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs) ...
▶ Local vars
/Library/Python/2.7/site-packages/social/actions.py in do_complete
*args, **kwargs) ...
▶ Local vars
/Library/Python/2.7/site-packages/social/strategies/base.py in complete
return self.backend.auth_complete(*args, **kwargs) ...
▶ Local vars
/Library/Python/2.7/site-packages/social/backends/oauth.py in auth_complete
method=self.ACCESS_TOKEN_METHOD ...
▶ Local vars
/Library/Python/2.7/site-packages/social/backends/oauth.py in request_access_token
return self.get_json(*args, **kwargs) ...
▶ Local vars
/Library/Python/2.7/site-packages/social/backends/base.py in get_json
return self.request(url, *args, **kwargs).json() ...
▶ Local vars
/Library/Python/2.7/site-packages/social/backends/base.py in request
response.raise_for_status() ...
▶ Local vars
/Library/Python/2.7/site-packages/requests/models.py in raise_for_status
Could you help to trouble shooting this issue? Thanks.
Joseph
Hi, I am trying to integrate python-social-auth into my application. I meet some problems when enable weibo backend.
The configurations like below.
1.
After I enter my weibo account and click on login, the authentication failed at the step of http://test.com/complete/weibo/?state=A5aliysJJjDpLyPLdxjVZQirhPaPkAHs&code=9ea8dc11dba1b494415ad82d2b48e804
Some exceptions thrown:
Stacktrace:
Could you help to trouble shooting this issue? Thanks.
Joseph