react-native-firestack icon indicating copy to clipboard operation
react-native-firestack copied to clipboard

firestack.auth.signInWithProvider doesn't work with twitter

Open SvetlanaPrudnikova opened this issue 8 years ago • 3 comments

Hi, I'm trying to make auth via twitter using react-native-oauth. My twitter login function is bellow:

  twitterLogin = () => {
    this.manager.authorize('twitter', {})
      .then(response => {
        const {accessToken, consumerKey } = resp.response.credentials;
        console.log('Your users ID', response, accessToken, consumerKey);
        this.firestack.auth.signInWithProvider('twitter', accessToken, consumerKey)
          .then((user)=>{
            console.log(user)
          })
          .catch(err => console.log('There was a firestack error', err));
      })
      .catch(err => console.log('There was an error', err));
  };

I receive response in my console from manager.authorize() as following:

response:Object
  credentials:Object
       accessToken:"832503184249716737-tTxGM5uPXynHP2B9dB8cNCN3BRA3yGE"
       consumerKey:"WdngTlXwxbc1Nyp0d2cOaKzDv"
       type:"Bearer"
  __proto__:Object
  uuid:"832503184249716737"

And then I receive error from this.firestack.auth.signInWithProvider:

Object:
   allErrorMessage: "com.google.firebase.FirebaseException: An internal error has occurred. [ Fail   to get successful verify_credentials response from Twitter: {"errors": [{"code":32,"message":"Could not authenticate you."}]} ]"
   errorMessage: "An internal error has occurred. [ Fail to get successful verify_credentials response from Twitter: {"errors":[{"code":32,"message":"Could not authenticate you."}]} ]"
  __proto__:Object

What can be the reason of these error?

Thank you!

SvetlanaPrudnikova avatar Feb 17 '17 13:02 SvetlanaPrudnikova

@SvetlanaPrudnikova Did you figure this out? I seem to have the same issue.

holgersindbaek avatar Mar 31 '17 16:03 holgersindbaek

Guys, i am facing the same issue error message: com.google.firebase.FirebaseException: An internal error has occurred [ No TWITTER config found ]

Danny2790 avatar Aug 22 '17 11:08 Danny2790

did you get a solution for this? @SvetlanaPrudnikova @holgersindbaek @Danny2790

ghost avatar Jul 06 '18 00:07 ghost