Google re-Login issue with iOS standalone app

I’m currently using expo SDK 38 and I encounter the following issues whenever I re-login to the app using expo-google-sign-in.

IMG_6912

IMG_6911

Note:

  • For iOS, it works fine whenever I start the app from fresh but it doesn’t work whenever I try to re-login with expo-google-sign-in.
  • It works fine on Android.

Hey @jacktiong92,

Can you share all the relevant code here? It’s hard to debug an issue without being able to see the source.

Cheers,
Adam

Hi @adamjnav, sure thing.

LoginScreen.js

import * as GoogleSignIn from 'expo-google-sign-in';

componentDidMount() {
    this.initAsync();
}

initAsync = async () => {
    await GoogleSignIn.initAsync({
        // You may ommit the clientId when the firebase `googleServicesFile` is configured
        //clientId: '<YOUR_IOS_CLIENT_ID>',
    });
};

googleButtonOnPress = async () => {
    try {
        await GoogleSignIn.askForPlayServicesAsync();

        const { type, user } = await GoogleSignIn.signInAsync();

        if (type === 'success') {
            // Google Login
        }
    } catch ({ message }) {
        alert('login: Error:' + message);
    }
}

Basically these are the source code that I used to implement the Google Login feature. It works totally fine for Android. However, for iOS, it works fine everytime the app is being started from fresh but it hits the error when I log out from the app (without killing the app) and log back in via Google login.

Thank you.
Best Regards,
Jack Tiong

Hi @adamjnav, are you able to simulate this issue?