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!