AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Firebase Flutter Setup

skill-iml1s-flutter-claude-skills-firebase-flutter-setup · by ImL1s

Set up Firebase Authentication (Google Sign-In), AdMob, and RevenueCat IAP for Flutter Android apps. Use when enabling Firebase Auth providers, configuring Google Sign-In with OAuth clients, adding AdMob ad units, or integrating RevenueCat subscriptions. Covers the exact GCP console steps, SHA-1 registration, Gradle plugin setup, and real-device testing gotchas. Triggers on keywords like "Firebas…

No reviews yet
0 installs
29 views
0.0% view→install

Install

$ agentstack add skill-iml1s-flutter-claude-skills-firebase-flutter-setup

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-iml1s-flutter-claude-skills-firebase-flutter-setup)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Firebase Flutter Setup? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Firebase + AdMob + RevenueCat Setup for Flutter

Prerequisites

  • Firebase project created (firebase projects:create or Console)
  • Billing account linked (gcloud billing projects link --billing-account=)
  • flutterfire CLI installed (dart pub global activate flutterfire_cli)
  • Debug keystore SHA-1 fingerprint obtained

Step 1: Get SHA-1 Fingerprint

# Windows (Chinese locale will mislabel — MD5 line is actually SHA-1)
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android

# Verify: SHA-1 = 20 bytes (40 hex chars with colons = 59 chars)
# SHA-256 = 32 bytes (64 hex chars with colons = 95 chars)

> [!CAUTION] > Chinese locale keytool mislabels fingerprints — the line labeled "MD5" is actually SHA-1 (20 bytes), and "SHA1" is actually SHA-256 (32 bytes). Always verify by byte count.

Step 2: Configure Firebase + FlutterFire

# Initialize Identity Platform (required for Google Sign-In)
gcloud services enable identitytoolkit.googleapis.com --project=

# Run flutterfire
flutterfire configure --project= --platforms=android \
  --android-package-name= --yes

# Register SHA-1 via REST API (firebase CLI sha:create often fails)
ACCESS_TOKEN=$(gcloud auth print-access-token)
curl -X POST \
  "https://firebase.googleapis.com/v1beta1/projects//androidApps//sha" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"shaHash":"","certType":"SHA_1"}'

Step 3: Google Sign-In — The 3 OAuth Clients

> [!IMPORTANT] > Google Sign-In requires 3 things in GCP, not just 1. Missing any one causes ApiException: 10 (DEVELOPER_ERROR).

Required OAuth Clients in GCP

| Type | Purpose | How to Create | |------|---------|---------------| | Web Client | Provides serverClientId for ID token exchange | GCP Console → Auth Platform → Clients → Web | | Android Client | Matches SHA-1 + package name for device auth | GCP Console → Auth Platform → Clients → Android | | OAuth Consent Screen | Must exist (External for personal accounts) | GCP Console → Auth Platform → Branding |

Why CLI/API Often Fails

  • gcloud and IAP API for creating OAuth consent screens requires a GCP Organization — personal accounts must use the Console UI
  • firebase apps:android:sha:create CLI command frequently fails — use REST API instead
  • OAuth client creation via API also requires Organization — use browser automation for personal accounts

Code Configuration

> [!WARNING] > The code below uses googlesignin v6 API which is outdated. > For v7+ usage (with initialize() + authenticationEvents stream), see the flutter-social-login skill.

// auth_provider.dart (v6 — DEPRECATED, use flutter-social-login skill for v7+)
final googleUser = await GoogleSignIn(
  serverClientId: '.apps.googleusercontent.com',  // Web, NOT Android
).signIn();
// google-services.json — add oauth_client with Web client
"oauth_client": [
  {
    "client_id": ".apps.googleusercontent.com",
    "client_type": 3
  }
]

Enable Provider in Firebase

# Update Google Sign-In provider with real OAuth credentials
curl -X PATCH \
  "https://identitytoolkit.googleapis.com/admin/v2/projects//defaultSupportedIdpConfigs/google.com?updateMask=enabled,clientId,clientSecret" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"clientId":"","clientSecret":""}'

Step 4: Gradle Plugin Setup

> [!WARNING] > flutterfire configure adds plugins to app/build.gradle.kts but does NOT add them to settings.gradle.kts. This causes Plugin was not found build failures.

Required in settings.gradle.kts

plugins {
    id("dev.flutter.flutter-plugin-loader") version "1.0.0"
    id("com.android.application") version "8.11.1" apply false
    id("org.jetbrains.kotlin.android") version "2.2.20" apply false
    id("com.google.gms.google-services") version "4.4.2" apply false
    id("com.google.firebase.crashlytics") version "3.0.3" apply false  // MUST ADD
}

Required in app/build.gradle.kts

plugins {
    id("com.android.application")
    id("kotlin-android")
    id("dev.flutter.flutter-gradle-plugin")
    id("com.google.gms.google-services")
    id("com.google.firebase.crashlytics")
}

Step 5: AdMob Integration

Use kDebugMode to toggle test/production ad IDs in Dart code.

Step 6: RevenueCat IAP Setup

  1. Create project at https://app.revenuecat.com
  2. Add Android app with package name
  3. Create entitlement (e.g., pro)
  4. Create offering (e.g., default) with packages
  5. Get SDK key from API Keys page (goog_...)
  6. Update Flutter code with SDK key

Step 7: Real-Device Testing Checklist

| Issue | Symptom | Root Cause | Fix | |-------|---------|------------|-----| | Plugin was not found | Gradle build fails | Missing plugin in settings.gradle.kts | Add plugin with version | | MissingLibraryException: libflutter.so | Crash on ARM device | flutter build apk --debug only includes x8664 | Use flutter run -d instead | | ApiException: 10 (DEVELOPERERROR) | Google Sign-In fails after account selection | Missing Android OAuth Client in GCP | Create Android client with SHA-1 + package | | ApiException: 12 (NOT_SUPPORTED) | Sign-In picker doesn't appear | Wrong serverClientId | Use Web client ID, not Android | | Account picker shows but no login | Stays on login page | Emulator has no Google account | Add Google account to emulator settings |

.gitignore Best Practices

# Firebase credentials — NEVER commit
app/android/app/google-services.json
app/ios/Runner/GoogleService-Info.plist

# FVM
app/.fvm/

Related skills

  • firebase-auth-manager — implement user sign-in after Firebase is initialized. Firebase-flutter-setup provides the backend infrastructure; firebase-auth-manager builds the auth UX.
  • admob-ux-best-practicesrevenuecat-manager — integrate monetization after Firebase is set up. Use these for ads and subscriptions.
  • flutter-verify — after setup completes, verify Firebase services are accessible and auth flows work end-to-end.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.