we have an online platform that is used by several iOS apps. All of them can sign in the user authenticated via Twitter. This requires using the same (twitter) consumer key and secret across all iOS apps.
This creates a problem now that the consumer key is added to the Info.plist to redirect the user from the Twitter app back to the calling app. We can have multiple apps installed on the phone with the same URL scheme.
Is it possible to differenciate the URL scheme in any way? Facebook SDK uses custom suffix we can add to the URL scheme to allow that.
As alternative, can I force the usage of SFSafariViewController only? So the Twitter app is not used and there is no redirect to handle.
Thank you so much!
This issue is still present in 3.0.4 and I cannot understand why this is not taken in consideration.
My proposed solution will avoid any possible issue of authenticating the wrong app, when OAuth is handled by Twitter app.
The old version of TwitterKit (2.8.1) is more flexible because it allows you to force the login flow on Webview/Safari (using the method parameter TWTRLoginMethod) and so this problem is not happening.
Please re-introduce, at least, this old behavior.
We have this issue also with Twitter SDK 3.1.1 and I have Twitter 7.8 on my iOS device.
When we try to use TWTRComposer, the user is taken to the Twitter app to the “Connect your account” view.
If user taps “Connect” button, the Twitter app will redirect the user back to a different app.
I guess Twitter/iOS can’t differentiate between the apps via the CFBundleURLSchemes?
Is there any update regarding this issue?
How are you handling the issue for now?
I ended up implementing my own login flow using oauth and SafariViewController.
This way I can avoid the problem all together