-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] app-check modular API doesn't seem to conform to provided docs #8361
Comments
Was just in this area, using our e2e tests as the proof of it working - I think you may be right about the react-native-firebase/packages/app-check/e2e/appcheck.e2e.js Lines 371 to 405 in 082a1e4
|
You're correct - sorry about that - when I was in there I exported the implementation, so it works in javascript but the types are definitely not correct so typescript won't buy it. You could ts-ignore the import line temporarily (maybe have a second one to just ts-ignore this specific import...) and just import { ReactNativeFirebaseAppCheckProvider } from `@react-native-firebase/app` and it will work to then You cannot get rid of the should conform to https://firebase.google.com/docs/reference/js/app-check.md#initializeappcheck_5548dfc and return AppCheck type Will post a PR to fix that when I get a moment, and tag this issue with it for close |
Issue
Looking at the AppCheck implementation in rnfirebase, it doesn't seem like it follows the docs provided in the rnfirebase.io.
Code snippet from docs is as follows:
However, most I could build (working!) with the rnfirebase API is as follows:
There are few issues I see:
initializeAppCheck
is ought to return anAppCheck
instance, but the signature shows anApp
instance instead. source:react-native-firebase/packages/app-check/lib/modular/index.js
Line 37 in 082a1e4
getAppCheck
exported, but I assume this expected since we need to initialize it throughinitializeAppCheck
. right?newReactNativeFirebaseAppCheckProvider()
orReactNativeFirebaseAppCheckProvider
. This is a problem because in order to initialize the appCheck I'd need the result of provider.configure, but currently I need the appCheck instance to get build the provider.I maybe wrong in all above (and hence these are expected API), but these are observations I just had. Appreciate if I can get feedback whether assumptions above are correct or not.
Thanks.
Project Files
Javascript
Click To Expand
package.json
:# N/A
firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:e.g. 5.4.3
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y/N
&VERSION
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: