-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Needs Attentionplatform: iosplugin: app-checkFirebase AppCheckFirebase AppChecktype: bugNew bug reportNew bug report
Description
Issue
We are using @react-native-firebase/app-check in an Expo-managed React Native app. In development mode, we are initializing App Check with a debugToken for iOS. The token is successfully generated using appCheck().getToken() and is printed to the console.
However, Firebase does not mark any requests as verified in the App Check dashboard. Even though the token looks valid and is generated correctly, we don't see any verification on the backend:
- The App Check dashboard shows 0 verified requests.
- No network request is made to
firebaseappcheck.googleapis.comduring token generation. - No errors are thrown.
- We haven't confirmed whether the token is attached to outgoing requests (e.g. in Authorization headers).
This makes it unclear whether App Check is actually working during development with debug tokens.
Code
useEffect(() => {
const isDev = isDevOrStaging();
const provider = appCheck().newReactNativeFirebaseAppCheckProvider();
const initAppCheck = async () => {
const platform = Platform.OS as 'android' | 'ios';
const env = config.appEnv as 'development' | 'staging';
const debugToken = isDev ? config.debugToken[platform][env] : undefined;
try {
provider.configure({
apple: {
provider: isDev ? 'debug' : 'deviceCheck',
debugToken,
},
android: {
provider: isDev ? 'debug' : 'playIntegrity',
debugToken,
},
});
await appCheck().initializeAppCheck({
provider,
isTokenAutoRefreshEnabled: true,
});
const token = await appCheck().getToken();
console.log('token', token);
} catch (error) {
console.error('error', error);
}
};
initAppCheck();
}, []);Project Files
Javascript
Click To Expand
package.json:
# N/Afirebase.json for react-native-firebase v6:
# N/AiOS
Click To Expand
ios/Podfile:
- I'm not using Pods
- I'm using Pods and my Podfile looks like:
# N/AAppDelegate.m:
// N/AAndroid
Click To Expand
Have you converted to AndroidX?
- my application is an AndroidX application?
- I am using
android/gradle.settingsjetifier=truefor Android compatibility? - I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
// N/Aandroid/app/build.gradle:
// N/Aandroid/settings.gradle:
// N/AMainApplication.java:
// N/AAndroidManifest.xml:
<!-- N/A -->Environment
Click To Expand
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- iOS
- Android
- iOS but have not tested behavior on Android
- Android but have not tested behavior on iOS
- Both
react-native-firebaseversion you're using that has this issue:e.g. 5.4.3
Firebasemodule(s) you're using that has the issue:e.g. Instance ID
- Are you using
TypeScript?Y/N&VERSION
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.
Metadata
Metadata
Assignees
Labels
Needs Attentionplatform: iosplugin: app-checkFirebase AppCheckFirebase AppChecktype: bugNew bug reportNew bug report