LinkedIn Javascript SDK authorize stopped working - linkedin

I have a LinkedIn integration using their SDK and use the method authorize to request permission from the user to post in her/his behalf. It was working fine but today I noticed that it stopped working. The issue is that the callbackFunction (see https://developer.linkedin.com/docs/getting-started-js-sdk) never gets called, so I don't know when the user grants permission or not.
I was checking and noticed that the file: https://platform.linkedin.com/in.js now redirects to https://platform.linkedin.com/xdoor/scripts/in.js. I took a look at https://web.archive.org/web/*/https://platform.linkedin.com/in.js and it seems that it changed around November the 13th.
Have you had any problems with the SDK recently?

Related

LinkedIn Sign In API recently intermittently failing

I'm having intermittent issues with signing in to LinkedIn with the LinkedIn Sign In API.
By intermittent I mean, I have two LinkedIn accounts, and as of this week one of them is unable to use the API to sign in to external services, such as the LinkedIn application I develop.
I'm authenticating via Auth0, whose engineers have confirmed there is an issue:
Over the last few weeks, the current version of the LinkedIn API for
sign-in has been intermittently failing when fetching the user
profile, causing a small number of users to fail to log in. The cause
of this issue is currently unknown, and is coming from LinkedIn
directly.
https://community.auth0.com/t/linkedin-connection-deprecated/20484/18
The Auth0 response i'm getting is the following (I've replaced senstivie response values with 'XX'):
{"name":"a0.response.invalid","message":"unknown error","json":{"error":"invalid_request","error_description":"InternalOAuthError: failed to fetch user profile (status: 500 data: {\n \"errorCode\": 0,\n \"message\": \"Internal API server error\",\n \"requestId\": \"XX\",\n \"status\": 500,\n \"timestamp\": 1550474289966\n})","state":"XX"},"status":0}
I know this API is being depreciated in March, but it's imperative that this API continues to work until the decommission date. I'm wondering if anyone has found a work around or solution to this issue, as it's impacting my ability to run real-world trials of my application scheduled in this week.
I've contacted LinkedIn support who directed me here.
Auth0 recently released a change to LinkedIn social connection, allowing you to use the new LinkedIn API (Version 2). You can change this by going to Connections-->Social-->LinkedIn-->Strategy Version dropdown and select Version 2. This should fix most of the login issues with the old deprecated version of LinkedIn API. More information post.

How can I change a LinkedIn app's permissions?

I have a LinkedIn app which can access the LinkedIn v2 API (tested with v2 endpoints), having the following privileges (scopes) according to the LinkedIn Developer Portal:
r_ad_campaigns
r_basicprofile
rw_organization.
The application is already enrolled in the Marketing Partner Program as far as my knowledge goes.
Regarding the above, I would like to have two questions/requests in which I would like to ask for your help.
I would like to modify the app permissions (scopes) to be the following:
r_liteprofile
r_emailaddress
r_member_social
w_member_social
rw_organization_admin
w_organization_social
r_organization_social
r_organization_lookup
rw_ads
r_ads_reporting
Currently there is no way to do so via the developer platform, and the LinkedIn support sent me here, so my question is: how can I get the app's privileges changed?
Interestingly enough, with the current set of privileges I was able to get an auth token for a given user for the r_emailaddress scope, but when I tried to call either https://api.linkedin.com/v2/clientAwareMemberHandles?q=members&projection=(elements*(primary,type,handle~)) or https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~)) I have received 403 Forbidden response, presumably due to the missing permission in question 1. Even if so, the token shouldn't have been issued in this case if I am not mistaken.
Could you please confirm if this is expected, or if something else is in play here?
I'm pretty certain it's that you must apply to the Marketing Partner Program.
I'm having the same issue as well, and I just applied to the program. Currently awaiting approval, but will confirm/edit answer once I get confirmation.
LinkedIn has made a lot of changed to their API over the past few months. Check out the latest permission changes relevant to this post:
https://learn.microsoft.com/en-us/linkedin/shared/references/migrations/marketing-permissions-migration
EDIT: Confirmed. I didn't receive a notification that I was approved, however, it's 30 days later after applying and I just noticed there was a new product available under "Products" once you are logged in and on your App in the developer portal. You have to add the "Marketing Developer Platform" product, and once again fill out an application:
After completing, they say they will provide you with confirmation within 90 days.

