Google OAuth error "you must specify ClientId for GIDSignIn" in ejected IOS simulator


Okay, I know this issue has come up a ton so I’m just looking for a little direction since I’ve searched practically every thread and tried every solution to get this working. The app is created in create-react-native-app and uses a node.js backend and PGSQL server, not that any of that should matter… I have this function that is called on button press in my login component:

_GoogleSignInAsync = async () => {
        try {
            const result = await Expo.Google.logInAsync({
              iosClientId: "",
              scopes: ['profile', 'email'],
            if (result.type === 'success') {
                  signedIn: true,
                  photoURL: result.user.photoUrl
            } else {
          } catch(e) {

which I copied from expo’s documentation. I then proceeded to “expo eject” my project because I saw that the error could be from expo not being able to connect to google’s API server in the first place. Which I predict might be true, because before I ejected the button would simply not do anything - now that it’s ejected and I’m running the simulator through XCode it throws an error:

Exception 'You must specify |clientID| for |GIDSignIn|' was thrown while invoking logInAsync on target ExponentGoogle with params (
behavior = system;
scopes = (

My app.json looks like:

  "expo": {
    "name": "nativesolemate",
    "description": "This project is really great.",
    "slug": "nativesolemate",
    "privacy": "public",
    "sdkVersion": "30.0.0",
    "platforms": [
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    "updates": {
      "fallbackToCacheTimeout": 0
    "assetBundlePatterns": [
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "SoleMateIOS",
      "publishBundlePath": "ios/nativesolemate/Supporting/shell-app.bundle",
      "publishManifestPath": "ios/nativesolemate/Supporting/shell-app-manifest.json"
    "isDetached": true,
    "detach": {
      "iosExpoViewUrl": "",
      "androidExpoViewUrl": ""
    "scheme": "exp64ed007d25db40ae8496b69aa354ab61",
    "android": {
      "package": "",
      "publishBundlePath": "android/app/src/main/assets/shell-app.bundle",
      "publishManifestPath": "android/app/src/main/assets/shell-app-manifest.json"

Here’s the real catch: on the google documentation for implementing this ( it says to send your request in this way, keep in mind I don’t code in C, nor have I ever used CocoaPods:

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GIDSignIn sharedInstance].clientID = @"YOUR_CLIENT_ID";
  [GIDSignIn sharedInstance].delegate = self;

  return YES;

So the closest thing in my compiled IOS files, I find a document labeled EXGoogle.m in Pods folder. I found the code:

-(void)systemLogInWithIosClientId:(NSString *)clientId
                      webClientId:(NSString *)webClientId
                           scopes:(NSArray<NSString *> *)scopes
  [GIDSignIn sharedInstance].delegate = self;
  [GIDSignIn sharedInstance].uiDelegate = self;
  [GIDSignIn sharedInstance].clientID = @"";
  if (webClientId != nil) {
    [GIDSignIn sharedInstance].serverClientID = webClientId;
  [GIDSignIn sharedInstance].scopes = scopes;
  [GIDSignIn sharedInstance].shouldFetchBasicProfile = YES;
  [[GIDSignIn sharedInstance] signIn];

Which seemed like where I was supposed to insert the ClientID I got form google although in the snippet I posted I went ahead and added the literal clientID, and before it was:

[GIDSignIn sharedInstance].clientID = clientID

I think I’m doing this right, but clearly I’m missing some reference point, don’t have some package installed, didn’t eject properly, or something. I hate to make y’all troubleshoot this but can someone give me a little headway?

Thanks y’all


Mark this as fixed, it was actually a fault of something which I can’t figure out, but when I undid my eject, and tried running it in Expo simulator again, the login miraculously worked. Weird…

closed #3

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