We have built a react-native app that uses Google sign on.
We use react-native-google-signin
and publish an ios and android app.
Login works 100% of the time in the android app. It works on ios app aswell, except for some organisations using G Suites. For these organisations I get the famous admin_policy_enforced
error.
Where I run the app (simulator or device) doesn't seem to impact the testing, but for the sake of being exhaustive: My ios app is installed on my iphone using flightcenter and we use the autosigining option for Xcode when publishing it.
I managed to reproduce that by playing around with my google organisation's settings:
- I used my organisation which has an Apple Push Certificate.
- ‘Mobile Management’ is enabled with ‘Advanced’ settings for iOS
The fact that I have done the following extra things doesn’t seem to solve it :
- Download the certificate on my device.
- Install the Google Device Policy App
- Whitelisting the app in google admin 1.
The signin starts working when the iOS mobile management setting is set to basic.
Last point, regarding the scopes, I am using the default ones: email and profile.
I'm happy to add more config or code snippets if needed.