python-social-auth: How to solve Authentication process canceled error?

Now I try to setup python-social-app

In facebook login after the username/password redirect to error page I don’t know why this happen…

In my setting I have ‘social.backends.facebook.FacebookOAuth2’ and I correctly set SOCIAL_AUTH_FACEBOOK_KEY and Secret so Really where to look the error.?

The thing is i didn’t cancel anything …!

Request Method: GET
Request URL: http://website.com:8000/complete/facebook/?redirect_state=IuQDEiyX2bbS8Uhk7MR3hpRFLNZlW2Y5&code=AQDH5kqBibfy9bi21M9tTieujRAqvJVYdAb2UPFvfH6DVXoCWrrtamRA99Ze5-6cC6qHPiNq-a3XbGh2Gg4pbdFfM4OTpCEpWkPID6SZrHfAoEan8Q68cV17LDgsryX_M45QoXd0knpbE0x-QwAPwdoFmKQGHLw7xomCHeN5pCtrWhtoYQIrsFE1UQZZaxt4qtLzAmfmCRjDO7Et_S75fngLiomM0PfevTChLbHJHMYaqy6DBkgGZqZK-bXrqLaNFnBEoZ3M956DwCg4ZtTnvxulR4sXH9ZV3IoxVhL0JxMVsGnT2H_0wdKujIDPKcdPKZc&state=IuQDEiyX2bbS8Uhk7MR3hpRFLNZlW2Y5

Django Version: 1.8.3
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'frontend',
 'social.apps.django_app.default')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')


Traceback:
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/social/apps/django_app/utils.py" in wrapper
  51.             return func(request, backend, *args, **kwargs)
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/social/apps/django_app/views.py" in complete
  28.                        redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/social/actions.py" in do_complete
  43.         user = backend.complete(user=user, *args, **kwargs)
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/social/backends/base.py" in complete
  41.         return self.auth_complete(*args, **kwargs)
File "/Users/simon/Freelancer/env/lib/python2.7/site-packages/social/utils.py" in wrapper
  232.                 raise AuthCanceled(args[0])

Exception Type: AuthCanceled at /complete/facebook/
Exception Value: Authentication process canceled

Asked similer question in StackOverFlow too How to solve Authentication process canceled error?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

Detected in 2015, This bug still exists in version available on April, 2018. v 0.3.6

I finally just solved this. I am not 100% sure what I did to fix but these were some of the things I did.

  1. I deleted the faebook app and created a new one.
  2. When I was putting the new SOCIAL_AUTH_FACEBOOK_SECRET in settings. I noticed the old one had a the string “reset” at the end of the string. This is what the old secret looked like: ‘d9e316e4c67d5a45198cf58ecb0efc10Reset’ The new one just has the String. I am thinking that there may be an issue with the facebook website the way it was copied in the first place? I obviously never added the Reset string there.
  3. For the redirect URLs I added /complete/facebook/ since that’s the URL that the framework redirects you to before the user then gets redirected to SOCIAL_AUTH_LOGIN_REDIRECT_URL

I am guessing it was either 2 or 3 that fixed. Probably the 3rd one.

Yep changing the redirect URL solved it for me too.

Well. i saw this stackoverflowquestion and it worked for me too strange i had the right ip of the server but for some reason it did not work when i leave the server ip white list empty it works great