FirebaseAppCheck

Firebase App Check: attests that requests to Firebase backends come from your app, and gives you tokens for your own backend.

Install a provider factory first: one of the factories of the com.google.firebase.appcheck packages (com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory, com.google.firebase.appcheck.playintegrity.PlayIntegrityAppCheckProviderFactory, com.google.firebase.appcheck.recaptcha.RecaptchaAppCheckProviderFactory), a platform-specific one of this package, or your own com.google.firebase.appcheck.AppCheckProviderFactory. When a factory takes effect differs between platforms; see com.google.firebase.appcheck.FirebaseAppCheck.

Properties

Link copied to clipboard

The underlying Firebase Android SDK object.

Link copied to clipboard

Each new App Check token, from when the flow is collected. On Android and JS the flow starts with the cached token when it is still valid; the iOS SDK reports new tokens only. A token's expiry emits nothing.

Link copied to clipboard
Link copied to clipboard
val FirebaseAppCheck.ios: FIRAppCheck?

The underlying Firebase iOS SDK object; null when the app had no provider factory when it was configured.

Link copied to clipboard

The underlying Firebase JS SDK object; null until a provider factory is installed.

The underlying Firebase JS SDK object; null until a provider factory is installed.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
suspend fun getAppCheckToken(forceRefresh: Boolean = false): AppCheckToken

Returns an App Check token. Use it only for requests to your own backend: requests to Firebase backends get a token automatically.

Link copied to clipboard

Returns a limited-use App Check token, for a backend with replay protection. It does not replace the token that getAppCheckToken caches.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun installAppCheckProviderFactory(factory: AppCheckProviderFactory, isTokenAutoRefreshEnabled: Boolean? = null)

Installs factory, replacing the factory installed before.

Link copied to clipboard
fun setTokenAutoRefreshEnabled(isTokenAutoRefreshEnabled: Boolean)

Sets whether App Check refreshes its token automatically before it expires.

Link copied to clipboard
open override fun toString(): String