Set up authentication using Google Sign-In

January 8, 2026 ยท View on GitHub

Android

  1. Add google.com to the providers configuration array.
  2. Add the following project variable to your variables.gradle file (usually android/variables.gradle):
    ext {
    +    rgcfaIncludeGoogle = true
    +    androidxCredentialsVersion = '1.3.0'
    }
    
    Run npx cap update to update the native plugins and dependencies.
  3. Specify your app's SHA-1 fingerprint from the Settings page of the Firebase console. Refer to Authenticating Your Client for details on how to get your app's SHA-1 fingerprint.
  4. Enable Google Sign-In in the Firebase console:
    1. Open the Auth section in the Firebase console.
    2. Open the Sign-in method tab and enable Google Sign In.

iOS

  1. Add google.com to the providers configuration array.

  2. If you are using CocoaPods for your iOS project, add the CapacitorFirebaseAuthentication/Google pod to your Podfile (usually ios/App/Podfile):

    target 'App' do
      capacitor_pods
      # Add your Pods here
    +  pod 'CapacitorFirebaseAuthentication/Google', :path => '../../node_modules/@capgo/capacitor-firebase-authentication'
    end
    

    Attention: Do not add the pod in the section def capacitor_pods, but under the comment # Add your Pods here (example).

    Run npx cap update to update the native plugins and dependencies.

  3. If you are using Swift Package Manager for your iOS project, the GoogleSignIn dependencies are already included by default. No additional configuration is needed for the package dependencies.

  4. If you are using CocoaPods for your iOS project, add the following post install script to your Podfile (usually ios/App/Podfile) to disable code signing for bundles:

    post_install do |installer|
        installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
                if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
                    target.build_configurations.each do |config|
                        config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
                    end
                end
            end
        end
    end
    

    (See here for more information.)

  5. Add custom URL schemes to your Xcode project:

    1. Open your project configuration. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
    2. Click the + button, and add a URL scheme for your reversed client ID. You find this value in your GoogleService-Info.plist configuration file. Look for the REVERSED_CLIENT_ID key and paste the value of that key into the URL Schemes box on the configuration page. Leave the other fields blank.

Web

  1. See Before you begin and follow the instructions to configure and enable sign-in with Google correctly.