Flutter - firebase_app_check not working in release mode, how fix it?

Viewed 24

I using firebase_app_check in my flutter app. And I use AppCheck in Firebase. it turned out to be not easy to set up, there are a lot of "white spots" in the documentation. so in order:

  1. I enabled AppCheck on Firebase(for starage and Firestore).
  2. I selected "Play Integrity"(so the documentation recommends) as attestation providers.
  3. I added plugin firebase_app_check to my app. But it not worked. the app(in debug mode) cannot retrieve data from the firestore.
  4. Then I added "SafetyNet" as attestation provider. After this app worked(debug mode).
  5. I publised my appbundle to Google Play. When I downloaded app from Google Play it not worked(cannot retrieve data from the firestore). I using obfuscation for my appbundle.

Why my app not worked with AppChecker in release mode? Why "Play Integrity" not worked? do I have to add code at the platform level? according to this document? like this:

 val firebaseAppCheck = FirebaseAppCheck.getInstance()
   firebaseAppCheck.installAppCheckProviderFactory(
   SafetyNetAppCheckProviderFactory.getInstance()
 )

or is one plugin enough?

How I can fix it?

0 Answers
Related