我正在尝试在我的本机应用程序中实现 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)