Skip to content

OAuth login error #25

Open
Open

Description

@wetneb

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

Activity

  1. wetneb commented on Jun 11, 2019

    @wetneb
    MemberAuthor

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

  2. wetneb commented on Jun 12, 2019

    @wetneb
    MemberAuthor

    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.

  3. trnstlntk commented on Feb 22, 2022

    @trnstlntk

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions