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

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.

Related

Analytics API: I can't use two different API credentials on my PC

I've 2 different API keys enabled on 2 different accounts. One professional and the second private and I don't want to link the 2.
My problem is that I've been working with the professional API credentials for almost 3 months and everything works fine. Now, I've created a new account with a new Analytics account and my problem is that I can't use the new API directly with my new Analytics account.
I can't make my script to authorize the new user and I receive an error that says that the user does not have sufficient permissions for this profile.
I managed to make it work by adding my private account as a user in my professional Analytics account. It seems like I can't make another account authorization even if I'm using a different API created on another account. It's like the connects to the first account authorized on my PC.
Is there any way to reset the authorization on my PC each time I want to use one of the API?
Thank you,
EDIT: I'm running a Python script that uses the Analytics API and the only time I have a prompt to authenticate it's the first time I use the application on a new PC. After that, the script runs without any prompt, The credentials are those of the API (client ID and Client secret) and I'm not using them directly but I'm using the client_serets.json file generated on the Google dev console.
I have figured it out. You'll have to navigate to this url https://myaccount.google.com/permissions?pli=1 and remove the service you want to remove.

Connecting to Youtube Analytics API using R

I am trying to pull data from Youtube Analytics API using R and have hit a wall. I'm getting a Status 403 error. I can confirm that:
I have tried logging out of all accounts, rebooting, re-authenticating and then logging into 1 account and it didn't work
I have tried using just the https://www.googleapis.com/auth/youtube.readonly scope (which is supposed to be correct) and all youtube analytics scopes are authorized within the app (each with their own credential key), it didn't work.
I have tried authenticating from different browsers, it didn't work
I can confirm that the call worked from https://developers.google.com/apis-explorer/#p/youtubeAnalytics/v2/youtubeAnalytics.reports.query.
UPDATE
I have found the solution and updated the code to what is now working
scopes<- c('https://www.googleapis.com/auth/youtube.readonly')
endpoint<- oauth_endpoints('google')
youtubeapp<- oauth_app(appname='Youtube Analytics API',
key=client_id,
secret=client_secret)
youtube_token<- oauth2.0_token(
endpoint= oauth_endpoints('google'),
app = youtubeapp,
scope = scopes)
raw_data<- GET(paste("https://youtubeanalytics.googleapis.com/v2/reports?dimensions=",dimensions,"&endDate=",enddate,"&ids=",ids,"&metrics=",metrics,"&startDate=",startdate,sep=""),
config=youtube_token,content_type('application/json'))
content(raw_data, as= 'text')
I have figured out that access permissions are dictated by Youtube (not API IAM), so for example even though my personal email is owner of Brand account and API I still need to authenticate the call using the Brand Account or it won't work (I get 403 error for personal email). I tried switching my Youtube channel from Brand to personal and then my personal email worked. However, I need it under the brand account, so I have switched back.
I will leave this code up regardless because I found that good examples using R were lacking, I hope you find this useful.

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.

LinkedIn New API - Can't Get r_network Permission

I inherited a program that was written with the old LinkedIn API, and I'm trying to migrate it to the new API. When I try to get the r_basicprofile permission, my oauth token works. However, when I try r_network or rw_nus, I get a response
invalid scope -- your application has not been authorized for
r_network.
Yet, when I go to www.linkedin.com/developer/apps/xxxx/auth, the boxes for r_network and rw_nus are checked.
I.e., A request to
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=xxxxxx&scope=r_basicprofile&state=yyyy&redirect_uri=http%3A%2F%2Fkalatublog.com%2Fwp-content%2Fmu-plugins%2Fimb-en%2Fhelpers%2Fsocial-connect%2Fapi%2Ffinalize.php%3Fapi%3Dlinkedin%26ch%zzzzz
works, but a request to
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=xxxxxx&scope=r_network&state=yyyy&redirect_uri=http%3A%2F%2Fkalatublog.com%2Fwp-content%2Fmu-plugins%2Fimb-en%2Fhelpers%2Fsocial-connect%2Fapi%2Ffinalize.php%3Fapi%3Dlinkedin%26ch%zzzzz
gives that error. What am I doing wrong?
As of May 15,
After the grace period expires, several REST API endpoints will no longer be available for general use. The following endpoints are the only ones that will remain available for use:
Profile API — /v1/people/~ `
Share API — /v1/people/~/shares
Companies API — /v1/companies/{id}
If your application is currently using any other API services (e.g. Connections, Groups, People Search, Invitation, Job Search, etc.) you will have to apply to become a member of a relevant Partner Program that provides the necessary API access to continue to leverage any of the endpoints that are not listed above.
It looks like linkedin no longer wants to share anything with their API. Creating a new app indicates that the only possible options are r_basicprofile, r_emailaddress, rw_company_admin, and w_share:
TLDR: they have locked down the API and restricted the usage to an extremely limited set of access points.
I did some more digging. The linkedin website is misleading. On my app linkedin page, it says that I'm approved for rw_nus and r_network, but on this page
https://developer.linkedin.com/support/developer-program-transition
it says those are no longer approved.
So the app home page in linkedin incorrectly said I had those permissions.
Heres the link if you want to Apply for Linkedin
https://help.linkedin.com/app/ask/path/api-dvr

Updating Linkedin API Scope doesn't work unless user removes app

I added a new permission to my linkedin api scope and it did not work until I removed my application from my account, then re-authenticated. This is even after I re-authenticated with linkedin, seeing the new scope change in the list. It only worked after I removed the app.
Is there a better way I'm missing? The Linkedin docs don't seem to touch on this matter.
Well. It seems you need to create a new app to get a new api key... woof.
EDIT:
http://developer.linkedin.com/comment/30279#comment-30279
Confirmation that this is the only option.

Resources