@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.
@@ -12,7 +12,7 @@ var grpcJs = require('@grpc/grpc-js');
12
12
  var protoLoader = require('@grpc/proto-loader');
13
13
 
14
14
  const name = "@firebase/firestore";
15
- const version$1 = "3.4.3-canary.4983f4d5a";
15
+ const version$1 = "3.4.3-canary.73fcec982";
16
16
 
17
17
  /**
18
18
  * @license
@@ -65,7 +65,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
65
65
  User.FIRST_PARTY = new User('first-party-uid');
66
66
  User.MOCK_USER = new User('mock-user');
67
67
 
68
- const version = "9.6.4-canary.4983f4d5a";
68
+ const version = "9.6.4-canary.73fcec982";
69
69
 
70
70
  /**
71
71
  * @license
@@ -21882,13 +21882,16 @@ class FirestoreClient {
21882
21882
  this.user = User.UNAUTHENTICATED;
21883
21883
  this.clientId = AutoId.newId();
21884
21884
  this.authCredentialListener = () => Promise.resolve();
21885
+ this.appCheckCredentialListener = () => Promise.resolve();
21885
21886
  this.authCredentials.start(asyncQueue, async (user) => {
21886
21887
  logDebug(LOG_TAG$2, 'Received user=', user.uid);
21887
21888
  await this.authCredentialListener(user);
21888
21889
  this.user = user;
21889
21890
  });
21890
- // Register an empty credentials change listener to activate token refresh.
21891
- this.appCheckCredentials.start(asyncQueue, () => Promise.resolve());
21891
+ this.appCheckCredentials.start(asyncQueue, newAppCheckToken => {
21892
+ logDebug(LOG_TAG$2, 'Received new app check token=', newAppCheckToken);
21893
+ return this.appCheckCredentialListener(newAppCheckToken, this.user);
21894
+ });
21892
21895
  }
21893
21896
  async getConfiguration() {
21894
21897
  return {
@@ -21904,6 +21907,9 @@ class FirestoreClient {
21904
21907
  setCredentialChangeListener(listener) {
21905
21908
  this.authCredentialListener = listener;
21906
21909
  }
21910
+ setAppCheckTokenChangeListener(listener) {
21911
+ this.appCheckCredentialListener = listener;
21912
+ }
21907
21913
  /**
21908
21914
  * Checks that the client has not been terminated. Ensures that other methods on
21909
21915
  * this class cannot be called after the client is terminated.
@@ -21965,6 +21971,7 @@ async function setOnlineComponentProvider(client, onlineComponentProvider) {
21965
21971
  // The CredentialChangeListener of the online component provider takes
21966
21972
  // precedence over the offline component provider.
21967
21973
  client.setCredentialChangeListener(user => remoteStoreHandleCredentialChange(onlineComponentProvider.remoteStore, user));
21974
+ client.setAppCheckTokenChangeListener((_, user) => remoteStoreHandleCredentialChange(onlineComponentProvider.remoteStore, user));
21968
21975
  client.onlineComponents = onlineComponentProvider;
21969
21976
  }
21970
21977
  async function ensureOfflineComponents(client) {