Firebase Google Sign In Configuration Steps

Aug 12, 2024

Google Sign In Configuration with Firebase

Overview

  • Configuring Google Sign In package and Google Firebase Console.

Steps to Configure Google Sign In

1. Setting Up Google Sign In Library

  • Go to Firebase Console.
    • Navigate to Authentication > Social OAuth > Google.
  • Use the Google Sign In library.
  • Copy the installation command: npx Expo install ....
  • Terminate the current project and paste the installation command in the terminal.

2. Adding Plugins to JSON

  • Copy the necessary plugins from the documentation.
  • Open app.json and paste the plugins below the existing ones.
  • Note: Add a comma after the last entry.

3. Creating a Firebase Project

  • Navigate to firebase.google.com.
  • Log in and click Get Started > Create a Project.
    • Name the project (e.g., 222 Registration Form).
    • Remove any underscores in the name.
    • Set location to Philippines and create the project.

4. Setting Up Android App in Firebase

  • After project creation, select Create a Firebase App for Android.
  • Enter the Android package name (copy from google-services.json).
    • Nickname is optional.
  • Use EAS for the debug signing certificate.
  • Check EAS account and set up a new keystore.
  • Wait for credential generation; press any key to continue.
  • Copy the generated SHA1 fingerprint and paste it into Firebase registration.

5. Downloading Google Services JSON

  • After registration, download google-services.json.
  • Copy and paste it into the project folder.
  • Ensure it’s named correctly: google-services.json.

6. Enabling Authentication Methods

  • In Firebase, navigate to Build > Authentication.
  • Enable authentication methods (Google, Facebook, Twitter, etc.).
    • Select Google as the provider and enable it.
    • Set the project support email and save changes.

7. Updating App.json

  • Copy the required settings for the app.json file from Firebase.
  • Open app.json, paste the settings inside the Android section.
    • Include a comma where necessary.

8. Installing Firebase Libraries

  • Terminate the terminal command.
  • Install React Native Firebase libraries.
    • Search for the npm package for react-native-firebase/auth and react-native-firebase/app.
  • Copy and paste installation commands in the terminal.

9. Rebuilding the Application

  • Create a development build to include the Firebase libraries.
  • Monitor build status; expect up to 20 minutes for the process.
    • Note: Free plan users may face longer build times.
  • Track usage of builds and concurrent tasks in Expo account settings.

10. Running the Project

  • Install and run on an emulator.
  • Use command: npx Expo start Dev client.

Next Steps

  • In the next video, add Google Sign In implementation steps.