I am currently building an app, and I want to add Firebase Appcheck to this app, however I want to maintain the ability to use expo go. I have seen on the firebase documentation that adding a custom attestation provider is possible for the JavaScript SDK, however I don't really know how this may look. Is there a way to implement this with a recaptcha or other provider using a custom function or would I have to do the attestation myself?
Screenshot of firebase documentation stating that a custom provider can be used
I have tried to implement it directly using the same code as you would for a web app(which I have it working within) so I expected this to just work:
app = initializeApp(firebaseConfig);
initializeAppCheck(app, {
provider: new ReCaptchaV3Provider("site key"),
isTokenAutoRefreshEnabled: true, // Set to true to allow auto-refresh.
});
This stopped the app from ever bundling when trying to use expo go. I have also tried a different method which I found suggested, which is probably just a change in syntax:
firebase.initializeApp(firebaseConfig);
const appCheck = firebase.appCheck();
appCheck.activate(
new ReCaptchaV3Provider("site key"),
(isTokenAutoRefreshEnabled = true)
);
This is what lead me to dig into the documentation to find that this wasn't natively supported with the JavaScript SDK. My question is what is the best route to proceed to add appcheck to my react-native app and help protect my firebase project?
A few things to clarify is that I have other firebase features working on the app using the javascript SDK and I am not the only person working on the app so the benefits of using expo go are huge to us to allow fast prototyping so we want to avoid react-native-firebase if possible.