google-signin icon indicating copy to clipboard operation
google-signin copied to clipboard

[ANDROID] accountName option not work

Open tastafur opened this issue 3 years ago • 1 comments

Either I do not understand how this property works or it is not working, I specify an email as in loginHint to filter or use to log in but it always gives me a DEVELOPER_ERROR error when it matches the correct account but if it does not match it tells me ACCOUNT_INVALID This config example

GoogleSignin.configure({
        accountName: '[email protected]',
        loginHint: '[email protected]',
        webClientId:
          Platform.OS === 'ios'
            ? configBase.IOS_GOOGLE_SIGN_IN
            : configBase.ANDROID_GOOGLE_SIGN_IN,
      });

https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#public-googlesigninoptions.builder-setaccountname-string-accountname

tastafur avatar Aug 25 '21 13:08 tastafur

This is why you are getting DEVELOPER_ERROR error and the solution is.

https://github.com/react-native-google-signin/google-signin/blob/master/docs/android-guide.md#google-login-does-not-work-when-using-internal-app-sharing

ahmedfeyzi avatar May 31 '22 07:05 ahmedfeyzi

Hello and thanks for reporting, DEVELOPER_ERROR is something you need to solve yourself, as commented above

ACCOUNT_INVALID is given when the account provided in accountName is not present on the device

Thank you 🙂

vonovak avatar May 24 '23 09:05 vonovak