Package-level declarations

Types

Link copied to clipboard
external interface AppCheck : JsAny

The App Check of an app, which initializeAppCheck starts.

Link copied to clipboard
external interface AppCheckProvider : JsAny

An App Check provider, for the provider of the options of initializeAppCheck.

Link copied to clipboard
external interface AppCheckTokenResult : JsAny

A token as the JS SDK reports it: the JWT alone.

Link copied to clipboard
external class CustomProvider(options: JsAny) : AppCheckProvider

A provider whose getToken option returns a promise of { token, expireTimeMillis }.

Link copied to clipboard

The reCAPTCHA Enterprise provider, for a score-based reCAPTCHA Enterprise site key.

Link copied to clipboard
external class ReCaptchaV3Provider(siteKey: String) : AppCheckProvider

The reCAPTCHA v3 provider, for a reCAPTCHA v3 site key.

Functions

Link copied to clipboard
external fun getLimitedUseToken(appCheckInstance: AppCheck): Promise<AppCheckTokenResult>
Link copied to clipboard
external fun getToken(appCheckInstance: AppCheck, forceRefresh: Boolean): Promise<AppCheckTokenResult>
Link copied to clipboard
external fun initializeAppCheck(app: FirebaseApp?, options: JsAny): AppCheck

Starts App Check for app with { provider, isTokenAutoRefreshEnabled }; it can only start once per app.

Link copied to clipboard
external fun onTokenChanged(appCheckInstance: AppCheck, onNext: (AppCheckTokenResult) -> Unit): () -> Unit

Calls onNext with each new token; the returned function unsubscribes.

Link copied to clipboard
external fun setTokenAutoRefreshEnabled(appCheckInstance: AppCheck, isTokenAutoRefreshEnabled: Boolean)