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

The url used by the GoogleOpenId backend seems to be deprecated #472

Closed
JoseKilo opened this issue Jun 4, 2020 · 1 comment · Fixed by #515
Closed

The url used by the GoogleOpenId backend seems to be deprecated #472

JoseKilo opened this issue Jun 4, 2020 · 1 comment · Fixed by #515
Labels
stale Stale issues (closing soon)

Comments

@JoseKilo
Copy link

JoseKilo commented Jun 4, 2020

The url used by the GoogleOpenId backend seems to be deprecated:
https://github.com/python-social-auth/social-core/blob/master/social_core/backends/google.py#L176

If you try to access https://www.google.com/accounts/o8/id a 404 is returned.

Expected behaviour

Probably GoogleOpenId needs to be removed and the docs updated.

Actual behaviour

An error is returned when this backend is used.

What are the steps to reproduce this issue?

  1. Configure a project with:
AUTHENTICATION_BACKENDS = (
    ...
    'social_core.backends.google.GoogleOpenId',
    ...
)
  1. Try to access http://127.0.0.1:8000/auth/login/google/
  2. A 500 response is returned.

Any logs, error output, etc?

The stack trace of the error:

Traceback (most recent call last):
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/social_django/utils.py", line 49, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/social_django/views.py", line 23, in auth
    return do_auth(request.backend, redirect_name=REDIRECT_FIELD_NAME)
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/social_core/actions.py", line 29, in do_auth
    return backend.start()
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/social_core/backends/base.py", line 34, in start
    if self.uses_redirect():
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/social_core/backends/open_id.py", line 242, in uses_redirect
    return self.openid_request().shouldSendRedirect()
  File "/home/jose/workspace/project/.venv/lib/python3.8/site-packages/social_core/backends/open_id.py", line 249, in openid_request
    return self.consumer().begin(url_add_parameters(self.openid_url(),
social_core.exceptions.AuthException: OpenID discovery error: HTTP Response status from identity URL host is not 200. Got status 404
[04/Jun/2020 14:18:14] "GET /auth/login/google/ HTTP/1.1" 500 123261

Any other comments?

It looks like the recommended approach is to use "OpenID Connect" instead of the old endpoint, which is what social_core.backends.google_openidconnect.GoogleOpenIdConnect does.

Related open issue in the docs repo: python-social-auth/social-docs#65

@stale
Copy link

stale bot commented Aug 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issues (closing soon) label Aug 3, 2020
@stale stale bot closed this as completed Aug 10, 2020
andersk added a commit to andersk/social-core that referenced this issue Oct 24, 2020
It was discontinued on the server side in 2015, in favor of OpenID
Connect (our GoogleOpenIdConnect backend).

https://support.google.com/accounts/answer/6206245

Fixes python-social-auth#462, python-social-auth#472.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
andersk added a commit to andersk/social-core that referenced this issue Oct 24, 2020
It was discontinued on the server side in 2015, in favor of OpenID
Connect (our GoogleOpenIdConnect backend).

https://support.google.com/accounts/answer/6206245

Fixes python-social-auth#462. Fixes python-social-auth#472.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
omab pushed a commit that referenced this issue Jan 9, 2021
It was discontinued on the server side in 2015, in favor of OpenID
Connect (our GoogleOpenIdConnect backend).

https://support.google.com/accounts/answer/6206245

Fixes #462. Fixes #472.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
omab pushed a commit that referenced this issue Jan 9, 2021
It was discontinued on the server side in 2015, in favor of OpenID
Connect (our GoogleOpenIdConnect backend).

https://support.google.com/accounts/answer/6206245

Fixes #462. Fixes #472.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues (closing soon)
Development

Successfully merging a pull request may close this issue.

1 participant