react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.12k stars 877 forks source link

My app shows google login panel, I changed the email and client Id in the code then get this error. #1284

Closed vishuk570 closed 1 month ago

vishuk570 commented 1 month ago

Error is : {"nativeStackAndroid":[],"userInfo":null,"message":"A non-recoverable sign in failure occurred","code":"12500"}<!--

code was working fine before change client ID:

code is here: ` const googleSignIN = () => { GoogleSignin.configure({ androidClientId: CLIENT_ID });

    GoogleSignin.hasPlayServices().then((hasPlayService) => {
        if (hasPlayService) {
            GoogleSignin.signIn().then(async (userInfo) => {
                console.log("userInfo", JSON.stringify(userInfo.user))
                setLoading(true);
                const social_Login_Data = {
                    email: userInfo.user.email,
                    name: userInfo.user.name
                }
                console.log("social_Login_Data : ", social_Login_Data);
                try {
                    const res = await api.post(`/Auth/login-single-signin`, social_Login_Data);
                    console.log("response : ", res.data);
                    if (res.data.ack === 1) {
                        console.log('success');
                        navigation.navigate('DrawerNavigation')
                    } else {
                        setItem('social_Login_Data', JSON.stringify(social_Login_Data))
                        navigation.navigate('VerifyEmail',{msg:res.data.message})
                    }
                    setLoading(false);
                } catch (e) {
                    setLoading(false);
                    alert(e)
                }
            }).catch((e) => {
                setLoading(false);
                console.log("ERROR IS1: " + JSON.stringify(e));
            })
        }
    }).catch((e) => {
        console.log("ERROR IS2: " + JSON.stringify(e));
    })
}`

Please help if anyone got this type error
vonovak commented 1 month ago

Hello and thanks for reporting,

code was working fine before change client ID

this means something outside of the library has changed that caused it to stop working. This is not an issue with this lib.

Thank you 🙂