Reputation: 109
when I use the above url I am getting "Bummer, something went wrong. We're having difficulty connecting."
Upvotes: 8
Views: 22673
Reputation: 3
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=${process.env.REACT_APP_LinkedInClientID}&redirect_uri=${process.env.REACT_APP_MY_URL}/linkcheck&state=foobar&scope=profile%20email
Changing scope name to 'profile' and 'email' worked for me
Upvotes: 0
Reputation: 495
scope parameters format are changed from:
scope=liteprofile%20emailaddress%20w_member_social
to
scope=openid+profile+w_member_social+email
unfortunately, LinkedIn did not mention this in developer API documentation. this is the correct request sample:
https://www.linkedin.com/oauth/v2/authorization?
response_type=code&
client_id=client_id&
redirect_uri=redirect&
state=foobar&
scope=openid+profile+w_member_social+email
Upvotes: 4
Reputation: 859
LinkedIn has deprecated that old authentication, now you need to use the OpenID connect product, for that you need to use linkedin-openid in the route instead of linkedin:
From: http://localhost:8000/linkedin/callback
To: http://localhost:8000/linkedin-openid/callback
also don't forget to request access for "Sign In with LinkedIn using OpenID Connect" product
Upvotes: 1
Reputation: 659
You need to add the "Sign In with LinkedIn" permission.
Upvotes: 17
Reputation: 1379
The best is to inspect how is the link generated by linkedin developer tool for you and then you just have to change the redirect url
https://www.linkedin.com/developers/tools/oauth
then "create token" then select all permission and click on "Request access token" if you have the development window open you can see a query authorisation is done, then you can just copy this url and change the redirect_url.
]1
Upvotes: 2
Reputation: 27
I ran into same issue.
Changing value of redirect_uri
in linkedin app from http
to https
helped solved the issue. See picture below:
In your case, url should have been:
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=test&redirect_uri=https://test.custom.com/abc/linkedin&state=DCEeFWf45A53sdfKef424asgTyhgTR5 ;
Upvotes: -1
Reputation: 173
Hello I had a similar problem and I fixed it by doing this ;
You have to ensure that everything in your APP page ( https://www.linkedin.com/developer/apps ) matches the parameters in your authorization URL . SO for example in your case , https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=test&redirect_uri=http://test.custom.com/abc/linkedin&state=DCEeFWf45A53sdfKef424asgTyhgTR5 ;
You would have to ensure that your client_id in the auth URL matches the Client-Id on your APP page and also ensure that the redirect_uri you specified in your auth URL has been authorized on your app page as shown below . If you are passing in scopes as well, also ensure that they match perfectly . As you can see in the image below , my redirect_uri has been authorized from my app page .
Upvotes: 8
Reputation: 11
Recreate a application after 12/15/2018 solved the problem for me. (Any developer application created through the LinkedIn Developer Portal after December 15, 2018 automatically has access to the v2 API.) https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq?context=linkedin/consumer/context
Upvotes: 1