Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upTwitterAuthClient doesn't provide a way to clear the authorization state. #76
Comments
nishkarsh
changed the title
TwitterCore doesn't provide a way to clear the authorization state.
TwitterAuthClient doesn't provide a way to clear the authorization state.
Jan 9, 2017
This comment has been minimized.
This comment has been minimized.
LaurieScheepers
commented
May 11, 2017
|
Yeah, I'm having the same issue and after hours of searching I can't find a workaround. What a horrible bug! Can't believe they haven't fixed it yet. @nishkarsh Have you managed to get a workaround for this issue? |
This comment has been minimized.
This comment has been minimized.
nishkarsh
commented
May 11, 2017
|
@LaurieScheepers Unfortunately I had to go with using reflection to access the state and explicitly call endAuthorize(). Couldn't find any other workaround.
I don't know why my pull request that has a fix for this hasn't been accepted yet. |
This comment has been minimized.
This comment has been minimized.
LaurieScheepers
commented
May 11, 2017
|
@nishkarsh Thanks a lot man! I saw your pull request, will comment on it. |
LaurieScheepers
referenced this issue
May 11, 2017
Closed
Provide method to explicitly cancel authorize in progress #77
This comment has been minimized.
This comment has been minimized.
|
Thank you for reporting this issue. We have merged your fix internally and it will be reflective in the next release. |
nishkarsh commentedJan 9, 2017
•
edited
TwitterAuthClient.authorize(Activity activity, Callback<TwitterSession> callback)onClick() of login button.Login fails with the following stacktrace:
The exact problem seems to be that
authState.beginAuthorize(activity, oauthHandler)is called when initiating login butauthState.endAuthorize()is only called whenonActivityResult()is received. This makesisAuthorizeInProgress()to return true when authorize() is called again due to state not being cleared. However, in case when user doesn't come back to the same Activity again, there is no wayonActivityResult()would be received. To handle such cases, there should be a way to clear the authorization state by explicitly calling a method.As there could be multiple places in the app from where login can be triggered, there should be a way to clear authorization state explicitly.