OAuth 2 Authentication: Show LinkedIn Profile Info not working


(Ryan Archer) #1

I am trying to follow the example/tutorial in the Squiz User Manual Library here http://manuals.matrix.squizsuite.net/oauth2/examples/example

I cannot get past step 10. It fails to redirect to LinkedIn for sign in and shows an error message instead.

 

Have attached screenshot of error message.

Is it possible that something on LinkedIn has changed since this documentation for Squiz Matrix was written?

 

The URL of the page showing the error is https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=751uwmy89f3ddl&redirect_uri=http%3A%2F%2Fwww.qldlitawards.org.au%2Flinkedin-rest-resource%2F&scope=&state=Ad9BhgJr6m linkedinError.jpg (23.5 KB)


(Bart Banda) #2

Sounds like the redirect URL is not the same as what you have put in the linkedin api key setup? So whatever you are passing to LinkedIn for the auth as the return URL, has to match exactly on what you have put in the LinkedIn api set up itself. 


(Ryan Archer) #3

Sorry Bart, I'm still not following you. In the Squiz manual http://manuals.matrix.squizsuite.net/oauth2/examples/example, there is no mention of a redirect URL that I can see. Also it tells us to select  Authentication Type as OAuth in the REST Resource asset but the screenshot shows it as a OAuth2 asset - confusing?

 

What I have done though is make the Redirect URI within the OAuth token the same as the Authorized Redirect URL within the LinkedIn app. Unfortunately this still does not work.

Is there an example anywhere that I can pick apart? I just find the documentation very scant.


(Bart Banda) #4

Sorry Bart, I'm still not following you. In the Squiz manual http://manuals.matrix.squizsuite.net/oauth2/examples/example, there is no mention of a redirect URL that I can see. Also it tells us to select  Authentication Type as OAuth in the REST Resource asset but the screenshot shows it as a OAuth2 asset - confusing?

 

What I have done though is make the Redirect URI within the OAuth token the same as the Authorized Redirect URL within the LinkedIn app. Unfortunately this still does not work.

Is there an example anywhere that I can pick apart? I just find the documentation very scant.

 

I would have thought the URL of the OAuth token needs to be what the Authorised Redirect URL is within the LinkedIn app, as that's where it will redirect you to after you have logged in in LinkedIn, no?

 

I agree that the example is a bit short, but also was written a long time ago so maybe the API in LinkedIn has changed since then. I'll put in an internal request to have it updated.