LinkedIn OAuth Issues
Hi,
I am having issues with the LinkedIn OAuth and was wondering if anyone else is experiencing the same issues, or knows how to fix it?
The following might be related to the issue I'm having, but it might not. Skip to the *** symbols if you just want to read the issue.
PSA: I think the Marketplace plugin might be outdated.
Here are a few things I had to change just to get it to partially work:
- Important to note that Sign In with LinkedIn is deprecated and, instead, the product is now called Sign In with LinkedIn using OpenID Connect, which has different requirements and scopes.
- In /oauth/linkedin/init theres a custom function linkedin_oauth_getauthurl. In the Create Variable section, there is a url_addarg value that is outdated. The scope parameters r_liteprofile and r_emailaddress needed to be changed to profile and email.
- In /oauth/linkedin/continue there is a step in the function stack which accesses the table in your database that you use for Auth. In my case, that table is supposed to be User, but the plugin was pointing to a non existent table.
******************************* THE ISSUE BELOW *************************************
The above changes fixed most of the basic issues, but I am still getting an error
403 Not enough permissions to access: GET /me
and 403 Not enough permissions to access: GET-members /emailAddress
Has anyone encountered this or have ideas what I can do to fix this?
Thanks in advance
Best Answer
-
Thanks again to @Michael Udinski for helping me solve the issue in office hours.
In the end, the issues were due to LinkedIN changing their API, so the Xano plugin didn't have current information.
Some things that needed changing:- In
/oauth/linkedin/init
theres a custom functionlinkedin_oauth_getauthurl
. In the Create Variable section, there is aurl_addarg
value that is outdated. The scope parametersr_liteprofile
andr_emailaddress
needed to be changed toprofile
andemail
. - In
/oauth/linkedin/continue
there is a step in the function stack which accesses the table in your database that you use for Auth. In my case, that table is supposed to be User, but the plugin was pointing to a non existent table. - In
/oauth/linkedin/init
theres a custom functionlinkedin_oauth_getuserinfo
.- The API call to
/v2/emailAddress
is no longer necessary so it can be taken out. - The
/v2/me
endpoint should be changed to/v2/userinfo.
- The headers in that last endpoint should be changed to look like this:
- The API call to
- And the Create Variable step in the function stack in the
linkedin_oauth_getuserinfo
custom function should be changed to look like the following:
If I didn't forget anything, everything should work after those changes.
For more info, here is the new LinkedIn documentation: - In
Answers
-
At a guess the issue is the scopes you are requesting in your authorization code flow. Maybe sharing a bit more here would help. Also you might get insight if you are using a first party xano snippet from their office hours- next one is tomorrow.
State Change, which I run, has daily office hours where we work on hard problems in no code. We just did instagram integration over a couple segments in hours last week.The devil is often in the details for these authentication challenges which is why I suggest these live interventions!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback