Skip to content

Commit

Permalink
docs(app-check): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz committed Feb 6, 2025
1 parent 7f6117e commit 11953fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 4 additions & 4 deletions packages/app-check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ A working example can be found here: [robingenz/capacitor-firebase-plugin-demo](

## Usage


```typescript
import { FirebaseAppCheck } from '@capacitor-firebase/app-check';
import { ReCaptchaV3Provider } from '@capacitor-firebase/app-check';
import { Capacitor } from '@capacitor/core';

const initialize = async () => {
await FirebaseAppCheck.initialize({
provider: new ReCaptchaV3Provider('myKey');
provider: Capacitor.getPlatform() === 'web' ? new ReCaptchaV3Provider('myKey') : undefined,
});
};

Expand Down Expand Up @@ -214,8 +214,8 @@ Only available for Web.
| **`debug`** | <code>boolean</code> | If `true`, the debug provider is used. ⚠️ **Attention**: The debug provider allows access to your Firebase resources from unverified devices. Don't use the debug provider in production builds of your app, and don't share your debug builds with untrusted parties. ⚠️ **Deprecated**: Use `debugToken` instead. This option will be removed in the next major version. Read more: https://firebase.google.com/docs/app-check/web/debug-provider | <code>false</code> | 1.3.0 |
| **`debugToken`** | <code>string \| boolean</code> | If `true`, the debug provider is used. On **Web**, you can also set a predefined debug token string instead of `true`. On Android and iOS, you have to use environment variables for this. ⚠️ **Attention**: The debug provider allows access to your Firebase resources from unverified devices. Don't use the debug provider in production builds of your app, and don't share your debug builds with untrusted parties. | <code>false</code> | 7.1.0 |
| **`isTokenAutoRefreshEnabled`** | <code>boolean</code> | If `true`, the SDK automatically refreshes App Check tokens as needed. | <code>false</code> | 1.3.0 |
| **`provider`** | <code>any</code> | The provider to use for App Check. Must be an instance of `ReCaptchaV3Provider`, `ReCaptchaEnterpriseProvider`, or `CustomProvider`. Only available for Web. Read more: https://firebase.google.com/docs/app-check/web/custom-provider | <code>ReCaptchaV3Provider</code> | 7.1.0 |
| **`siteKey`** | <code>string</code> | The reCAPTCHA v3 site key (public key). Only available for Web. ⚠️ **Attention**: This option is ignored if `provider` is set. ⚠️ **Deprecated**: Prefer using `provider` option instead. This option will be removed in the next major version. | | 1.3.0 |
| **`provider`** | <code>any</code> | The provider to use for App Check. Must be an instance of `ReCaptchaV3Provider`, `ReCaptchaEnterpriseProvider`, or `CustomProvider`. Only available for Web. | <code>ReCaptchaV3Provider</code> | 7.1.0 |
| **`siteKey`** | <code>string</code> | The reCAPTCHA v3 site key (public key). This option is ignored when `provider` is set. Only available for Web. | | 1.3.0 |


#### InstanceFactoryOptions
Expand Down
8 changes: 2 additions & 6 deletions packages/app-check/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,16 @@ export interface InitializeOptions {
*
* Only available for Web.
*
* Read more: https://firebase.google.com/docs/app-check/web/custom-provider
*
* @since 7.1.0
* @default ReCaptchaV3Provider
* @see https://firebase.google.com/docs/app-check/web/custom-provider
*/
provider?: any;
/**
* The reCAPTCHA v3 site key (public key).
* The reCAPTCHA v3 site key (public key). This option is ignored when `provider` is set.
*
* Only available for Web.
*
* ⚠️ **Attention**: This option is ignored if `provider` is set.
* ⚠️ **Deprecated**: Prefer using `provider` option instead. This option will be removed in the next major version.
*
* @deprecated Use `provider` instead.
* @since 1.3.0
*/
Expand Down

0 comments on commit 11953fd

Please sign in to comment.