Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Get email from userInfo from react-native-community/google-signin after sign in and store it in a string?

$
0
0

Hello I have implemented the following code into my app to handle firebase authentication with google signin:

GoogleSignIn = async () => {try {await GoogleSignin.hasPlayServices(); userInfo = await GoogleSignin.signIn();this.setState({ userInfo });} catch (error) {if (error.code === statusCodes.SIGN_IN_CANCELLED) {  // user cancelled the login flow} else if (error.code === statusCodes.IN_PROGRESS) {  // operation (e.g. sign in) is in progress already} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {  // play services not available or outdated} else {  // some other error happened    }   }  };  getCurrentUser = async () => {  const currentUser = await GoogleSignin.getCurrentUser();  this.setState({ currentUser });};

Is there any way I can store the users email from userInfo into a string for later use? Thank you!


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>