Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [firebase_app_check] Missing support for custom App Check providers #12227

Open
MarcVanDaele90 opened this issue Jan 31, 2024 · 8 comments
Labels
platform: all Issues / PRs which are for all platforms. plugin: app_check type: enhancement New feature or request

Comments

@MarcVanDaele90
Copy link

Bug report

On https://firebase.google.com/docs/app-check/custom-provider, it is explained how to implement a custom App Check provider and it links to pages on how to use this custom provider in Apple, Android and web. However, afaics, it is not possible to use this custom provider in Flutter right now!

Can you also add support for custom providers?

I would like to use custom providers to support the whitelist (cfr discussion #12222)

@MarcVanDaele90 MarcVanDaele90 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jan 31, 2024
@darshankawar darshankawar added the triage Issue is currently being triaged. label Jan 31, 2024
@darshankawar
Copy link

@MarcVanDaele90
Check if this issue resembles your case or not.

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jan 31, 2024
@MarcVanDaele90
Copy link
Author

@darshankawar Thanks for looking at this. I'm not sure to which part of the issue you refer to.
As I see it, the issue contains three parts

  1. creating a custom provider (ReactNativeFirebaseAppCheckProvider implements AppCheckProvider)
  2. using it to generate debug tokens
  3. passing the customer provider to initializeAppCheck()

Creating a custom provider (with cloud functions) is documented on https://firebase.google.com/docs/app-check/custom-provider so I don't think we need anything extra for this.

I think the main thing missing right now is the ability to pass the custom provider to FirebaseAppCheck.instance.activate

Part 2 could be a temporary solution for my whitelist problem but I'm not sure I understand it correctly:
Would it be the intention to add a "debug" flag to the ReCaptchaV3Provider object which would generate a debug token on-the-fly when set?

await FirebaseAppCheck.instance.activate(
          webProvider: ReCaptchaV3Provider(appCheckKey)
      );

If so, I could indeed

  • set this debug flag for all customers in my whitelist (thereby skipping the actual recaptcha)
  • leave it empty for other customers in which case the behavior would be unchanged

This would be a nice fix for my current problem. Though I still think that, in the long run, Flutter should also support custom providers.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jan 31, 2024
@darshankawar darshankawar added type: enhancement New feature or request plugin: app_check and removed type: bug Something isn't working Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Feb 1, 2024
@darshankawar
Copy link

Thanks for the feedback.

@zvikarp
Copy link
Contributor

zvikarp commented Feb 5, 2024

Also, I would like to implement a custom app check provider in Flutter but there is no way to do it currently. Now that SMS costs are per send and not per sign-in, it is risky to use Firebase auth without app check, and we need a way to whitelist some users.

@MarcVanDaele90
Copy link
Author

@darshankawar is it possible to give an update? Is it possible to give a high level timeline?
We would really like to implement a custom app check provider in Flutter because app check is blocking valid customers.
I'm certainly willing to help where possible.

@Lyokone Lyokone added the platform: all Issues / PRs which are for all platforms. label Mar 19, 2024
@MarcVanDaele90
Copy link
Author

A short status-update would be appreciated. Any idea if (and when) this will be added?

@MarcVanDaele90
Copy link
Author

Ping
(I understand such a ping is annoying but a short update would be much appreciated)

@ahija
Copy link

ahija commented Dec 25, 2024

Please provide an update regarding using a custom provider in flutter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: all Issues / PRs which are for all platforms. plugin: app_check type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants