Activate App Check On iOS App Check is activated with DeviceCheck provider simply by including the module, using the token auto refresh default or the specific value (if configured) in firebase.json, but calling this does no harm. On Android if you call this it will install the PlayIntegrity provider in release builds, the Debug provider if debuggable. On both platforms you may use this method to alter the token refresh setting after startup. On iOS if you want to set a specific AppCheckProviderFactory (for instance to FIRAppCheckDebugProviderFactory or FIRAppAttestProvider) you must manually do that in your AppDelegate.m prior to calling [FIRApp configure]
This is ignored, Android uses DebugProviderFactory if the app is debuggable (https://firebase.google.com/docs/app-check/android/debug-provider) Android uses PlayIntegrityProviderFactory for release builds. iOS uses DeviceCheckProviderFactory by default unless altered in AppDelegate.m manually
OptionalisTokenAutoRefreshEnabled: booleanIf true, enables SDK to automatically
refresh AppCheck token as needed. If undefined, the value will default
to the value of app.automaticDataCollectionEnabled. That property
defaults to false and can be set in the app config.
Requests a Firebase App Check token. This method should be used only if you need to authorize requests to a non-Firebase backend. Returns limited-use tokens that are intended for use with your non-Firebase backend endpoints that are protected with Replay Protection (https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection). This method does not affect the token generation behavior of the getAppCheckToken() method.
Requests Firebase App Check token. This method should only be used if you need to authorize requests to a non-Firebase backend. Requests to Firebase backend are authorized automatically if configured.
OptionalforceRefresh: booleanIf true, a new Firebase App Check token is requested and the token cache is ignored. If false, the cached token is used if it exists and has not expired yet. In most cases, false should be used. True should only be used if the server explicitly returns an error, indicating a revoked token.
Initialize the AppCheck module. Note that in react-native-firebase AppCheckOptions must always
be an object with a provider member containing ReactNativeFirebaseAppCheckProvider that has returned successfully
from a call to the configure method, with sub-providers for the various platforms configured to meet your project
requirements. This must be called prior to interacting with any firebase services protected by AppCheck
an AppCheckOptions with a configured ReactNativeFirebaseAppCheckProvider as the provider
Create a ReactNativeFirebaseAppCheckProvider option for use in react-native-firebase
Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes.
A function that unsubscribes this listener.
Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes.
Token listeners do not exist in the native SDK for iOS, no token change events will be emitted on that platform. This is not yet implemented on Android, no token change events will be emitted until implemented.
NOTE: Although an onError callback can be provided, it will
never be called, Android sdk code doesn't provide handling for onError function
NOTE: Although an onCompletion callback can be provided, it will
never be called because the token stream is never-ending.
OptionalonError: (error: Error) => voidOptionalonCompletion: () => voidA function that unsubscribes this listener.
Alter the token auto refresh setting. By default it will take the value of automaticDataCollectionEnabled from Info.plist / AndroidManifest.xml
If true, the SDK automatically
refreshes App Check tokens as needed. This overrides any value set
during activate() or taken by default from automaticDataCollectionEnabled in plist / android manifest
App Check module instance - returned from firebase.appCheck() or firebase.app().appCheck()