PERMISSION DENIED when using Firebase AppCheck in emulator suite

Viewed 65

I'm implementing AppCheck in my app in order to prevent bad access to Firestore. I activated the service in Firebase Console and add this line await FirebaseAppCheck.instance.activate(); after Firebase initialization.
Now, if I try to access Firestore in my app through emulator it logs PERMISSION DENIED.
How could I develop updates for my app and continue testing while AppCheck is enabled?

1 Answers

After you have registered your app for App Check, your app normally won't run in an emulator or from a continuous integration (CI) environment, since those environments don't qualify as valid devices. If you want to run your app in such an environment during development and testing, you can create a debug build of your app that uses the App Check debug provider instead of a real attestation provider.

Refer documentation Flutter app Check details.
However, as per the documentation, the debug provider does not currently have a Dart API; you'll need to apply the changes separately for each of your platforms.

You may check the App Check debug provider available for other platforms like Apple, Web and Android.

Related