Twitter iPhone app opens safari in middle of OAuth from webview

ios

#1

Steps to reproduce:

  1. Open Twitter app on iPhone
  2. Open a link related to my website from the app
  3. On the web view opened by the app, try to “sign in using twitter”
  4. After getting request token and request token secret, I store them in the session as I need to sign all requests using these things going forward.
  5. But when I redirect to https://api.twitter.com/oauth/authenticate?oauth_token=NPcudxy0yU5T3tBzho7iCotZ3cnetKwcTIRlX0iwRl0 as mentioned in https://dev.twitter.com/web/sign-in/implementing it suddenly opens safari browser
  6. This creates a new session and I lose the request token and request token secret that I stored in step 4.

This causes the sign in to fail in my app. Is there a solution to this problem? This same thing works perfectly fine on Android but fails on iOS.

PS: I am not sure how can this post be considered spam or promotional.


#2

Even I am facing similar issue, log in fails when the context switches from app webUI to browser.


#3

We have a similar issue.


#4

We have similar issue. I created a post on stack overflow hoping there is a solution to stop auto redirecting to the native Twitter app.


#5

Has anyone received word on how to address this? I’ve seen a lot of post about the same issue, but yet to have found a solution. Anyone?


#6

Clicking the go button on the keyboard instead of “Authorize App” in the web view is a workaround to the issue. -http://stackoverflow.com/a/33033836/757503

I hope Twitter fixes this in the future.


#7

WE are also having the same problem. Would be nice if twitter could take the time to offer some insight.