-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook Auth: Error 101 "Facebook auth is invalid for this user" #475
Comments
Ok, this is still an issue. There are two facebook.js files, one in oauth and one in the general /lib folder . The one in oauth reflects this problem, and at least on my local deployment, is the one being called. |
@penultimate-labs @nitrag There is a proposal here #478 Can you check if it reproduces? |
#478 should fix this. Please re-open if it doesn't. |
still receiving |
@absolutlabs what version are you using? How is your parse-server configured? Please also consider running the server with VERBOSE=1 so you can provide the trace of network requests. |
Hello I'm using the parse-server-example on Heroku package.json :
node_modules_cache is disabled ( index.js :
|
@absolutlabs I'm not sure latest would pick the github master version. Could you try replace or For more info on github URL's see here Also it seems that your parse package version is out of date, please use ~1.7.0 Secondly, are you FacebookAppIds valid and was the auth token acquired with that app ID? |
Heroku now fails to launch the app after deploying with one of the parse-server addresses you suggested:
FacebookAppIds was working great before migrating to heroku + mongolab. Build logs, in case it could help :
thanks |
It seems that npm build is not run upon deployment to generate the lib directory. |
Same error with AWS... :( |
@nitrag the Facebook auth error? |
No sorry, well, I'm still having that issue too but I am hoping it will be I'll just wait until tomorrow for the next npm release. On Thu, Feb 18, 2016 at 11:30 PM, Florent Vilmart notifications@github.com
|
Everything works well with 2.1.2 (session token and FB oauth) |
@absolutlabs good to hear! Cheers! |
@flovilmart @absolutlabs In my project I'm using parse-server version 2.1.6 and still getting the same error: "Facebook auth is invalid for this user". Can someone help me to achieve it. |
@Gegham what client are you using? |
@flovilmart I'm using parse-server in Node.js |
I mean to log/link your user in? Did you properly configure ParseServer with facebookAppIds as described here? |
Oh, I'm using iOS SDK. Yes I've implemented it as described in docs. Please review : var api = new ParseServer({ |
if you try removing the appIds as well as facebookAppIds from your configuration does it work? |
Initially it did not have it in configurations, I have added it in hope that it will fix my problem. But I'll remove it and try now, again. |
I have removed both keys and still getting the issue. |
So if you removed those keys, it means that either your authData object is improperly formatted or that the auth_token is invalid / has expired. can you run your server with the environment variable VERBOSE=1 so we have more logs on the requests? |
Yes, I'm using latest iOS SDK. I acquire this auth token by simply calling : Now I'm getting this error in client: Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKLoginRecoveryAttempter: 0x16005df00>, NSLocalizedRecoverySuggestion=Please log into this app again to reconnect your Facebook account., com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=190, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=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., com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=400, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=2, com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode=460, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={ |
As you can see, this is a Facebook SDK error |
Yes you are right, but when I'm switching back to parse.com from parse-server, it works fine. |
This error appears after migration |
Sure, but the error is generated by the Facebook SDK. http://stackoverflow.com/questions/6248173/facebook-access-token-invalid-with-message-session-does-not-match-current-store#6769696 |
Sure I understand it, but if it works with parse.com and not working with parse-server, means problem is in parse-server side. I think every time when I'm trying to logInInBackgroundWithReadPermissions:permissionsArray , I'm getting wrong session token from parse-server, I don't know how can I fix this issue |
Try to acquire the access token from the Facebook SDK and then run the login method with this access token |
Also what version of PFFacebookUtils, FBSDK, Parse-iOS-SDK, and parse-server are you using? |
@Gegham, did you only try with old users (created on Parse) or did you signed up with a new user on the parse-server and then try to re-login ? |
With new users everything is works. I have solved this issue for old users by unlinking then linking users to FB. Thanks ALL!!! |
@absolutlabs @flovilmart I can confirm this issue exists with new users. Way to reproduce:
Alternatively, if you remove user linked parse account before step 4. , new account is created without problem. So it fails, if there is an existing parse account linked in the database. I'm 99% sure it's a problem with Parse. |
Can you write a test that encompasses that use case and provide a PR for that? |
I'd love to, but this means I'd have to find a root cause and then write a test-case. Unfortunately this will not happen in the nearest future due to lack of time :-(( |
Jumping in late here I realize but has there been any further movement on this by chance? I'm still seeing FBSDKGraphRequestErrorGraphErrorSubcode=460 for "legacy" Parse users when I try to log them in on Parse Server (they work fine on Parse.com). |
I'll try something out later today |
Followup on this. I hadn't migrated my users to "Require revocable sessions" prior to trying to work with users on the new server. This seemed to fix the issue for me - hope this helps others. |
@alombard will that allow me to save to the user object from a REST call? I am having the same issue, I make calls from a separate python script to edit information about the users and it says "Facebook auth is invalid for this user". |
@michalumni not sure. Why not try it? Can't imagine this would hurt (it's the recommended approach). |
I tried it, by switching over to Revocable sessions, still no go... I am wondering if I have to unlink and then relink my users as well? |
I believe there's a bug in 2.1.0 with the RestWrite.js -> facebook.js data path. The validateAppId function in facebook.js assumes a passing of the literal access_token (String) but what's actually passed is an authData structure within which lives a key called "access_token".. so facebook.js should actually be trying to append access_token.access_token to the graph request, and not just access_token. More appropriately, the access_token argument of facebook.js:validateAppId should be renamed to authData and subsequently authData.access_token for the string builder contained within. As it is for the validateAuthData function above it.
The text was updated successfully, but these errors were encountered: