How are developers working with Firebase App Check when developing locally using the emulator on localhost? Are you disabling App Check on localhost entirely? Or are you able to emulating App Check locally?
Firebase has some instructions on using App Check with a debug provider, but the use case for that seems to be when you want to debug locally but use GCP's backend services in the cloud. It doesn't look relevant for developing against the emulator.
Running this in the client fails recaptcha app attestation with a 403 response (PERMISSION_DENIED), presumably because localhost is not listed as an allowed domain:
const appCheck = firebase.appCheck();
appCheck.activate(
process.env.REACT_APP_FIREBASE_APP_CHECK_SITE_KEY,
true,
);
When enforcing app check in callable functions, context.app
is undefined
when running in the emulator so requests will fail app check.
Disabling App Check locally is certainly an option, but was wondering if there was a way to emulate app check as well.
self.FIREBASE_APPCHECK_DEBUG_TOKEN
was for when you wanted to test your client locally while using the backend in GCP's cloud. β Key