I am trying to implement Firebase Google Authentication in my react native application. but getting DEVELOPER_ERROR. error code 10.
It works once then when I try to run it again after a week I get the same error.
What I have tried so far. 1. checked Web Client ID its correct. 2. Debug Keystore is also correct checked it almost 20 times. 3. Deleted Firebase project and created a new one.
componentDidMount = async () => {
// Google Configure
await GoogleSignin.configure({
webClientId: 'xxxxxxxxxxxxxx.apps.googleusercontent.com',
offlineAccess: true
})
}
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)
} catch (e) {
console.log(e.code)
}
}