GoldenOwlAsia / react-native-twitter-signin

MIT License
167 stars 303 forks source link

AuthToken and AuthSecretToken are missing on multiple logins #184

Open Ruthvikbr opened 2 years ago

Ruthvikbr commented 2 years ago

Hi,

We have a use case in our application where a user can link/unlink there twitter account to their profile. If the user tries to link his account and then unlink it. From the next attempt the RNTwitterSignIn.logIn() is not returning any data. No error is being received either.

We are using it in the following way :

RNTwitterSignIn.logIn() .then((loginData) => { if (authToken && authTokenSecret) { //Update user profile } }) .catch((error) => { console.log(error); });

mowaisch commented 2 years ago

facing the same issue if the user logged in once. Now he is unable to log in again needs to restart the application then login data is returned. Otherwise login -> logout again login -> nothing is returned from the Twitter library.

abhirajevolvier commented 2 years ago

Facing same issue, any hacks?

ghost commented 2 years ago

Getting the same issue as well

ghost commented 2 years ago

Hey @abhirajevolvier @mowaisch @Ruthvikbr , I've managed to resolve the issue, please see #126. There was an issue with multiple callback crash after login #142. I reverted the changes locally in RNTwitterSignIn.mm. The proposed MR in #142 includes authNotResolved flag but it doesn't seem to reset back to it's initial state true when user log's out I think. If this is the case, I am unsure how to go about this.

Besides that, I never get the multiple callback crash after login reported in #142, so maybe this should be reverted officially?? @khalid283