Integrates Firebase App Check into Flutter apps. Use when setting up App Check, selecting providers per platform, using debug providers during development, enabling enforcement, or applying App Check security best practices.
This skill defines how to correctly use Firebase App Check in Flutter applications.
Use this skill when:
flutter pub add firebase_app_check
import 'package:firebase_app_check/firebase_app_check.dart';
Initialize App Check and using any Firebase services:
Firebase.initializeApp()await Firebase.initializeApp();
await FirebaseAppCheck.instance.activate(
webProvider: ReCaptchaV3Provider('recaptcha-v3-site-key'),
providerAndroid: AndroidPlayIntegrityProvider(),
providerApple: AppleDeviceCheckProvider(),
);
Android:
| Provider | Use case |
|---|---|
AndroidPlayIntegrityProvider | Production (default) |
AndroidDebugProvider | Development / CI only |
Apple (iOS / macOS):
| Provider | Use case |
|---|---|
AppleDeviceCheckProvider | Production default (iOS 11+, macOS 10.15+) |
AppleAppAttestProvider | Enhanced security (iOS 14+, macOS 14+) |
AppleAppAttestProviderWithDeviceCheckFallback | App Attest with Device Check fallback |
AppleDebugProvider | Development / CI only |
Web:
| Provider | Use case |
|---|---|
ReCaptchaV3Provider | Standard reCAPTCHA v3 |
ReCaptchaEnterpriseProvider | Enhanced with additional features |
Android note: For certain Android devices, enable "Meets basic device integrity" in the Google Play console to ensure proper App Check functionality.
Use debug providers during development to run in emulators or CI environments:
await FirebaseAppCheck.instance.activate(
providerAndroid: AndroidDebugProvider('YOUR_DEBUG_TOKEN'),
providerApple: AppleDebugProvider('YOUR_DEBUG_TOKEN'),
);
-FIRDebugEnabled to Arguments Passed on Launch in Xcode.self.FIREBASE_APPCHECK_DEBUG_TOKEN = true; in web/index.html.