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

Fix linkedin auth considering new apis #2030

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisWayFor
Copy link

No description provided.

@XWB
Copy link
Member

XWB commented Dec 31, 2024

LinkedinResourceOwnerTest needs to be fixed.

@Khodl
Copy link

Khodl commented Feb 12, 2025

Any idea how I can contribute to this MR?

How do we ensure that existing "old" apps still work when changing that? Linkedin does not provide the same scopes depending on which kind of app it is:

  • New app:
    Screenshot 2025-02-12 at 09 20 12
  • Old app:
    Screenshot 2025-02-12 at 09 20 26

@Khodl
Copy link

Khodl commented Feb 12, 2025

In the meantime, we can use the oAuth2 provider:

I did not manage to make it work all the time: I get a REVOKED_ACCESS_TOKEN most of the time, but sometimes it goes through. Definitely strange.

        linkedin:
            type: oauth2
            class: \HWI\Bundle\OAuthBundle\OAuth\ResourceOwner\OAuth2ResourceOwner
            client_id: '%env(LINKEDIN_CLIENT_ID)%'
            client_secret: '%env(LINKEDIN_CLIENT_SECRET)%'
            access_token_url: "https://www.linkedin.com/oauth/v2/accessToken"
            authorization_url: "https://www.linkedin.com/oauth/v2/authorization"
            infos_url: "https://api.linkedin.com/v2/userinfo"

            scope: openid profile email
            user_response_class: HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse
            paths:
                identifier: sub
                nickname: given_name
                realname: name

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

Successfully merging this pull request may close these issues.

3 participants