Google-signin: [iOS] Google accounts that are signed in on devices aren't showing

Created on 19 Feb 2020  路  1Comment  路  Source: react-native-google-signin/google-signin


After migrating from v2 to v3, already logged-in users are not showing in the google sign in screen.

Steps to Reproduce

  • Migrate from v2 to v3 version
  • Set google sign in configurations like this
    GoogleSignin.configure({ webClientId: config.webClientId, offlineAccess: false, hostedDomain: '', accountName: '', });
  • Try google sign in

Expected Behavior

If there are any already logged-in users, Google sign in page should be opened with already logged-in users.

Actual Behavior

Every time it's asking sign in consent screen(meaning that we have enter email and password) even if user is already logged in.

Environment

Please provide

  • react-native version : 0.61.4
  • @react-native-community/google-signin version : 3.0.4
  • version of iOS : 13
  • OS : iOS

Most helpful comment

After couple of hours of investigation found that it was because of Google sign in configurations.

In our code we had like this for sign-in configurations:
GoogleSignin.configure({ webClientId: config.webClientId, offlineAccess: false, hostedDomain: '', accountName: '', });

'hostendDomain' configuration was always empty. This code working fine in v2 version. But after migrating to v3, we started issue like the above one.

To fix this, we have removed 'hostendDomain' configuration from the list :
GoogleSignin.configure({ webClientId: config.webClientId, offlineAccess: false, accountName: '', });

After this change it started showing already signed users.

Thanks for such a wonderful library!

IMG_FADDF35B5DA4-1

>All comments

After couple of hours of investigation found that it was because of Google sign in configurations.

In our code we had like this for sign-in configurations:
GoogleSignin.configure({ webClientId: config.webClientId, offlineAccess: false, hostedDomain: '', accountName: '', });

'hostendDomain' configuration was always empty. This code working fine in v2 version. But after migrating to v3, we started issue like the above one.

To fix this, we have removed 'hostendDomain' configuration from the list :
GoogleSignin.configure({ webClientId: config.webClientId, offlineAccess: false, accountName: '', });

After this change it started showing already signed users.

Thanks for such a wonderful library!

IMG_FADDF35B5DA4-1

Was this page helpful?
0 / 5 - 0 ratings