How do I fix RN GoogleSignin module linking.
I got this solved by just installing pos for the same:
Step 1: Goto the ios folder inside the app, Check for the pod file it must be having a line
pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'
if it is not pleased run the command :
react-native link,
The above line will appear.
Step 2: Now run the following command.
pod install
For IOS,Please add this in your Pod file and do pod install before run-ios:
pod 'RNGoogleSignin', :path => '../node_modules/@react-native-community/google-signin'
I faced similar issue while manually upgrading react native from 0.59.9 to 0.62.2. I have also uninstalled react-native-google-signin and installed @react-native-community/google-signin before making Pod File change.
I gave up on THE react googlesignin stuff after 2 days of tinkering.. I just followed the firebase guide and expo guide and everything works.
Expo google login gets the credentials then firebase checks the crednetials and logs you in.
if you are doing a firebase googlelogin thing and you already have firebase setup you can do something
googleLogin = async () => {
try {
const result = await Expo.Google.logInAsync({
androidClientId: "Your Client ID",
//iosClientId: YOUR_CLIENT_ID_HERE, <-- if you use iOS
scopes: ["profile", "email"]
})
if (result.type === "success") {
const credential = firebase.auth.GoogleAuthProvider.credential(result.idToken, result.accessToken);
firebase.auth().signInAndRetrieveDataWithCredential(credential).then(function(result){
console.log(result);
});
this.props.navigation.navigate('Where you want to go');
} else {
console.log("cancelled")
}
} catch (e) {
console.log("error", e)
}
}