Skip to content

@clerk/expo: add a googleSignIn opt-out flag (ClerkGoogleSignIn pod is unconditionally linked) #8975

Description

@MrJune15

Summary

@clerk/expo ships a separate ClerkGoogleSignIn.podspec that hard-declares s.dependency 'GoogleSignIn', '~> 9.0'. Because Expo autolinking discovers all podspecs in @clerk/expo/ios/, the Google Sign-In native module — and its transitive chain GoogleSignIn → AppCheckCore → GoogleUtilities + RecaptchaInterop — is compiled into every iOS build, even for apps that never use Google sign-in.

The config plugin (@clerk/expo/app.plugin.js) gates appleSignIn (withClerkExpo(config, { appleSignIn })) and other features, but provides no equivalent flag to disable Google sign-in. Its Google logic only adds an Info.plist URL scheme when EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME is set; the native module/pod itself is always linked.

Why this matters

AppCheckCore is a Swift pod depending on GoogleUtilities and RecaptchaInterop, which don't define modules. With static linking (the Expo SDK 55 default) pod install fails:

The Swift pod `AppCheckCore` depends upon `GoogleUtilities` and `RecaptchaInterop`,
which do not define modules. To opt into those targets generating module maps ...
you may set `use_modular_headers!` globally, or specify `:modular_headers => true`
for particular dependencies.

Consumers who don't use Google sign-in are forced to either add expo-build-properties modular_headers workarounds or carry unused SDKs (extra binary size, an extra third-party SDK in the supply chain, and a higher iOS deployment floor).

Request

Add a googleSignIn prop to the config plugin, symmetric with appleSignIn, e.g.:

[
  "@clerk/expo",
  { "appleSignIn": false, "googleSignIn": false }
]

When googleSignIn: false, exclude ClerkGoogleSignIn (and therefore the GoogleSignIn pod chain) from autolinking on iOS, so apps not using Google sign-in don't compile or ship it.

Environment

  • @clerk/expo 3.2.14
  • Expo SDK 55 / React Native 0.83 (New Architecture, static linking)

Current workaround

[
  "expo-build-properties",
  { "ios": { "extraPods": [
    { "name": "GoogleUtilities", "modular_headers": true },
    { "name": "RecaptchaInterop", "modular_headers": true }
  ] } }
]

This makes the build pass but still compiles and ships the unused Google Sign-In SDK.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions