`verifyCredentialsLocallyWithSuccessBlock:` incorrect functionally after `+ twitterAPIOSWithFirstAccount` used to initialize
schlossm opened this issue · 0 comments
In + twitterAPIOSWithFirstAccount
, the account
variable is stored as NULL.
When trying to verify afterwards using the verifyCredentialsLocallyWithSuccessBlock:
method (which is the default verification method it seems), it attempts to look at the account
variable in search of a previously stored account. However, it's NULL so this fails.
Changing Line 198 of STTwitterOS.m forces this "refresh" of the account variable:
if([account.username isEqualToString:previouslyStoredUsername] || previouslyStoredUsername == NULL)
The code functionally is correct, if account
is NULL or is no longer logged in on the iOS device, technically the Twitter account is invalid. However, a case should be made when initializing from + twitterAPIOSWithFirstAccount
to bypass the NULL fail case.