Android Firebase登录时twitter不在React native中工作

Android Firebase登录时twitter不在React native中工作,android,firebase,react-native,twitter,firebase-authentication,Android,Firebase,React Native,Twitter,Firebase Authentication,我正在尝试在react本机应用程序的Frebase身份验证中使用twitter。我使用下面的代码来完成它 const { RNTwitterSignIn } = NativeModules; RNTwitterSignIn.init(TwitterKeys.TWITTER_CONSUMER_KEY, TwitterKeys.TWITTER_CONSUMER_SECRET) RNTwitterSignIn.logIn() .t

我正在尝试在react本机应用程序的Frebase身份验证中使用twitter。我使用下面的代码来完成它

      const { RNTwitterSignIn } = NativeModules;

      RNTwitterSignIn.init(TwitterKeys.TWITTER_CONSUMER_KEY, TwitterKeys.TWITTER_CONSUMER_SECRET)

          RNTwitterSignIn.logIn()
            .then(loginData => {
              console.log("loginData="+loginData.authToken + " "+ loginData.authTokenSecret)
              console.log(JSON.stringify(loginData));
              const credential = firebase.auth.GoogleAuthProvider.credential(loginData.authToken, loginData.authTokenSecret)

              return firebase.auth().signInWithCredential(credential);

            }).then((currentUser)=>{
              this.props.navigation.navigate('FlyerListing')

              //--------------------------Async Test--------------------------
                AsyncStorage.setItem("user", currentUser.uid)
                console.log("AsyncStorage= "+ currentUser.uid)
            //--------------------------------------------------------------
            })
            .catch(error => {
              console.log(error)
            })
当我尝试登录时,控制台中出现以下错误:-

{代码:“身份验证/无效凭证”,消息:“无法解析Google” id_令牌:150550928-ZJgBitL44wrST6DKCWhUx9b2dmNo10RGyQZ“}

我怎样才能解决这个问题

注意:-我使用相同的方法登录谷歌及其网站 工作正常


我找到了。Iwas使用const

凭证= firebase.auth.GoogleAuthProvider.credential(loginda.authToken, loginda.authTokenSecret)

代替

常量凭证= firebase.auth.TwitterAuthProvider.credential(loginda.authToken, loginda.authTokenSecret)


我找到了。Iwas使用const

凭证= firebase.auth.GoogleAuthProvider.credential(loginda.authToken, loginda.authTokenSecret)

代替

常量凭证= firebase.auth.TwitterAuthProvider.credential(loginda.authToken, loginda.authTokenSecret)


使用twitter登录在firebase中已处于活动状态使用twitter登录在firebase中已处于活动状态