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.69k stars 3.97k forks source link

🚀 [firebase_app_check] Support passing `debugToken` as parameter similar to React Native App Check library #11719

Open thedalelakes opened 1 year ago

thedalelakes commented 1 year ago

What feature would you like to see?

In the React Native package for Firebase App Check, they created their own custom provider that essentially overrides the debug provider token. This allows a developer to specify a static, generated debug token in their code to use.

This is very convenient because, in the case where the developer must uninstall / reinstall the app, they can use the same debug token. Currently, a Flutter developer that installs a new version of the app must manually copy and paste the debug token from XCode / Logcat console output into their Firebase web console (and delete the old token), which becomes tedious when testing certain functionality that requires fresh installations of the application.

Relevant links & code:

thedalelakes commented 1 year ago

I'm willing to complete this issue myself and submit a PR for it. I just want to first make sure that this feature would actually be accepted by the Firebase / FlutterFire core maintainers, given the security implications.

xVemu commented 7 months ago

It's also useful for tests in CI.

josh-burton commented 6 months ago

We really need this for debug tokens to be useful and maintainable. We're generating and updating our debug tokens via Terraform, but currently we can't use these in the Flutter apps as there is no method to supply our own token.

@thedalelakes did you ever get to work on a PR for this?

thedalelakes commented 6 months ago

@josh-burton unfortunately I don't have the time to work on this at the moment. I ended up just turning off App Check enforcement in my dev environment.

xVemu commented 6 months ago

I think on IOS you can use point 4 from guideline