-
-
Notifications
You must be signed in to change notification settings - Fork 872
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
Migrating from ParseFacebookUtils
to use Facebook iOS SDK 17 causes login issues
#1787
Comments
Thanks for opening this issue!
|
This issue might be related this issue here on the Facebook SDK. Perhaps parse-server needs to provide support to the new token? facebook/facebook-ios-sdk#2400 |
Is that a warning or an error that requires you to use Limited Login? From the issue you linked it seems that Limited Login is mandatory due to ATT enforcement, but what when exactly is it mandatory? |
A warning shows up on the Facebook page when logging when the in-app web browser shows up. Upgrading to Facebook SDK 17 is required now since SDK 17 it is the only version that contains the privacy manifest that is now required by Apple. However with SDK 17 came the requirement to implement Limited Login because not doing so would return an invalid access token. If we configure the Facebook Login Manger to limited, the SDK would return a JWT token and if we configure it to enable tracking we get an access token. In my case, since I have tracking disabled on my phone, configuring it to enable tracking won't have an effect, and I suspect most iOS users will face the same issue. However, neither of these two configurations work on Parse as Parse returns |
Thanks for the explanation. I think support for JWT token would require a change in the Parse Server's Facebook auth adapter as well. A solution would need to allow for both types of token: the normal login token with app tracking enabled and the JWT token from Limited Login. |
Note: The bounty scope includes parse-community/parse-server#9117. |
Should we open an issue on Parse Server as well with reference to this one? I'm thinking that this most probably has to be addressed there, and it is quite urgent because if an app uses Facebook login with Parse, no further updates to the App Store can be done as it is. |
Sure, this may even be a Parse Server only issue. Done with parse-community/parse-server#9117. |
From what I have seen it is just the host facebook.com that has to be changed to wwww.facebook.com to retrieve the JWT keys. The old url is responding with a 301 which is not followed by the jwt-rsa package. |
@SebC99 This change needs to be done to the parse-server not on iOS correct? |
True |
This didn't seem to have worked for me, although I don't have any experience with parse-server. I'm not sure if a different implementation is required on parse-server for limited login to work. Do you have a PR which can be opened for this? |
@mman could you explain what you changed so that the Parse Server auth adapter supports both types of login tokens, normal and limited login? From what I understand, if a developer switches to limited login, then the woken is a different one. So the auth adapter on the server side should be able to handle both types of tokens, right? |
Quick update from my end as I did further troubleshooting by looking into the adapter's implementation, and it seems like switching the host in Facebook adapter to
However I still need to test authentication with tracking enabled and I still need to check how I can retrieve the user's Facebook platform data and store that on Parse as I don't think this is possible from the backend side with this token, but needs to be done client side. I also think that iOS needs to be able to detect a way that tracking is enabled to also to identify if |
With the change recommended above, I could get the iOS SDK working using the below implementation. I'm checking if the user has tracking enabled and if an access token is provided by the Facebook SDK in order to determine what to pass to Parse Server. I could then retrieve user information using the Facebook SDK
|
I agree with your implementation, also see parse-community/parse-server#9117 (comment). |
Closing via parse-community/parse-server#9117 |
New Issue Checklist
Issue Description
Due to an error being received when archiving with Xcode 15.3 as described here #1775, I upgraded to the latest Parse iOS SDK and removed the
ParseFacebookUtils
to usePFUser.logInWithAuthType
with Facebook iOS SDK 17 instead with the below sampleThe above works with Facebook iOS SDK 16 but not 17. For 17, I started getting an alert to use limited login so I tried making some changes such as the below
The above didn't work anyway and I don't think setting the tracking to limited would ever work since this doesn't provide an access token.
When I try to login, I get the error
[Error]: Facebook auth is invalid for this user. (Code: 101, Version: 4.0.1)
. I'm not sure if this is due to a misconfiguration from my end or an incompatibility with Parse Server itself. Any suggestions on how this should be configured?This issue might be related to another issue listed on the Facebook SDK here: facebook/facebook-ios-sdk#2384
Steps to reproduce
Actual Outcome
I am now getting an error when logging in using Facebook
Expected Outcome
The migration should be seamless or documented and login with Facebook should work as with previous versions.
Environment
Client
The text was updated successfully, but these errors were encountered: