AppCheck class Stay organized with collections Save and categorize content based on your preferences.
The FirebaseAppCheck service interface.
Signature:
exportdeclareclassAppCheckProperties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| app | App |
Methods
| Method | Modifiers | Description |
|---|---|---|
| createToken(appId, options) | Creates a newAppCheckToken that can be sent back to a client. | |
| verifyToken(appCheckToken, options) | 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 newAppCheckToken that can be sent back to a client.
Signature:
createToken(appId:string,options?:AppCheckTokenOptions):Promise<AppCheckToken>;Parameters
| Parameter | Type | Description |
|---|---|---|
| appId | string | The app ID to use as the JWT app_id. |
| options | AppCheckTokenOptions | Optional options object when creating a new App Check Token. |
Returns:
Promise<AppCheckToken>
A promise that fulfills with aAppCheckToken.
AppCheck.verifyToken()
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.
Signature:
verifyToken(appCheckToken:string,options?:VerifyAppCheckTokenOptions):Promise<VerifyAppCheckTokenResponse>;Parameters
| Parameter | Type | Description |
|---|---|---|
| appCheckToken | string | The App Check token to verify. |
| options | VerifyAppCheckTokenOptions | OptionalVerifyAppCheckTokenOptions object when verifying an App Check Token. |
Returns:
Promise<VerifyAppCheckTokenResponse>
A promise fulfilled with the token's decoded claims if the App Check token is valid; otherwise, a rejected promise.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-05-09 UTC.