Empty server response during reverse auth


#1

Some users of the iOS app I’m working on are getting empty responses from Twitter for the second step of reverse auth.

The problem is that for the majority of users everything works fine and I can’t reproduce the problem. I’m using a slightly modified version of the code provided by Sean Cook (https://github.com/seancook/TWReverseAuthExample).

I have loged the data that is being sent to the Twitter server from one of the users that is having the problem but I’m unsure wether I should post it here as it contains private data.


#2

Step 2 requires that the user has local accounts stored in the ACAccountStore. Are you checking that prior to sending the request?

Also, have you looked at the headers returned from our servers for the users that receive the “empty response”? Anything in there that gives any more information?


#3

Hello Sean thanks for responding,

Yes I’m checking if there are accounts on the device. If there are multiple accounts I present an action sheet, if there is one I use that one for auth and if there are none I ask the user to go to Settings and login in to Twitter.

Since I’m unable to reproduce this error on any device I have access to I have setup remote error logging. I havent logged the headers but this is the data that is being sent to the server (I deleted personal data)

“step2Params”: {
“x_reverse_auth_target”: “rcba6xCMFNNb5TQI0vT7g”,
“x_reverse_auth_parameters”: “OAuth oauth_signature_method=“HMAC-SHA1”,
oauth_version=“1.0”,
oauth_timestamp=“1360111963”,
oauth_token=“personal_data”,
oauth_signature=“personal_data”,
oauth_consumer_key=“personal_data”,
oauth_nonce=“personal_data””
}

This was logged from a user that was having this problem.