Skip to main content

Google Login in React Native with Firebase

ยท 4 min read
Full Stack Developer
Last updated on May 6, 2026

react native google login

Google Login reduces onboarding friction because many users already have a Google account on their phone. In React Native, the reliable pattern is to let a native Google Sign-In library collect the Google identity token, then pass that token to Firebase Authentication.

Quick Answerโ€‹

For React Native apps that use Firebase:

  1. Configure Firebase for iOS and Android.
  2. Enable Google as a Firebase Auth provider.
  3. Add Android SHA fingerprints to Firebase.
  4. Install @react-native-firebase/auth.
  5. Install @react-native-google-signin/google-signin.
  6. Request a Google ID token.
  7. Create a Firebase Google credential.
  8. Sign in with auth().signInWithCredential.

For the shared Firebase setup, start here:

Install Dependenciesโ€‹

yarn add @react-native-firebase/app @react-native-firebase/auth
yarn add @react-native-google-signin/google-signin
cd ios && pod install

The Google Sign-In package has two tracks: Universal Sign In and Original Google Sign In. Universal Sign In is the forward-looking API, while many existing apps still use Original Google Sign In. Pick the path that matches your app and read the package documentation before shipping.

Mega Bundle Sale is ON! Get ALL of our React Native codebases at 90% OFF discount ๐Ÿ”ฅ

Get the Mega Bundle

Firebase Setupโ€‹

In Firebase Console:

  1. Open Authentication.
  2. Go to Sign-in method.
  3. Enable Google.
  4. Confirm your app has the correct iOS bundle ID and Android package name.
  5. Add Android SHA-1 and SHA-256 fingerprints for every signing key you use.
  6. Download updated GoogleService-Info.plist and google-services.json files.

Most Android DEVELOPER_ERROR or code 10 issues come from a mismatch between the installed app, the signing key, and the OAuth client configured in Firebase or Google Cloud.

Sign in with Google and Firebaseโ€‹

This example uses the Original Google Sign-In API because it is still common in existing React Native codebases:

import auth from '@react-native-firebase/auth';
import {
GoogleSignin,
isSuccessResponse,
} from '@react-native-google-signin/google-signin';

GoogleSignin.configure({
webClientId: 'YOUR_FIREBASE_WEB_CLIENT_ID',
});

export async function signInWithGoogle() {
await GoogleSignin.hasPlayServices({
showPlayServicesUpdateDialog: true,
});

const response = await GoogleSignin.signIn();

if (!isSuccessResponse(response)) {
return null;
}

const { idToken } = response.data;

if (!idToken) {
throw new Error('Google Sign-In failed: missing idToken');
}

const googleCredential = auth.GoogleAuthProvider.credential(idToken);

return auth().signInWithCredential(googleCredential);
}

Use the Web client ID from Firebase, not the Android client ID. On iOS, confirm that GoogleService-Info.plist is included in the target and that the reversed client ID URL scheme is configured.

Sign Out Correctlyโ€‹

Firebase sign-out and Google sign-out are different operations. Clear both if you want the next login to show the account picker again.

export async function signOutGoogleUser() {
await auth().signOut();
await GoogleSignin.signOut();
}

If your product needs account deletion, revoke access and clean up backend data according to your privacy policy.

Production Checklistโ€‹

  • Enable Google in Firebase Auth.
  • Use the correct web client ID.
  • Add debug, release, CI, and Play App Signing fingerprints.
  • Test iOS and Android release builds, not only debug builds.
  • Link credentials when users can sign in with email, Apple, phone, or Facebook.
  • Store the app user profile in Firestore after Firebase Auth succeeds.
  • Keep social login buttons hidden until their provider setup is complete.

Useful Referencesโ€‹

Looking for a custom mobile application?

Our team of expert mobile developers can help you build a custom mobile app that meets your specific needs.

Get in Touch

Conclusionโ€‹

Google Login is straightforward when Firebase, Google Cloud, and the installed native app all point to the same project and signing keys. Most production bugs come from configuration drift, so keep your Firebase files, OAuth client IDs, and SHA fingerprints versioned in your release checklist.