fix(app-check): validate provider name and error on unrecognized values#9106
fix(app-check): validate provider name and error on unrecognized values#9106just1and0 wants to merge 5 commits into
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces validation for React Native Firebase App Check provider names. By enforcing supported provider values at the initialization stage, it prevents misconfigurations that previously resulted in silent failures or difficult-to-debug issues at the native layer. Additionally, it adds diagnostic logging to assist in identifying unsupported provider configurations. Highlights
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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces validation for App Check provider names on both Android and Apple platforms, along with corresponding unit tests and native logging for unknown providers. The feedback suggests throwing an IllegalArgumentException on Android when an unknown provider is encountered to prevent a potential runtime crash, and refactoring the unit tests to use Jest's idiomatic expect().not.toThrow() matcher instead of try-catch blocks.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9106 +/- ##
============================================
+ Coverage 65.11% 65.86% +0.75%
+ Complexity 1833 1832 -1
============================================
Files 503 497 -6
Lines 39180 38784 -396
Branches 5807 5796 -11
============================================
+ Hits 25510 25543 +33
+ Misses 12235 11814 -421
+ Partials 1435 1427 -8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Description
Validate React Native Firebase App Check provider names before configuring the native provider.
Previously, unsupported provider names such as
appAttestWithDebugProviderFallbackcould be passed through without a clear JS-side error, leaving native App Check configured without a matching delegate provider and making the resulting App Check behavior difficult to diagnose. This change adds runtime validation for the supported Android and Apple provider names, plus native diagnostic logging if an unknown provider still reaches the native layer.Supported provider names are now enforced as:
debug,playIntegritydebug,deviceCheck,appAttest,appAttestWithDeviceCheckFallbackRelated issues
Release Summary
Validate App Check provider names at initialization and throw a clear error for unsupported Android or Apple provider values.
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/**/e2ejesttests added or updated inpackages/**/__tests__Test Plan
Validated the App Check provider-name checks with the focused Jest suite and JS linting.