useCustomAppCheckProvider function

void useCustomAppCheckProvider(
  1. Future<AppCheckToken> supply()
)

Installs a provider that asks supply whenever the SDK needs a token.

supply does the attesting — reads a TPM, calls a vendor service, unseals a provisioning record — and returns the token with its expiry. Throwing fails that one request; the SDK will ask again.

The SDK waits for an answer and nothing here times it out, so supply must return or throw. It runs on the Dart isolate that installed the provider, not on the SDK thread that asked.

Every app is answered by supply alike. To tell them apart, use useCustomAppCheckProviderForApps.

Implementation

void useCustomAppCheckProvider(Future<AppCheckToken> Function() supply) =>
    useCustomAppCheckProviderForApps((_) => supply());