Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook login fails with KeyError: 'access_token' #1094

Closed
ajoyoommen opened this issue Mar 30, 2017 · 5 comments
Closed

Facebook login fails with KeyError: 'access_token' #1094

ajoyoommen opened this issue Mar 30, 2017 · 5 comments

Comments

@ajoyoommen
Copy link
Contributor

This is the stack trace:

Internal Server Error: /complete/facebook/
Traceback (most recent call last):
  File "/home/ec2-user/project/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/ec2-user/project/venv/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/ec2-user/project/venv/local/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 52, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/home/ec2-user/project/venv/local/lib/python2.7/site-packages/social/apps/django_app/views.py", line 20, in complete
    redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
  File "/home/ec2-user/project/venv/local/lib/python2.7/site-packages/social/actions.py", line 43, in do_complete
    user = backend.complete(user=user, *args, **kwargs)
  File "/home/ec2-user/project/venv/local/lib/python2.7/site-packages/social/backends/base.py", line 40, in complete
    return self.auth_complete(*args, **kwargs)
  File "/home/ec2-user/project/venv/local/lib/python2.7/site-packages/social/backends/facebook.py", line 71, in auth_complete
    access_token = response['access_token']
KeyError: 'access_token'
  • Python social auth: 0.2.1

  • Facebook app: v2.2

  • Since: March 28, 2017 (as v2.2 was deprecated on March 27). Updated the Facebook App to latest, but the error persists.

@nony05
Copy link

nony05 commented Mar 30, 2017

+1

1 similar comment
@sametersan
Copy link

+1

@scottlinux
Copy link

Does the latest python-social-auth work? (0.3.6)

@scottlinux
Copy link

Try python-social-auth==0.2.21

@ajoyoommen
Copy link
Contributor Author

I was unable to upgrade to latest. However, upgrading to 0.2.19 worked and also solved this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants