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

Linkedin complete login step is stuck #535

Open
Mracobes9 opened this issue Dec 28, 2023 · 0 comments
Open

Linkedin complete login step is stuck #535

Mracobes9 opened this issue Dec 28, 2023 · 0 comments

Comments

@Mracobes9
Copy link

Expected behaviour

Complete login step must be done correctly

Actual behaviour

Complete login step is stuck

What are the steps to reproduce this issue?

Input clear steps to reproduce the issue for a maintainer.

  1. I setup my django app by this docs https://python-social-auth.readthedocs.io/en/latest/configuration/django.html
  2. I follow to /login/linkedin-openidconnect/ endpoint
  3. I has been rederected to linkedin login page
  4. I logged in linked in
  5. I has been redirect to /complete/linkedin-openidconnect/ and request is stucked
  6. After some time I received this exception '{"error":"invalid_request","error_description":"Unable to retrieve access token: appid/redirect uri/code verifier does not match authorization code. Or authorization code expired. Or external member binding exists"}'

Any logs, error output, etc?

Full traceback

Internal Server Error: /auth/social/complete/linkedin-openidconnect/
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/social_core/utils.py", line 253, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/social_core/backends/oauth.py", line 418, in auth_complete
    response = self.request_access_token(
  File "/usr/local/lib/python3.10/site-packages/social_core/backends/open_id_connect.py", line 253, in request_access_token
    response = self.get_json(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/social_core/backends/base.py", line 250, in get_json
    return self.request(url, *args, **kwargs).json()
  File "/usr/local/lib/python3.10/site-packages/social_core/backends/base.py", line 246, in request
    response.raise_for_status()
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://www.linkedin.com/oauth/v2/accessToken

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/decorators/cache.py", line 62, in _wrapper_view_func
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/social_django/utils.py", line 49, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/social_django/views.py", line 31, in complete
    return do_complete(
  File "/usr/local/lib/python3.10/site-packages/social_core/actions.py", line 49, in do_complete
    user = backend.complete(user=user, redirect_name=redirect_name, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/social_core/backends/base.py", line 39, in complete
    return self.auth_complete(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/social_core/utils.py", line 256, in wrapper
    raise AuthCanceled(args[0], response=err.response)
social_core.exceptions.AuthCanceled: Authentication process canceled
[28/Dec/2023 16:41:46] "GET /auth/social/complete/linkedin-openidconnect/?code=AQSlTdADwq3Ao0uqzzLuKa2NyZOE-Trsf7H6U3MNCX4Zc-RZGi81ZfHUocILxmW90S0faMa0RqNeION_J6kzH939o8yXMVN-Q1vnHfA8glsR_r4SH1Etk3L7hLDPSlrO1kLSYkc-1hupoClEBsvtL1FHa6IQ04Da7xOn_bEm65iX52FNKjgZQzHG4-MXJrKVztxFDMyWqHLv26BnVXk&state=XAd3stVVIhyhDssYFgqGjnRpyive4WAc HTTP/1.1" 500 124012

Any other comments?

Expand the issue with any details you find appropriate to solve or reproduce it.

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

No branches or pull requests

1 participant