Google auth fails on standalone android app

I am trying to implement google oauth with expo.it works perfectly on Expo but when i compile to apk. Once I click on google-login it opens a pop-up then i select my email after that it opens back my login screen again which is wrong.
here is my code below

export async function signInWithGoogleAsync() {
  try {
    const result = await Expo.Google.logInAsync({
      androidClientId: ' ',
      iosClientId: ' ',
      androidStandaloneAppClientId: ' ',
      iosStandaloneAppClientId: ' ',
      webClientId: ' ',
      scopes: ['profile', 'email']
    });

    if (result.type === 'success') {
      this.props.navigation.navigate('Home')
    } else {
      alert('authentication failed')
    }
  } catch (e) {
   alert('authentication failed')
    
  }
}

1 Like

Hello @linux08, have you followed the instructions here: https://docs.expo.io/versions/latest/sdk/google.html#deploying-to-a-standalone-app-on-android ?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.