Classes
CustomProvider
Implements
Constructors
Constructor
new CustomProvider(options: CustomProviderOptions): CustomProvider;
Parameters
Returns
CustomProvider
Methods
isEqual()
isEqual(other: unknown): boolean;
Upstream compares the getToken functions by source text, so a provider rebuilt by the same factory is equal.
Parameters
Returns
boolean
Implementation of
ComparableProvider.isEqual
ReCaptchaEnterpriseProvider
Implements
Constructors
Constructor
new ReCaptchaEnterpriseProvider(siteKey: string): ReCaptchaEnterpriseProvider;
Parameters
Returns
ReCaptchaEnterpriseProvider
Methods
isEqual()
isEqual(other: unknown): boolean;
Parameters
Returns
boolean
Implementation of
ComparableProvider.isEqual
ReCaptchaV3Provider
Implements
Constructors
Constructor
new ReCaptchaV3Provider(siteKey: string): ReCaptchaV3Provider;
Parameters
Returns
ReCaptchaV3Provider
Methods
isEqual()
isEqual(other: unknown): boolean;
Parameters
Returns
boolean
Implementation of
ComparableProvider.isEqual
Interfaces
AppCheck
Properties
AppCheckOptions
Properties
AppCheckToken
The three attestation providers. The sandbox has no reCAPTCHA, so it never
calls a reCAPTCHA provider. It calls a CustomProvider as production does
when no debug token is set (state.ts); under a debug token production
never calls one (capture app-check-client-debug-get-token,
customProviderCalls: 0), and neither does the sandbox.
isEqual decides whether a second initializeAppCheck has the same options.
initialize is called at the end of initializeAppCheck, as upstream
_activate calls each provider’s (@firebase/app-check 0.11.3, line 1559).
Upstream’s reCAPTCHA providers add a hidden div to document there
(makeDiv, line 1133), so where there is no document, such as a Node
process or a server-rendered module, they throw ReferenceError: document is not defined, debug token or not. The sandbox throws the same error. A
CustomProvider needs nothing to initialize.
Properties
AppCheckTokenResult
Properties
CustomProviderOptions
Properties
PartialObserver
Type Parameters
Properties
Type Aliases
AppCheckTokenListener()
type AppCheckTokenListener = (token: AppCheckTokenResult) => void;
Parameters
Returns
void
Unsubscribe()
type Unsubscribe = () => void;
Returns
void
Functions
getLimitedUseToken()
function getLimitedUseToken(appCheck: AppCheck): Promise<AppCheckTokenResult>;
Parameters
Returns
Promise<AppCheckTokenResult>
getToken()
function getToken(appCheck: AppCheck, forceRefresh?: boolean): Promise<AppCheckTokenResult>;
Parameters
Returns
Promise<AppCheckTokenResult>
initializeAppCheck()
function initializeAppCheck(app: FirebaseApp, options: AppCheckOptions): AppCheck;
Parameters
Returns
AppCheck
onTokenChanged()
function onTokenChanged(
appCheck: AppCheck,
onNextOrObserver:
| AppCheckTokenListener
| PartialObserver<AppCheckTokenResult>,
onError?: (error: Error) => void,
onCompletion?: () => void): Unsubscribe;
Parameters
Returns
Unsubscribe
setTokenAutoRefreshEnabled()
function setTokenAutoRefreshEnabled(appCheck: AppCheck, isTokenAutoRefreshEnabled: boolean): void;
Parameters
Returns
void