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

OAuth login error #25

Open
wetneb opened this issue Jun 11, 2019 · 3 comments
Open

OAuth login error #25

wetneb opened this issue Jun 11, 2019 · 3 comments

Comments

@wetneb
Copy link
Member

wetneb commented Jun 11, 2019

When logging in via OAuth, the user can get a 500 error. We get this in the logs:

Internal Server Error: /editgroups/oauth/complete/mediawiki/
Traceback (most recent call last):
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/social_django/utils.py", line 49, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/social_django/views.py", line 33, in complete
    *args, **kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/social_core/actions.py", line 43, in do_complete
    user = backend.complete(user=user, *args, **kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/social_core/backends/base.py", line 40, in complete
    return self.auth_complete(*args, **kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/social_core/utils.py", line 251, in wrapper
    return func(*args, **kwargs)
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/social_core/backends/oauth.py", line 182, in auth_complete
    token = self.get_unauthorized_token()
  File "/data/project/editgroups/www/python/venv/lib/python3.5/site-packages/social_core/backends/oauth.py", line 201, in get_unauthorized_token
    raise AuthTokenError(self, 'Missing unauthorized token')
social_core.exceptions.AuthTokenError: Token error: Missing unauthorized token

@wetneb
Copy link
Member Author

wetneb commented Jun 11, 2019

Potentially related to: omab/django-social-auth#634

@wetneb
Copy link
Member Author

wetneb commented Jun 12, 2019

Apparently this is actually due to "Containers" which block cookies set from Wikidata to passing over to tools.wmflabs.org. We should display a more informative error message in that case.

@trnstlntk
Copy link

I think I've encountered the same issue on the Wikimedia Commons version of EditGroups, while trying to log in to undo this batch: https://editgroups-commons.toolforge.org/b/OR/c6f589e1442/

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

2 participants