GithubHelp home page GithubHelp logo

Comments (5)

omab avatar omab commented on September 26, 2024

Which framework? Do you have the requests details?

from python-social-auth.

omab avatar omab commented on September 26, 2024

@josseph, found the bug, will push a fix shortly.

from python-social-auth.

josseph avatar josseph commented on September 26, 2024

@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.

omab avatar omab commented on September 26, 2024

@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.

josseph avatar josseph commented on September 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.