App Check for Expo/React Native app using Firebase JS SDK

Viewed 668

My Expo based React Native app worked perfectly fine until I added Firebase App Check.

I am using Firebase JS SDK and not React Native Firebase because it is suggested here for cross platform development.

Now how can I get and then send context.auth (link) to Firebase Functions? Or How can I send what Firebase Storage needs to functions manually?

Storage seems to work fine with AppCheck and AppAttest enabled if it's not Enforced but as soon as I enforce it, the app throws a an error every time there is image load from storage that User is not authenticated.

enter image description here

https://console.firebase.google.com/u/0/project/myapp-4fa75/settings/appcheck

1 Answers

As I understand, you can't because the JS SDK uses reCAPTCHA and native apps have to use either SafetyNet (Android) or DeviceCheck or App Attest (iOS).

I think the only option is using react-native-firebase instead of JS SDK.

You'd have to use config plugins as described here and then configure the app-check module as described here.

Related