@@ -1469,19 +1469,46 @@ declare namespace firebase.appCheck {
1469
1469
export interface AppCheck {
1470
1470
/**
1471
1471
* Activate AppCheck
1472
- * @param siteKeyOrOrovider - reCAPTCHA sitekey or custom token provider
1472
+ * @param siteKeyOrProvider reCAPTCHA v3 site key (public key) or
1473
+ * custom token provider.
1474
+ * @param isTokenAutoRefreshEnabled If true, the SDK automatically
1475
+ * refreshes App Check tokens as needed. If undefined, defaults to the
1476
+ * value of `app.automaticDataCollectionEnabled`, which defaults to
1477
+ * false and can be set in the app config.
1478
+ */
1479
+ activate (
1480
+ siteKeyOrProvider : string | AppCheckProvider ,
1481
+ isTokenAutoRefreshEnabled ?: boolean
1482
+ ) : void ;
1483
+
1484
+ /**
1485
+ *
1486
+ * @param isTokenAutoRefreshEnabled If true, the SDK automatically
1487
+ * refreshes App Check tokens as needed. This overrides any value set
1488
+ * during `activate()`.
1473
1489
*/
1474
- activate ( siteKeyOrProvider : string | AppCheckProvider ) : void ;
1490
+ setTokenAutoRefreshEnabled ( isTokenAutoRefreshEnabled : boolean ) : void ;
1475
1491
}
1476
1492
1493
+ /**
1494
+ * An App Check provider. This can be either the built-in reCAPTCHA
1495
+ * provider or a custom provider. For more on custom providers, see
1496
+ * https://firebase.google.com/docs/app-check/web-custom-provider
1497
+ */
1477
1498
interface AppCheckProvider {
1478
1499
/**
1479
- * returns an AppCheck token
1500
+ * Returns an AppCheck token.
1480
1501
*/
1481
1502
getToken ( ) : Promise < AppCheckToken > ;
1482
1503
}
1483
1504
1505
+ /**
1506
+ * The token returned from an {@link firebase.appCheck.AppCheckProvider `AppCheckProvider`}.
1507
+ */
1484
1508
interface AppCheckToken {
1509
+ /**
1510
+ * The token string in JWT format.
1511
+ */
1485
1512
readonly token : string ;
1486
1513
/**
1487
1514
* The local timestamp after which the token will expire.
0 commit comments