Skip to main content

Expo setup

This library uses native code (Nitro + Google Sign-In SDK). It does not run in Expo Go.

Required: development build

Why: Expo Go does not include this native module. You need a development build with expo-dev-client.

Google Cloud & config files

Expo uses the same google-services.json and GoogleService-Info.plist as bare React Native. See Google Cloud & config files for OAuth, Firebase download, SHA-1, and file paths.

Quick checklist

StepWhy
expo-dev-clientRequiredCustom native binary with Nitro modules
Config plugin in app.configRequiredWires native Google Sign-In + URL scheme
googleServicesFile pathsRequired for autoDetectPlugin copies JSON/plist and applies Android Gradle
expo prebuildRequired after native config changesGenerates ios/ / android/ with plugin output
expo run:ios / expo run:androidRequiredRebuilds dev client (not Metro-only refresh)
Manual Gradle editsOptionalPlugin applies Google Services for you
AppDelegate handle(url) after prebuildOptionalOnly if redirect stalls or multiple URL handlers
iosUrlScheme without FirebaseRequired (if no plist)Plugin needs reversed client ID for iOS redirect

Install

bun add react-native-nitro-google-signin react-native-nitro-modules expo-dev-client

Config plugin

Required

Why: Without the plugin, Expo projects lack Google Services Gradle setup, plist/json copy paths, and the iOS URL scheme.

Add to app.json or app.config.js, then run prebuild.

Required for autoDetect

Why: Plugin copies config files, applies Google Services Gradle plugin on Android, and registers REVERSED_CLIENT_ID as the iOS URL scheme — same as bare RN automation.

Place google-services.json and GoogleService-Info.plist in your project root (or paths you reference in app.config), then point the plugin at them:

Firebase — Android and iOS config files

Firebase — GoogleService-Info.plist

{
"expo": {
"plugins": ["react-native-nitro-google-signin"],
"android": {
"googleServicesFile": "./google-services.json"
},
"ios": {
"googleServicesFile": "./GoogleService-Info.plist"
}
}
}

Or pass paths in plugin options:

{
"expo": {
"plugins": [
[
"react-native-nitro-google-signin",
{
"iosGoogleServicesFile": "./GoogleService-Info.plist",
"androidGoogleServicesFile": "./google-services.json"
}
]
]
}
}
Optional: skip manual Gradle on Android

Why: You do not need a separate Google Sign-In npm package or hand-edited build.gradle when googleServicesFile is set — the Expo config plugin applies com.google.gms.google-services at prebuild.

Without Firebase (manual iOS URL scheme)

Optional Android path

Why: On Android without google-services.json, use an explicit webClientId in configure() instead of 'autoDetect'. SHA-1 is still required.

Required on iOS without plist

Why: The plugin must register a URL scheme. Without GoogleService-Info.plist, pass iosUrlScheme explicitly.

{
"expo": {
"plugins": [
[
"react-native-nitro-google-signin",
{
"iosUrlScheme": "com.googleusercontent.apps.YOUR_IOS_CLIENT_ID"
}
]
]
}
}

iOS AppDelegate after prebuild

Optional

Why optional: The config plugin registers the URL scheme only. Add GIDSignIn.sharedInstance.handle(url) if interactive sign-in does not return after Safari, or you integrate Facebook / other openURL handlers — see iOS setup — AppDelegate.


Prebuild and run

Required after plugin or config file changes

Why: Native projects are generated at prebuild time; Metro alone cannot apply Gradle or URL scheme changes.

bunx expo prebuild --clean
bunx expo run:ios
bunx expo run:android

Example app

Optional

Why: Reference only — see monorepo example-expo for app.config.js and GoogleOneTapSignIn.configure({ webClientId: 'autoDetect' }).


Troubleshooting

IssueFix
TurboModule / Nitro not foundRebuild dev client after prebuild
Plugin throws missing iosUrlSchemeAdd Firebase plist paths or iosUrlScheme
default_web_client_id missinggoogle-services.json package must match expo.android.package
iOS sign-in stuck after browserAdd GIDSignIn.sharedInstance.handle(url) in generated AppDelegate

See Troubleshooting.