Comments (5)
Which framework? Do you have the requests details?
from python-social-auth.
@josseph, found the bug, will push a fix shortly.
from python-social-auth.
@omab Authenticated successfully now. But the page was not redirected to http://test.com/done from http://test.com/complete/douban-oauth2/?code=fa07be221b26a9f4&state=9sZWB5FErO0Ufbk2R4FTM2LNrQYQ3Uuf
The page keep staying on http://www.gkkgo.com/complete/douban-oauth2/?code=fa07be221b26a9f4&state=9sZWB5FErO0Ufbk2R4FTM2LNrQYQ3Uuf,
and the exception thrown like before.
AuthCanceled at /complete/douban-oauth2/
Authentication process canceled
I used the sample code for Django. Here is the stack trace.
Environment:
Request Method: GET
Request URL: http://test.com/complete/douban-oauth2/?code=fa07be221b26a9f4&state=9sZWB5FErO0Ufbk2R4FTM2LNrQYQ3Uuf
Django Version: 1.5
Python Version: 2.7.5
Installed Applications:
('django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'social.apps.django_app.default',
'test.app')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/Library/Python/2.7/site-packages/Django-1.5-py2.7.egg/django/core/handlers/base.py" in get_response
115. response = callback(request, *callback_args, **callback_kwargs)
File "/Library/Python/2.7/site-packages/Django-1.5-py2.7.egg/django/views/decorators/csrf.py" in wrapped_view
77. return view_func(*args, **kwargs)
File "/Library/Python/2.7/site-packages/social/apps/django_app/utils.py" in wrapper
32. return func(request, backend, *args, **kwargs)
File "/Library/Python/2.7/site-packages/social/apps/django_app/views.py" in complete
25. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
File "/Library/Python/2.7/site-packages/social/actions.py" in do_complete
54. *args, **kwargs)
File "/Library/Python/2.7/site-packages/social/strategies/base.py" in complete
62. return self.backend.auth_complete(*args, **kwargs)
File "/Library/Python/2.7/site-packages/social/backends/oauth.py" in auth_complete
330. raise AuthCanceled(self)
Exception Type: AuthCanceled at /complete/douban-oauth2/
Exception Value: Authentication process canceled
from python-social-auth.
@josseph, I don't get it, success or not? From your traceback it looks like the same issue from the beginning. How did you install python-social-auth?
from python-social-auth.
@omab, I installed it with pip. I manually merged your fix to my environment to make sure the fix in. The change after the fix is when I manually switch to http://test.com/done , the connect status for douban is marked as "connected". If not include this fix, no "connected" status marked for douban in http://test.com/done.
from python-social-auth.
Related Issues (20)
- cannot import name 'OpenIdConnectAssociation' HOT 1
- Too bad, casually abandoned HOT 2
- Issue with redirecting page after login using Facebbok for django site
- Support for tokens / secrets in database HOT 1
- VK now demands API version
- python-social-auth - FB login issue HOT 3
- Backend AzureADB2COAuth2 requires 'SOCIAL_AUTH_AZUREAD_B2C_OAUTH2_POLICY' but there is no documentation about this anywhere HOT 2
- 401 Client Error: Authorization Required for url: https://api.twitter.com/oauth/request_token
- 401 Client Error: Authorization Required for url: https://api.twitter.com/oauth/request_token
- 401 Client Error: Authorization Required for url: https://api.twitter.com/oauth/request_token
- Allow exception handling during DEBUG mode
- Facebook login popup from Angular + JWT + DRF
- django.db.migrations.exceptions.NodeNotFoundError: Migration listings.0001_initial dependencies reference nonexistent parent node ('owners', '0001_initial')
- base64.encodestring was deprecated and removed in Python 3.9 . Use encodebytes instead.
- auth
- Is there any example/documentation for IDP initiated SSO in SAML backend? HOT 1
- Better document how the partial pipeline should be handeled HOT 1
- Регистрация через соц сети
- GoogleOpenId is not defined in https://github.com/python-social-auth/social-core/blob/4.5.0/social_core/backends/google.py
- linkedin openid complete endpoint request is stuck
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-social-auth.