parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Please log into this app again to reconnect your Facebook account

Open mogsten opened this issue 10 years ago • 21 comments

When logging in with Facebook, ParseFacebookUtilsV4 and Parse Server, I receive the message "Please log into this app again to reconnect your Facebook account", and then the app crashes on the line that gets the facebook results as an NSDictionary, is there anything that could be causing an issue

Parse Server is on the latest version facebookAppIds and fileKey is set correctly and working

mogsten avatar Mar 03 '16 07:03 mogsten

Does this same code work when using Parse.com instead of Parse Server? If yes, can you show the request and response from your Parse Server?

drew-gross avatar Mar 03 '16 18:03 drew-gross

Thanks for your reply, Yes the code works correctly when using Parse.com, the error only occurs when I use Parse Server. How would I be able to get the request and response from the Parse Server?

mogsten avatar Mar 04 '16 00:03 mogsten

@mogsten What error are you getting from the console?

FridaySG avatar Mar 04 '16 00:03 FridaySG

Which Console?

iOS? or another console

mogsten avatar Mar 04 '16 00:03 mogsten

@mogsten iOS, Xcode

FridaySG avatar Mar 04 '16 00:03 FridaySG

screen shot 2016-03-04 at 11 29 34 am

This is the issue that I am getting, The console won't print exactly what happened last time, as I have restarted the server since

mogsten avatar Mar 04 '16 01:03 mogsten

@mogsten Can you try "print(error)" before the line that is crashing? (Before the 'let' statement). Let me know what it prints out.

FridaySG avatar Mar 04 '16 01:03 FridaySG

ERROR: Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKLoginRecoveryAttempter: 0x7fb7eb201da0>, 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: The session has been invalidated because the user has changed the password., com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=400, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=2, com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorSubcode=460, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={ body = { error = { code = 190; "error_subcode" = 460; "fbtrace_id" = C8G9qKdEqg8; message = "Error validating access token: The session has been invalidated because the user has changed the password."; type = OAuthException; }; }; code = 400; }, NSLocalizedRecoveryOptions=( OK, Cancel )} fatal error: unexpectedly found nil while unwrapping an Optional value

mogsten avatar Mar 04 '16 02:03 mogsten

Has there been any resolution for this case?

mogsten avatar Mar 07 '16 09:03 mogsten

@mogsten you're doing a force unpack (!) on your result that's why you crash

Your should do:

guard let result = result as? [NSObject:AnyObject] else {
  if let error  = error { print(error) }
  return 
}

// continue with the result

On another note, this is the Facebook SDK that tells you that the token has been invalidated, you should request another access_token to the Facebook SDK and then link/login with it in the ParseSDK.

flovilmart avatar Mar 12 '16 03:03 flovilmart

User signed up and logged in through Facebook! ERROR: Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKLoginRecoveryAttempter: 0x15e68e1c0>, 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={ body = { error = { code = 190; "error_subcode" = 460; "fbtrace_id" = EeL1NzTdqu0; message = "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."; type = OAuthException; }; }; code = 400; }, NSLocalizedRecoveryOptions=( OK, Cancel )} Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={NSRecoveryAttempter=<_FBSDKLoginRecoveryAttempter: 0x15e68e1c0>, 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={ body = { error = { code = 190; "error_subcode" = 460; "fbtrace_id" = EeL1NzTdqu0; message = "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."; type = OAuthException; }; }; code = 400; }, NSLocalizedRecoveryOptions=( OK, Cancel )}

This is what was returned, fixed the crashing but still having issues

mogsten avatar Mar 12 '16 04:03 mogsten

This is an iOS Facebook SDK problem, try to reach out on stack overflow.

flovilmart avatar Mar 12 '16 16:03 flovilmart

I have the same problem, have you solved this problem on your side ? @mogsten

Gegham avatar Mar 15 '16 09:03 Gegham

Same problem... @Gegham @mogsten

umusset avatar Mar 19 '16 12:03 umusset

Same problem.... Does anyone solve this?

roylo avatar Apr 25 '16 11:04 roylo

Try updating to the latest version of the Facebook SDK, in the Facebook SDK changelog they mentioned this error. This is not a Parse problem.

FridaySG avatar Apr 27 '16 09:04 FridaySG

I just got same problem. I upgrade to latest SDK. Then got this problem. Has anybody resolved. Does my privately hosted parse server need to have secure connection?

sdalai avatar May 09 '16 09:05 sdalai

I just logged an issue Here is my scenario I have migrated to linux based Private parse environment in Rack space. I use PF Login for user login using Facebook.

Here is Latest versions Parse Server 2.2.6 FBSDKCoreKit 4.11.0 ParseUI (1.2.0) ParseFacebookUtilsV4 (1.11.1) IOS 8 and above

Everything have been working fine. Then I changed my Facebook password. When I am logging into app using Face book alert is coming up with message

"Please log into this app again to reconnect to your Facebook account."

I am logging out and login in again to get same message.

However other users who haven't changed password are able to login as usual.

To further check I pointed my app to parse.com. It is working fine .

sdalai avatar May 09 '16 21:05 sdalai

@flovilmart Requesting another token doesn't help here (as well as displaying a login screen).

Anyway, in old Parse dashboard we were asked to provide facebook app id AND facebook secret. In open-source parse however, we don't need to provide facebook secret. Why is that, what is the difference between the old and new parse and the secret thing? Can it cause similar problems as described above?

FilipZawada avatar May 27 '16 07:05 FilipZawada

@FilipZawada The secret is only used in particular cases, and is not required to validate the session token.

flovilmart avatar May 27 '16 12:05 flovilmart