Hybridauth LinkedIn API - Invalid Token issue - linkedin

I have configured HybirdAuth for social logins as my all other social logins are working but suddenly linkedIn stop working and shows this error.
Original error message: Authentication failed! LinkedIn returned an invalid Token.
I have search and try different methods but nothing worked out.
I have change keys, create new apps, make some changes in the code.
Please help.

Seems like you are using invalid consumer key.
[`message] => [unauthorized]. The token used in the OAuth request is not valid. consumerKey: 77zl215zorlwwd`
Double check your app settings for consumer key.

Related

`redirect_uri_mismatch` error when using Google as the signin provider

I have seen many posts for this error and all of them said to add my URL under both the API key that's generated by Firebase and the OAuth 2.0 Client IDs.
My domain is lyricsandquotes.org so I added the URL in both of these.
The screenshot from the API Key:
The screenshot from the OAuth:
However, I am still getting this error. What am I doing wrong?
I noticed I had to change the redirect URI under the Client ID credentials to the one specified in the error message:

Failed to refresh Access Token when using Google OAuth2.0 credentials

I am trying to use GA4 API (with Google Python Client & Google Analytics Data Python Client) of Google with the Credentials authentication:
credentials = Credentials(
token=config['access_token'],
refresh_token=config['refresh_token'],
client_id=config['client_id'],
client_secret=config['client_secret'],
token_uri="https://accounts.google.com/o/oauth2/token",
scopes=['https://www.googleapis.com/auth/analytics.readonly']
)
This is working when my access token is not expired. However, this access token is expiring after 1 hour and I want to refresh it via following method:
credentials.refresh(google.auth.transport.requests.Request())
However, this code is returning "invalid_grant" error.
For that problem, I checked almost everything suggested (i.e. system clock/ntp, user permissions, etc.) however I couldn't fix the problem.
Also, I can't figure out about the refresh_token that I use is valid for Google Analytics 4 or not.
So, the questions are:
How can I able to solve this problem?
How can I assure that the refresh_token is valid for GA4?
If not valid, how can I refresh the refresh_token?
Is there any suggestion on the refresh of access_token, any other method or anything else?
Thanks
In my case, the solution was creating new OAuth client and generate a refresh_token for that account depend on the Google Analytics scope.
For that purpose, after I create the new client, I downloaded the client_secrets.json and run the Complete Example by Google and finally I am able to refresh the token.

Firebase Authentication partially working (only email)

After months of developing a Web App under Firebase suddenly these days we have a problem with the Authentication, it returns this console.alert only with Facebook and google login (email/pass login works fine):
[firebase-auth] Info: The current domain is not authorized for OAuth
operations. This will prevent signInWithPopup, signInWithRedirect,
linkWithPopup and linkWithRedirect from working. Add your domain
(front.qualify.mx) to the OAuth redirect domains list in the Firebase
console -> Auth section -> Sign in method tab.
The App uses 3 different sub-domains, and in all 3 we can access over email/pass but not Facebook nor google.
We tried updating the Firebase initialization script, nothing. We have checked the API keys (in the Google APIs Credentials) and there was a new "Server key (auto created by Google Service)" which no one told us it was generated (Jan. 18th), so we edited it to include the domains as the original API key in different ways (w/wo * and /*), nothing. We deleted this new Server Key, suddenly something different, now the console includes a 403 error before the alert stated above and returns auth/timeout code inside the object.
We also found the Identity Toolkit API has detected many errors, so we tried to add the URLs for login, logout and email, but nothing happens when trying to save.
What are we missing?
The solution was adding my-app.firebaseapp.com (being my-app the unique identifier of our Firebase App) to the HTTP referrers in the Browser-Key Credentials from the Google APIs console and wait some time to propagate.
After many months of development the app never had a problem, and we are sure we never removed such referrer (if it was ever there).
Anyway... it's done and learned.
The simple way I was able to solve this issue I had with my ionic project was by following the instructions in the log, if you don't see any message try console log the response from firebase.
So what I simply did was follow the url: https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project='projectId'
*projectId = the Id of your project
and enable the Identity API something it brought up. Finish, and it worked instantly.

Facebook graph search invalid app token

I keep getting an invalid access token code 200 when searching the facebook graph with my valid app access token. I know there are some July breaking changes coming up, but I don't think this has to do with that.
https://developers.facebook.com/roadmap/
says that App access tokens will be required for all search Graph API calls except Places and Pages. Search for application will no longer be supported. I'm following the rules by searching public events with an app access token.
It may not be obvious, but it's documented at https://developers.facebook.com/docs/reference/api/search/:
Searches across page and place objects requires an app access token.
All other endpoints require a user access token.
You should use a user access token for search event.
If you think https://developers.facebook.com/roadmap/ is misleading, you should file a bug report at https://developers.facebook.com/bugs/create

facebook offline_access error

to access users info when they are offline,
the user grants offline_access and I store them by this :
$session=$facebook->getSession();
if($session)
{
$access_token=$session['access_token'];
}
$qq=sprintf("insert into `tokens`(`uid`,`access_token`) values ('%s','%s')",$myid,$access_token);
$res1=mysql_query($qq);
but when I try to use graph.facebook.com to collect information from them , it sometimes work and some times doesn't and gives me this error :
Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons
i use graph.facebook.com/[function]?access_token=[the access token saved in DB]
what's my fault?
First, the access token with the offline_access permission can become invalid if :
the user de-authorizes your app in his privacy settings
the user changes his password
You can read a blog post from Facebook about how to handle expired tokens.
Then, you should not :
make API urls directly with URLs, like you do when you call graph.facebook.com/[function]..., but use the Facebook PHP SDK functions to make API calls.
use the version of the PHP SDK you are using ($facebook->getSession() is from v2.x) is deprecated, that might be the causes of your problems.
Here is an answer on Stackoverflow about how to handle offline_access access tokens with the Facebook PHP SDK v3.x.
Hope that helps !

Resources