gapi.auth2.getAuthInstance().isSignedIn.get() is always false when Chrome Browser has multiple accounts

I copied the example given in Google Calendar API Quickstart and replaced it with the appropriate info. Every time I refresh the page, I'm asked to authorize before api data is fetched.
I'm using Chrome and I currently have multiple accounts / users. I noticed if I open an Incognito Window and sign in with one set of credentials then when I refresh the page I'm not asked to authorize.
Note, once I authenticate I receive calendar information so I don't believe it's an issue with client_id, api_key, scope, etc.
Looking at the example code, I'm guessing the getAuthInstance() is getting confused because of multiple accounts / users. Does anyone have any idea? Thanks!
This was happening when running on localhost. This issue stopped happening after deploying the webpage to a hosted server.

Google Oauth client was deleted. can I restore a new one?

We running a wordpress website use google oauth for third-party social login. (via WP Social Login plugin.) Former engineer is leave, and we cannot have past google account credential.
We face a problem shows:
Error 401
Error: deleted_client
The OAuth client was deleted.
but we can only see old client id and secret from website admin panel.
I wanna to know,
if we set up a new google oauth application id/secret, will it make user crash from login website?
Or, is it possible for us to restore/retrieve former application ownership and make it live again?
This happened to me when I was working on an Add-On (maybe not completely related to this question but similar). I mistakenly deleted a Client ID that I thought we weren't using.
How I solved it:
Created a new project in Google Cloud
Associated the Apps Script project (Add-on) to this new Google Cloud project
Then I re-associated the App Script project with my previous Google Cloud project
The previous step will re-compile, create and associate the Client ID to the App Script project. It will contain all settings from the Client ID manually created and associated with your project in the code.
Maybe this will give some light to anyone having a similar problem.
Here use this link:
https://support.google.com/cloud/answer/6251787?hl=en
You have to reach google and they will help you out, this is the only solution you can do.
In my case, the simplest/only path (though certainly not ideal) ended up being to create a new Firebase project and start using that.
This of course can be problematic if you have a lot of data to move and/or a nontrivial data schema - say, with nested collections. For me, it was worth the effort to get unblocked from Sign-In suddenly failing to work.
... ah, OAuth fun
=======
If you are trying to make the new Client ID work .. though it's not a total solution, but after searching for a while, found this config option in Firebase console - where you enable Google Sign In.
So if you generate a new OAuth Client ID, update the ID & secret there.
After I did this, it went from a 401 error to a 400 mis_direct , which I think was step in the right direction.

Meteor: Signin with linkedin not recognizing existing users

In my meteor application I am using the packages accounts-linkedin and linkedin to allow my users to signin with linkedin. This has always been working fine for several month. However, since yesterday users who have signed in to my website via linkedin in the past are not recognized anymore. When they go to "login with linkedin" a new meteor user account is created for them instead of logging them into their existing account.
When I test my application: Signing up via linkedin und then logging out and in, everything is working fine. Apparently it is only not working for accounts that already existed a few days ago.
This is really strange. The accounts code of meteor is really complex. What could be the reason that a user is not recognized anymore but a new user account gets created for them?
Could it be that linkedin messed up tokens on their side? (the linkedin id and accessToken in my users object (services.linkedin) did not change over the last days)
This is a bug in pauli:accounts-linkedin. The pauli:linkedin package was using the wrong value for the user's LinkedIn ID. I have submitted a pull request which fixes that problem for new users, but a fix is still needed to migrate the IDs of existing users. I recommend subscribing to the bug to track progress.

Resources