Google Sign-In in Flutter: Step-by-Step Guide (2026)
1 May 2026 · 7 min read
Add Google Sign-In to your Flutter app in under 30 minutes. Complete step-by-step guide covering Firebase setup, SHA-1 configuration, and handling auth state — with working code for Android and iOS.
Google Sign-In is the fastest way to add authentication to a Flutter app. Users tap one button, select their Google account, and they're in — no passwords, no OTP, no friction. This guide walks you through the complete setup for both Android and iOS, including the Firebase configuration that trips up most developers.
What You'll Need
- ▸Flutter 3.x project (Android + iOS)
- ▸Firebase project (free tier works)
- ▸Google Cloud project (auto-created with Firebase)
- ▸Android Studio or Xcode for platform configuration
Step 1 — Set Up Firebase
Go to console.firebase.google.com and create a new project, or select an existing one. Enable Google as a sign-in provider under Authentication → Sign-in method → Google → Enable. Download the google-services.json for Android and GoogleService-Info.plist for iOS.
Step 2 — Add Dependencies
In your pubspec.yaml, add: firebase_core, firebase_auth, and google_sign_in. Run flutter pub get after saving. These three packages handle everything — Firebase initialisation, authentication state, and the Google OAuth flow.
Step 3 — Configure Android (SHA-1 is Critical)
This is where most developers get stuck. Open Android Studio → Gradle panel → your app → Tasks → android → signingReport. Copy the SHA-1 fingerprint and add it to your Firebase project under Project Settings → Your apps → Android app → Add fingerprint. Without this, Google Sign-In silently fails on Android.
Step 4 — Configure iOS
Add your GoogleService-Info.plist to the Xcode project (drag into Runner folder, tick 'Copy if needed'). In Info.plist, add a URL scheme using your REVERSED_CLIENT_ID from the plist file. This is what allows Google's OAuth redirect to return to your app.
Step 5 — Implement the Sign-In Logic
Create a signInWithGoogle function: initialise GoogleSignIn, call signIn() to trigger the account picker, get GoogleSignInAuthentication, create a GoogleAuthProvider credential, and sign in to Firebase with signInWithCredential. Wrap in try-catch for error handling. Listen to authStateChanges stream to reactively update your UI when auth state changes.
Step 6 — Handle Sign-Out
Always sign out from both GoogleSignIn and FirebaseAuth. Calling only FirebaseAuth.signOut() leaves the Google session active, so the next sign-in skips the account picker — which frustrates users who want to switch accounts.
Common Errors and Fixes
- ▸PlatformException SIGN_IN_FAILED: Missing or incorrect SHA-1 in Firebase console
- ▸ApiException 10: google-services.json is outdated — re-download after adding SHA-1
- ▸iOS redirect fails: REVERSED_CLIENT_ID URL scheme not added to Info.plist
- ▸Null user after sign-in: AuthCredential not passed to signInWithCredential
Need Help with Flutter Authentication?
Saurabh Infosys builds Flutter apps for clients across India, UK, and the Gulf. If you're building a consumer app and want authentication, onboarding, and backend integration handled properly, reach out — we typically scope Flutter MVPs in 2 weeks.
Want to implement this for your business?
Saurabh Infosys builds AI automation, AI-enabled apps, and MVPs for Indian businesses. Let's talk about your project.