小编Vin*_*ary的帖子

DEVELOPER_ERROR 错误代码 10 - Firebase google login in react native

我正在尝试在我的本机应用程序中实现 Firebase Google 身份验证。但得到 DEVELOPER_ERROR。错误代码 10。

它工作一次,然后当我在一周后尝试再次运行它时,我遇到了同样的错误。

到目前为止我尝试过的。1. 检查 Web Client ID 是否正确。2. Debug Keystore 也正确检查了将近20 次。3. 删除 Firebase 项目并创建一个新项目。

  componentDidMount = async () => {
      // Google Configure
      await GoogleSignin.configure({
          webClientId: 'xxxxxxxxxxxxxx.apps.googleusercontent.com',
          offlineAccess: true
      })

    }
Run Code Online (Sandbox Code Playgroud)
    firebaseSignIn  =  async () => {
      try {
      const data =  await GoogleSignin.signIn();

      // create a new firebase credential with the token
      const credential = firebase.auth.GoogleAuthProvider.credential(data.idToken, data.accessToken)
      // login with credential
      const currentUser = await firebase.auth().signInWithCredential(credential);

      //Update Data in Firebase
      this.props.updateAuth(this.state.first_install, this.state.first_open)

      } …
Run Code Online (Sandbox Code Playgroud)

android native firebase reactjs react-native

0
推荐指数
3
解决办法
5503
查看次数

标签 统计

android ×1

firebase ×1

native ×1

react-native ×1

reactjs ×1