ОШИБКА:
Это изображение ошибки
Вот как я это реализую.
Код: Выделить всё
import { GoogleSignin } from '@react-native-community/google-signin';
import auth from '@react-native-firebase/auth';
const GoogleLogin = () => {
useEffect(() => {
GoogleSignin.configure({
webClientId: '************************', // From Firebase Console Settings
});
}, [])
async function onGoogleButtonPress() {
console.log('i am running on google login function')
// Get the users ID token
const { idToken } = await GoogleSignin.signIn();
console.log('idToken :', idToken)
// Create a Google credential with the token
const googleCredential = auth.GoogleAuthProvider.credential(idToken);
// Sign-in the user with the credential
return auth().signInWithCredential(googleCredential);
}
const handleSignIn = () => {
onGoogleButtonPress()
.then(() => {
console.log('Signed in with google.')
})
.catch((err) => console.log('error while signing in with Google:', err))
}
return (
)
}
Любая помощь приветствуется
Подробнее здесь: https://stackoverflow.com/questions/613 ... e-firebase