Verifies a Firebase App Check token (JWT). If the token is valid, the promise is fulfilled with the token's decoded claims; otherwise, the promise is rejected.
AppCheck.app
Signature:
readonlyapp:App;
AppCheck.createToken()
Creates a new AppCheckToken that can be sent back to a client.
Verifies a Firebase App Check token (JWT). If the token is valid, the promise is fulfilled with the token's decoded claims; otherwise, the promise is rejected.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-05-09 UTC."],[],[],null,["# AppCheck class\n\nThe Firebase `AppCheck` service interface.\n\n**Signature:** \n\n export declare class AppCheck \n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-----------------------------------------------------------|-----------|------|-------------|\n| [app](./firebase-admin.app-check.appcheck.md#appcheckapp) | | App | |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|---------------------------------------------------------------------------------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [createToken(appId, options)](./firebase-admin.app-check.appcheck.md#appcheckcreatetoken) | | Creates a new [AppCheckToken](./firebase-admin.app-check.appchecktoken.md#appchecktoken_interface) that can be sent back to a client. |\n| [verifyToken(appCheckToken, options)](./firebase-admin.app-check.appcheck.md#appcheckverifytoken) | | Verifies a Firebase App Check token (JWT). If the token is valid, the promise is fulfilled with the token's decoded claims; otherwise, the promise is rejected. |\n\nAppCheck.app\n------------\n\n**Signature:** \n\n readonly app: App;\n\nAppCheck.createToken()\n----------------------\n\nCreates a new [AppCheckToken](./firebase-admin.app-check.appchecktoken.md#appchecktoken_interface) that can be sent back to a client.\n\n**Signature:** \n\n createToken(appId: string, options?: AppCheckTokenOptions): Promise\u003cAppCheckToken\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|\n| appId | string | The app ID to use as the JWT app_id. |\n| options | [AppCheckTokenOptions](./firebase-admin.app-check.appchecktokenoptions.md#appchecktokenoptions_interface) | Optional options object when creating a new App Check Token. |\n\n**Returns:**\n\nPromise\\\u003c[AppCheckToken](./firebase-admin.app-check.appchecktoken.md#appchecktoken_interface)\\\u003e\n\nA promise that fulfills with a `AppCheckToken`.\n\nAppCheck.verifyToken()\n----------------------\n\nVerifies a Firebase App Check token (JWT). If the token is valid, the promise is fulfilled with the token's decoded claims; otherwise, the promise is rejected.\n\n**Signature:** \n\n verifyToken(appCheckToken: string, options?: VerifyAppCheckTokenOptions): Promise\u003cVerifyAppCheckTokenResponse\u003e;\n\n### Parameters\n\n| Parameter | Type | Description |\n|---------------|-----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| appCheckToken | string | The App Check token to verify. |\n| options | [VerifyAppCheckTokenOptions](./firebase-admin.app-check.verifyappchecktokenoptions.md#verifyappchecktokenoptions_interface) | Optional [VerifyAppCheckTokenOptions](./firebase-admin.app-check.verifyappchecktokenoptions.md#verifyappchecktokenoptions_interface) object when verifying an App Check Token. |\n\n**Returns:**\n\nPromise\\\u003c[VerifyAppCheckTokenResponse](./firebase-admin.app-check.verifyappchecktokenresponse.md#verifyappchecktokenresponse_interface)\\\u003e\n\nA promise fulfilled with the token's decoded claims if the App Check token is valid; otherwise, a rejected promise."]]