firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

🐛 [firebase_app_check] Allow manual setting of app check token in debug mode #12376

Open jt274 opened 8 months ago

jt274 commented 8 months ago

In the Android and iOS sections of the App Check docs, there are instructions to configure the App Check debug provider for unit testing in a CI environment. Links:

https://firebase.google.com/docs/app-check/android/debug-provider#ci https://firebase.google.com/docs/app-check/ios/debug-provider#ci

There are no similar instructions or available methods for App Check in flutter. This makes it difficult to perform an automated test on an app that requires App Check in multiple environments, such as real devices or emulators in Firebase Test Lab. In these situations, a token is printed to console and must be manually added to the Firebase console for each device, instead of all sharing the same token.

The feature should be added to the flutter package as simply as possible. For example:

FirebaseAppCheck.instance.setDebugProviderToken(MY_TOKEN);

marcellocamara commented 3 months ago

@jt274 FirebaseAppCheck.instance.setDebugProviderToken(MY_TOKEN);

This method will allow us to simplify the use of the same token in a project with many developers. Adds token by token (each developer generating one), it's a bad way. Imagine that every time I create a new emulator I need to register the new token in the Firebase Console 😞

@darshankawar or @russellwheatley any plans to launch this feature ? Is this on the radar?

adonisRodxander commented 2 weeks ago

Any updates or workarount? @darshankawar or @russellwheatley