@firebase/firestore 3.4.3-canary.4983f4d5a → 3.4.3-canary.73fcec982

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import { credentials, loadPackageDefinition, Metadata } from '@grpc/grpc-js';
8
8
  import { fromJSON } from '@grpc/proto-loader';
9
9
 
10
10
  const name = "@firebase/firestore";
11
- const version$1 = "3.4.3-canary.4983f4d5a";
11
+ const version$1 = "3.4.3-canary.73fcec982";
12
12
 
13
13
  /**
14
14
  * @license
@@ -61,7 +61,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
61
61
  User.FIRST_PARTY = new User('first-party-uid');
62
62
  User.MOCK_USER = new User('mock-user');
63
63
 
64
- const version = "9.6.4-canary.4983f4d5a";
64
+ const version = "9.6.4-canary.73fcec982";
65
65
 
66
66
  /**
67
67
  * @license
@@ -21878,13 +21878,16 @@ class FirestoreClient {
21878
21878
  this.user = User.UNAUTHENTICATED;
21879
21879
  this.clientId = AutoId.newId();
21880
21880
  this.authCredentialListener = () => Promise.resolve();
21881
+ this.appCheckCredentialListener = () => Promise.resolve();
21881
21882
  this.authCredentials.start(asyncQueue, async (user) => {
21882
21883
  logDebug(LOG_TAG$2, 'Received user=', user.uid);
21883
21884
  await this.authCredentialListener(user);
21884
21885
  this.user = user;
21885
21886
  });
21886
- // Register an empty credentials change listener to activate token refresh.
21887
- this.appCheckCredentials.start(asyncQueue, () => Promise.resolve());
21887
+ this.appCheckCredentials.start(asyncQueue, newAppCheckToken => {
21888
+ logDebug(LOG_TAG$2, 'Received new app check token=', newAppCheckToken);
21889
+ return this.appCheckCredentialListener(newAppCheckToken, this.user);
21890
+ });
21888
21891
  }
21889
21892
  async getConfiguration() {
21890
21893
  return {
@@ -21900,6 +21903,9 @@ class FirestoreClient {
21900
21903
  setCredentialChangeListener(listener) {
21901
21904
  this.authCredentialListener = listener;
21902
21905
  }
21906
+ setAppCheckTokenChangeListener(listener) {
21907
+ this.appCheckCredentialListener = listener;
21908
+ }
21903
21909
  /**
21904
21910
  * Checks that the client has not been terminated. Ensures that other methods on
21905
21911
  * this class cannot be called after the client is terminated.
@@ -21961,6 +21967,7 @@ async function setOnlineComponentProvider(client, onlineComponentProvider) {
21961
21967
  // The CredentialChangeListener of the online component provider takes
21962
21968
  // precedence over the offline component provider.
21963
21969
  client.setCredentialChangeListener(user => remoteStoreHandleCredentialChange(onlineComponentProvider.remoteStore, user));
21970
+ client.setAppCheckTokenChangeListener((_, user) => remoteStoreHandleCredentialChange(onlineComponentProvider.remoteStore, user));
21964
21971
  client.onlineComponents = onlineComponentProvider;
21965
21972
  }
21966
21973
  async function ensureOfflineComponents(client) {