feat(app_check, windows): add support for AppCheck for Windows#18140
feat(app_check, windows): add support for AppCheck for Windows#18140
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
…for Windows Extends the merged Windows App Check plugin (PR firebase#18140) with a custom provider backed by a server-minted token, closing the production gap that the Debug-only implementation left open. Architecture: the Firebase C++ SDK calls FlutterCustomAppCheckProvider::GetToken() when it needs a token. That method invokes FirebaseAppCheckFlutterApi::GetCustomToken() — a Pigeon FlutterApi channel (same bidirectional pattern as firebase_database transactions) — which calls into Dart. The Dart handler calls a Cloud Function (getWindowsAppCheckToken, enforceAppCheck:false) that mints a valid App Check token via the Firebase Admin SDK and returns it. The C++ side blocks with a mutex+cv until Dart responds, then completes the SDK callback with the token. The Firebase SDK automatically attaches the token to every Firestore request. Changes: - pigeons/messages.dart: add activateWindowsCustomProvider() to HostApi and add @FlutterApi() FirebaseAppCheckFlutterApi with getCustomToken() - messages.g.h/cpp: manually extend generated Pigeon code with the new HostApi method channel handler and the new FirebaseAppCheckFlutterApi C++ class - firebase_app_check_plugin.h/cpp: add FlutterCustomAppCheckProvider, FlutterCustomAppCheckProviderFactory, and ActivateWindowsCustomProvider() - windows_providers.dart: add WindowsCustomProvider class - method_channel_firebase_app_check.dart: call activateWindowsCustomProvider when WindowsCustomProvider is detected - Export WindowsCustomProvider and FirebaseAppCheckFlutterApi from the package
Add support for Windows to the AppCheck plugin.
Migrating to Pigeon
closes: #18126