Skip to content

Firebase Google Login on Web

The Capacitor Social Login plugin does not support web platforms. For web applications, you should use Firebase’s built-in Google Sign-In directly, which provides a more reliable popup-based authentication flow.

The Capacitor Social Login plugin is designed for native mobile platforms (Android and iOS) where it can leverage platform-specific authentication flows. For web, Firebase’s native signInWithPopup method is:

  • ✅ More reliable and better supported
  • ✅ Handles browser session storage automatically
  • ✅ Provides better error handling
  • ✅ No additional configuration needed
  1. Configure Firebase Project

    Ensure your Firebase project has Google Sign-In enabled:

    • Go to Firebase Console
    • Navigate to Authentication > Sign-in method
    • Enable Google Sign-In provider
  2. Add your authorized domains

    1. Go to your project overview over at console.cloud.google.com Firebase Project Overview
    2. Open the Authentication menu Firebase Authentication Menu
    3. Click on the Settings button Firebase Authentication Sign-in Method Button
    4. Setup the Authorized domains Firebase Authentication Settings Authorized Domains

See the authUtils.ts file in the example app for a complete implementation that:

  • Uses Firebase’s signInWithPopup for web platforms
  • Uses Capacitor Social Login plugin for Android/iOS platforms
  • Handles platform detection automatically

The example shows how to conditionally use Firebase’s built-in method for web while using the plugin for native platforms.

Keep going from Firebase Google Login on Web

Section titled “Keep going from Firebase Google Login on Web”

If you are using Firebase Google Login on Web to plan authentication and account flows, connect it with Using @capgo/capacitor-social-login for the native capability in Using @capgo/capacitor-social-login, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and Two-factor authentication for the implementation detail in Two-factor authentication.