LinkedIn OAuth 2.0 Redirect URL

I am trying to login using LinkedIn Omniauth 2 gem. I tried several different redirection features, read several articles and nothing works.

I am trying to check this locally. Rails 4 Application

Gems include: OmniAuth OmniAuth-oath2-LinkedIn

A few attempts at the redirect URL put in the field include:

https://www.linkedin.com/uas/oauth2/authorization?client_id=759dczzx23nyic&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Flinkedin%2Fcallback&response_type=code&scope=r_basicprofile+r_emailaddress&state=8da572e31a8e66e6b1de54acddd14937d976ed06d7ed3217&client_id= *

  • = API key that must remain private

    http://localhost:3000 http://localhost:3000/ http://www.localhost:3000 https://localhost:3000 https://localhost:3000/ https://www.localhost:3000 

I read both of these articles in their entirety, but could not find the correct way to redirect.

https://developer.linkedin.com/forum/register-your-oauth-2-redirect-urls

https://developer.linkedin.com/forum/oauth-20-redirect-url-faq-invalid-redirecturi-error

Any help on what I need to change would be great.

+5
source share
3 answers

They must exactly match what you send:

http://localhost:3000/auth/linkedin/callback

+5
source

In case the Linkedin Authorized Redirect links should be in the form of:

After authentication, if you want to redirect to a specific page,

  1. http: // localhost: 8080 / your-project-name / that-page-url
+1
source

I had a similar problem and continued to get "Invalid redirect_uri". This value must match the URL registered with the API key. "Error using Auth0

I added the URL below to the LinkedIn allowed callback list, after which it worked.

 https://"Insert your Client Domain Name from Auth0"/login/callback 
0
source

Source: https://habr.com/ru/post/1203642/


All Articles