Set up authentication using Google Sign-In
January 8, 2026 ยท View on GitHub
Android
- Add
google.comto theprovidersconfiguration array. - Add the following project variable to your
variables.gradlefile (usuallyandroid/variables.gradle):
Runext { + rgcfaIncludeGoogle = true + androidxCredentialsVersion = '1.3.0' }npx cap updateto update the native plugins and dependencies. - 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.
- Enable Google Sign-In in the Firebase console:
- Open the Auth section in the Firebase console.
- Open the Sign-in method tab and enable Google Sign In.
iOS
-
Add
google.comto theprovidersconfiguration array. -
If you are using CocoaPods for your iOS project, add the
CapacitorFirebaseAuthentication/Googlepod to yourPodfile(usuallyios/App/Podfile):target 'App' do capacitor_pods # Add your Pods here + pod 'CapacitorFirebaseAuthentication/Google', :path => '../../node_modules/@capgo/capacitor-firebase-authentication' endAttention: Do not add the pod in the section
def capacitor_pods, but under the comment# Add your Pods here(example).Run
npx cap updateto update the native plugins and dependencies. -
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.
-
If you are using CocoaPods for your iOS project, add the following post install script to your
Podfile(usuallyios/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.)
-
Add custom URL schemes to your Xcode project:
- Open your project configuration. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
- Click the + button, and add a URL scheme for your reversed client ID.
You find this value in your
GoogleService-Info.plistconfiguration file. Look for theREVERSED_CLIENT_IDkey and paste the value of that key into the URL Schemes box on the configuration page. Leave the other fields blank.
Web
- See Before you begin and follow the instructions to configure and enable sign-in with Google correctly.