Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FirebaseAppCheck

import { FirebaseAppCheck } from "https://googleapis.deno.dev/v1/firebaseappcheck:v1.ts";

Firebase App Check works alongside other Firebase services to help protect your backend resources from abuse, such as billing fraud or phishing.

class FirebaseAppCheck {
constructor(client?: CredentialsClient, baseUrl?: string);
async jwksGet(name: string): Promise<GoogleFirebaseAppcheckV1PublicJwkSet>;
async projectsAppsAppAttestConfigBatchGet(parent: string, opts?: ProjectsAppsAppAttestConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetAppAttestConfigsResponse>;
async projectsAppsAppAttestConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1AppAttestConfig>;
async projectsAppsAppAttestConfigPatch(
name: string,
): Promise<GoogleFirebaseAppcheckV1AppAttestConfig>;
async projectsAppsDebugTokensCreate(parent: string, req: GoogleFirebaseAppcheckV1DebugToken): Promise<GoogleFirebaseAppcheckV1DebugToken>;
async projectsAppsDebugTokensDelete(name: string): Promise<GoogleProtobufEmpty>;
async projectsAppsDebugTokensGet(name: string): Promise<GoogleFirebaseAppcheckV1DebugToken>;
async projectsAppsDebugTokensList(parent: string, opts?: ProjectsAppsDebugTokensListOptions): Promise<GoogleFirebaseAppcheckV1ListDebugTokensResponse>;
async projectsAppsDebugTokensPatch(
name: string,
): Promise<GoogleFirebaseAppcheckV1DebugToken>;
async projectsAppsDeviceCheckConfigBatchGet(parent: string, opts?: ProjectsAppsDeviceCheckConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetDeviceCheckConfigsResponse>;
async projectsAppsDeviceCheckConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1DeviceCheckConfig>;
async projectsAppsExchangeAppAttestAssertion(app: string, req: GoogleFirebaseAppcheckV1ExchangeAppAttestAssertionRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsExchangeCustomToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeCustomTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsExchangeDebugToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeDebugTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsExchangeDeviceCheckToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeDeviceCheckTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsExchangePlayIntegrityToken(app: string, req: GoogleFirebaseAppcheckV1ExchangePlayIntegrityTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsExchangeRecaptchaEnterpriseToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeRecaptchaEnterpriseTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsExchangeRecaptchaV3Token(app: string, req: GoogleFirebaseAppcheckV1ExchangeRecaptchaV3TokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsExchangeSafetyNetToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeSafetyNetTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>;
async projectsAppsPlayIntegrityConfigBatchGet(parent: string, opts?: ProjectsAppsPlayIntegrityConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetPlayIntegrityConfigsResponse>;
async projectsAppsPlayIntegrityConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1PlayIntegrityConfig>;
async projectsAppsRecaptchaEnterpriseConfigBatchGet(parent: string, opts?: ProjectsAppsRecaptchaEnterpriseConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetRecaptchaEnterpriseConfigsResponse>;
async projectsAppsRecaptchaEnterpriseConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1RecaptchaEnterpriseConfig>;
async projectsAppsRecaptchaV3ConfigBatchGet(parent: string, opts?: ProjectsAppsRecaptchaV3ConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetRecaptchaV3ConfigsResponse>;
async projectsAppsRecaptchaV3ConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1RecaptchaV3Config>;
async projectsAppsSafetyNetConfigBatchGet(parent: string, opts?: ProjectsAppsSafetyNetConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetSafetyNetConfigsResponse>;
async projectsAppsSafetyNetConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1SafetyNetConfig>;
async projectsAppsSafetyNetConfigPatch(
name: string,
): Promise<GoogleFirebaseAppcheckV1SafetyNetConfig>;
async projectsServicesBatchUpdate(parent: string, req: GoogleFirebaseAppcheckV1BatchUpdateServicesRequest): Promise<GoogleFirebaseAppcheckV1BatchUpdateServicesResponse>;
async projectsServicesGet(name: string): Promise<GoogleFirebaseAppcheckV1Service>;
async projectsServicesList(parent: string, opts?: ProjectsServicesListOptions): Promise<GoogleFirebaseAppcheckV1ListServicesResponse>;
async projectsServicesPatch(
name: string,
): Promise<GoogleFirebaseAppcheckV1Service>;
}

§Constructors

§
new FirebaseAppCheck(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
jwksGet(name: string): Promise<GoogleFirebaseAppcheckV1PublicJwkSet>
[src]

Returns a public JWK set as specified by RFC 7517 that can be used to verify App Check tokens. Exactly one of the public keys in the returned set will successfully validate any App Check token that is currently valid.

@param name

Required. The relative resource name to the public JWK set. Must always be exactly the string jwks.

§
projectsAppsAppAttestConfigBatchGet(parent: string, opts?: ProjectsAppsAppAttestConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetAppAttestConfigsResponse>
[src]

Atomically gets the AppAttestConfigs for the specified list of apps.

@param parent

Required. The parent project name shared by all AppAttestConfigs being retrieved, in the format projects/{project_number} The parent collection in the name field of any resource being retrieved must match this field, or the entire batch fails.

§
projectsAppsAppAttestConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1AppAttestConfig>
[src]

Gets the AppAttestConfig for the specified app.

@param name

Required. The relative resource name of the AppAttestConfig, in the format: projects/{project_number}/apps/{app_id}/appAttestConfig

§

Updates the AppAttestConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange AppAttest tokens for App Check tokens.

@param name

Required. The relative resource name of the App Attest configuration object, in the format: projects/{project_number}/apps/{app_id}/appAttestConfig

§
projectsAppsDebugTokensCreate(parent: string, req: GoogleFirebaseAppcheckV1DebugToken): Promise<GoogleFirebaseAppcheckV1DebugToken>
[src]

Creates a new DebugToken for the specified app. For security reasons, after the creation operation completes, the token field cannot be updated or retrieved, but you can revoke the debug token using DeleteDebugToken. Each app can have a maximum of 20 debug tokens.

@param parent

Required. The relative resource name of the parent app in which the specified DebugToken will be created, in the format: projects/{project_number}/apps/{app_id}

§
projectsAppsDebugTokensDelete(name: string): Promise<GoogleProtobufEmpty>
[src]

Deletes the specified DebugToken. A deleted debug token cannot be used to exchange for an App Check token. Use this method when you suspect the secret token has been compromised or when you no longer need the debug token.

@param name

Required. The relative resource name of the DebugToken to delete, in the format: projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}

§
projectsAppsDebugTokensGet(name: string): Promise<GoogleFirebaseAppcheckV1DebugToken>
[src]

Gets the specified DebugToken. For security reasons, the token field is never populated in the response.

@param name

Required. The relative resource name of the debug token, in the format: projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}

§
projectsAppsDebugTokensList(parent: string, opts?: ProjectsAppsDebugTokensListOptions): Promise<GoogleFirebaseAppcheckV1ListDebugTokensResponse>
[src]

Lists all DebugTokens for the specified app. For security reasons, the token field is never populated in the response.

@param parent

Required. The relative resource name of the parent app for which to list each associated DebugToken, in the format: projects/{project_number}/apps/{app_id}

§

Updates the specified DebugToken. For security reasons, the token field cannot be updated, nor will it be populated in the response, but you can revoke the debug token using DeleteDebugToken.

@param name

Required. The relative resource name of the debug token, in the format: projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}

§
projectsAppsDeviceCheckConfigBatchGet(parent: string, opts?: ProjectsAppsDeviceCheckConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetDeviceCheckConfigsResponse>
[src]

Atomically gets the DeviceCheckConfigs for the specified list of apps. For security reasons, the private_key field is never populated in the response.

@param parent

Required. The parent project name shared by all DeviceCheckConfigs being retrieved, in the format projects/{project_number} The parent collection in the name field of any resource being retrieved must match this field, or the entire batch fails.

§
projectsAppsDeviceCheckConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1DeviceCheckConfig>
[src]

Gets the DeviceCheckConfig for the specified app. For security reasons, the private_key field is never populated in the response.

@param name

Required. The relative resource name of the DeviceCheckConfig, in the format: projects/{project_number}/apps/{app_id}/deviceCheckConfig

§

Updates the DeviceCheckConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange DeviceCheck tokens for App Check tokens. For security reasons, the private_key field is never populated in the response.

@param name

Required. The relative resource name of the DeviceCheck configuration object, in the format: projects/{project_number}/apps/{app_id}/deviceCheckConfig

§
projectsAppsExchangeAppAttestAssertion(app: string, req: GoogleFirebaseAppcheckV1ExchangeAppAttestAssertionRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Accepts an App Attest assertion and an artifact previously obtained from ExchangeAppAttestAttestation and verifies those with Apple. If valid, returns an AppCheckToken.

@param app

Required. The relative resource name of the iOS app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§

Accepts an App Attest CBOR attestation and verifies it with Apple using your preconfigured team and bundle IDs. If valid, returns an attestation artifact that can later be exchanged for an AppCheckToken using ExchangeAppAttestAssertion. For convenience and performance, this method's response object will also contain an AppCheckToken (if the verification is successful).

@param app

Required. The relative resource name of the iOS app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsExchangeCustomToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeCustomTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Validates a custom token signed using your project's Admin SDK service account credentials. If valid, returns an AppCheckToken.

@param app

Required. The relative resource name of the app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsExchangeDebugToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeDebugTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Validates a debug token secret that you have previously created using CreateDebugToken. If valid, returns an AppCheckToken. Note that a restrictive quota is enforced on this method to prevent accidental exposure of the app to abuse.

@param app

Required. The relative resource name of the app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsExchangeDeviceCheckToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeDeviceCheckTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Accepts a device_token issued by DeviceCheck, and attempts to validate it with Apple. If valid, returns an AppCheckToken.

@param app

Required. The relative resource name of the iOS app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsExchangePlayIntegrityToken(app: string, req: GoogleFirebaseAppcheckV1ExchangePlayIntegrityTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Validates an integrity verdict response token from Play Integrity. If valid, returns an AppCheckToken.

@param app

Required. The relative resource name of the Android app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsExchangeRecaptchaEnterpriseToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeRecaptchaEnterpriseTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Validates a reCAPTCHA Enterprise response token. If valid, returns an AppCheckToken.

@param app

Required. The relative resource name of the web app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsExchangeRecaptchaV3Token(app: string, req: GoogleFirebaseAppcheckV1ExchangeRecaptchaV3TokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Validates a reCAPTCHA v3 response token. If valid, returns an AppCheckToken.

@param app

Required. The relative resource name of the web app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsExchangeSafetyNetToken(app: string, req: GoogleFirebaseAppcheckV1ExchangeSafetyNetTokenRequest): Promise<GoogleFirebaseAppcheckV1AppCheckToken>
[src]

Validates a SafetyNet token. If valid, returns an AppCheckToken.

@param app

Required. The relative resource name of the Android app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§

Generates a challenge that protects the integrity of an immediately following call to ExchangeAppAttestAttestation or ExchangeAppAttestAssertion. A challenge should not be reused for multiple calls.

@param app

Required. The relative resource name of the iOS app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§

Generates a challenge that protects the integrity of an immediately following integrity verdict request to the Play Integrity API. The next call to ExchangePlayIntegrityToken using the resulting integrity token will verify the presence and validity of the challenge. A challenge should not be reused for multiple calls.

@param app

Required. The relative resource name of the app, in the format: projects/{project_number}/apps/{app_id} If necessary, the project_number element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's AIP 2510 standard.

§
projectsAppsPlayIntegrityConfigBatchGet(parent: string, opts?: ProjectsAppsPlayIntegrityConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetPlayIntegrityConfigsResponse>
[src]

Atomically gets the PlayIntegrityConfigs for the specified list of apps.

@param parent

Required. The parent project name shared by all PlayIntegrityConfigs being retrieved, in the format projects/{project_number} The parent collection in the name field of any resource being retrieved must match this field, or the entire batch fails.

§
projectsAppsPlayIntegrityConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1PlayIntegrityConfig>
[src]

Gets the PlayIntegrityConfig for the specified app.

@param name

Required. The relative resource name of the PlayIntegrityConfig, in the format: projects/{project_number}/apps/{app_id}/playIntegrityConfig

§

Updates the PlayIntegrityConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange Play Integrity tokens for App Check tokens.

@param name

Required. The relative resource name of the Play Integrity configuration object, in the format: projects/{project_number}/apps/{app_id}/playIntegrityConfig

§

Atomically gets the RecaptchaEnterpriseConfigs for the specified list of apps.

@param parent

Required. The parent project name shared by all RecaptchaEnterpriseConfigs being retrieved, in the format projects/{project_number} The parent collection in the name field of any resource being retrieved must match this field, or the entire batch fails.

§
projectsAppsRecaptchaEnterpriseConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1RecaptchaEnterpriseConfig>
[src]

Gets the RecaptchaEnterpriseConfig for the specified app.

@param name

Required. The relative resource name of the RecaptchaEnterpriseConfig, in the format: projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig

§

Updates the RecaptchaEnterpriseConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA Enterprise tokens for App Check tokens.

@param name

Required. The relative resource name of the reCAPTCHA Enterprise configuration object, in the format: projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig

§
projectsAppsRecaptchaV3ConfigBatchGet(parent: string, opts?: ProjectsAppsRecaptchaV3ConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetRecaptchaV3ConfigsResponse>
[src]

Atomically gets the RecaptchaV3Configs for the specified list of apps. For security reasons, the site_secret field is never populated in the response.

@param parent

Required. The parent project name shared by all RecaptchaV3Configs being retrieved, in the format projects/{project_number} The parent collection in the name field of any resource being retrieved must match this field, or the entire batch fails.

§
projectsAppsRecaptchaV3ConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1RecaptchaV3Config>
[src]

Gets the RecaptchaV3Config for the specified app. For security reasons, the site_secret field is never populated in the response.

@param name

Required. The relative resource name of the RecaptchaV3Config, in the format: projects/{project_number}/apps/{app_id}/recaptchaV3Config

§

Updates the RecaptchaV3Config for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA tokens for App Check tokens. For security reasons, the site_secret field is never populated in the response.

@param name

Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: projects/{project_number}/apps/{app_id}/recaptchaV3Config

§
projectsAppsSafetyNetConfigBatchGet(parent: string, opts?: ProjectsAppsSafetyNetConfigBatchGetOptions): Promise<GoogleFirebaseAppcheckV1BatchGetSafetyNetConfigsResponse>
[src]

Atomically gets the SafetyNetConfigs for the specified list of apps.

@param parent

Required. The parent project name shared by all SafetyNetConfigs being retrieved, in the format projects/{project_number} The parent collection in the name field of any resource being retrieved must match this field, or the entire batch fails.

§
projectsAppsSafetyNetConfigGet(name: string): Promise<GoogleFirebaseAppcheckV1SafetyNetConfig>
[src]

Gets the SafetyNetConfig for the specified app.

@param name

Required. The relative resource name of the SafetyNetConfig, in the format: projects/{project_number}/apps/{app_id}/safetyNetConfig

§

Updates the SafetyNetConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange SafetyNet tokens for App Check tokens.

@param name

Required. The relative resource name of the SafetyNet configuration object, in the format: projects/{project_number}/apps/{app_id}/safetyNetConfig

§

Atomically updates the specified Service configurations.

@param parent

Required. The parent project name shared by all Service configurations being updated, in the format projects/{project_number} The parent collection in the name field of any resource being updated must match this field, or the entire batch fails.

§
projectsServicesGet(name: string): Promise<GoogleFirebaseAppcheckV1Service>
[src]

Gets the Service configuration for the specified service name.

@param name

Required. The relative resource name of the Service to retrieve, in the format: projects/{project_number}/services/{service_id} Note that the service_id element must be a supported service ID. Currently, the following service IDs are supported: * firebasestorage.googleapis.com (Cloud Storage for Firebase) * firebasedatabase.googleapis.com (Firebase Realtime Database) * firestore.googleapis.com (Cloud Firestore)

§
projectsServicesList(parent: string, opts?: ProjectsServicesListOptions): Promise<GoogleFirebaseAppcheckV1ListServicesResponse>
[src]

Lists all Service configurations for the specified project. Only Services which were explicitly configured using UpdateService or BatchUpdateServices will be returned.

@param parent

Required. The relative resource name of the parent project for which to list each associated Service, in the format: projects/{project_number}

§

Updates the specified Service configuration.

@param name

Required. The relative resource name of the service configuration object, in the format: projects/{project_number}/services/{service_id} Note that the service_id element must be a supported service ID. Currently, the following service IDs are supported: * firebasestorage.googleapis.com (Cloud Storage for Firebase) * firebasedatabase.googleapis.com (Firebase Realtime Database) * firestore.googleapis.com (Cloud Firestore)