@azure/msal-browser 3.24.0 → 3.26.0

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.
Files changed (132) hide show
  1. package/README.md +1 -1
  2. package/dist/app/IPublicClientApplication.d.ts +2 -1
  3. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  4. package/dist/app/IPublicClientApplication.mjs +1 -1
  5. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  6. package/dist/app/PublicClientApplication.d.ts +3 -1
  7. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  8. package/dist/app/PublicClientApplication.mjs +4 -3
  9. package/dist/app/PublicClientApplication.mjs.map +1 -1
  10. package/dist/app/PublicClientNext.d.ts +2 -1
  11. package/dist/app/PublicClientNext.d.ts.map +1 -1
  12. package/dist/app/PublicClientNext.mjs +3 -3
  13. package/dist/app/PublicClientNext.mjs.map +1 -1
  14. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
  15. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  16. package/dist/cache/AccountManager.mjs +1 -1
  17. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  18. package/dist/cache/BrowserCacheManager.mjs +1 -1
  19. package/dist/cache/BrowserStorage.mjs +1 -1
  20. package/dist/cache/DatabaseStorage.mjs +1 -1
  21. package/dist/cache/MemoryStorage.mjs +1 -1
  22. package/dist/cache/TokenCache.mjs +1 -1
  23. package/dist/config/Configuration.mjs +1 -1
  24. package/dist/controllers/ControllerFactory.mjs +1 -1
  25. package/dist/controllers/IController.d.ts +2 -4
  26. package/dist/controllers/IController.d.ts.map +1 -1
  27. package/dist/controllers/NestedAppAuthController.d.ts +3 -6
  28. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  29. package/dist/controllers/NestedAppAuthController.mjs +5 -11
  30. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  31. package/dist/controllers/StandardController.d.ts +7 -5
  32. package/dist/controllers/StandardController.d.ts.map +1 -1
  33. package/dist/controllers/StandardController.mjs +78 -14
  34. package/dist/controllers/StandardController.mjs.map +1 -1
  35. package/dist/controllers/UnknownOperatingContextController.d.ts +2 -4
  36. package/dist/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  37. package/dist/controllers/UnknownOperatingContextController.mjs +10 -11
  38. package/dist/controllers/UnknownOperatingContextController.mjs.map +1 -1
  39. package/dist/crypto/BrowserCrypto.mjs +1 -1
  40. package/dist/crypto/CryptoOps.mjs +1 -1
  41. package/dist/crypto/PkceGenerator.mjs +1 -1
  42. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  43. package/dist/encode/Base64Decode.mjs +1 -1
  44. package/dist/encode/Base64Encode.mjs +1 -1
  45. package/dist/error/BrowserAuthError.mjs +1 -1
  46. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  47. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  48. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  49. package/dist/error/NativeAuthError.mjs +1 -1
  50. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  51. package/dist/error/NestedAppAuthError.mjs +1 -1
  52. package/dist/event/EventHandler.d.ts +6 -18
  53. package/dist/event/EventHandler.d.ts.map +1 -1
  54. package/dist/event/EventHandler.mjs +23 -87
  55. package/dist/event/EventHandler.mjs.map +1 -1
  56. package/dist/event/EventMessage.mjs +1 -1
  57. package/dist/event/EventType.mjs +1 -1
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.mjs +2 -1
  61. package/dist/index.mjs.map +1 -1
  62. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  63. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  64. package/dist/interaction_client/NativeInteractionClient.mjs +1 -1
  65. package/dist/interaction_client/PopupClient.mjs +1 -1
  66. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  67. package/dist/interaction_client/RedirectClient.mjs +20 -2
  68. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  69. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  70. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  71. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  72. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  73. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  74. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  75. package/dist/interaction_handler/RedirectHandler.mjs +1 -1
  76. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  77. package/dist/naa/BridgeError.mjs +1 -1
  78. package/dist/naa/BridgeProxy.mjs +1 -1
  79. package/dist/naa/BridgeStatusCode.mjs +1 -1
  80. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  81. package/dist/navigation/NavigationClient.mjs +1 -1
  82. package/dist/network/FetchClient.mjs +1 -1
  83. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  84. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  85. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  86. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  87. package/dist/packageMetadata.d.ts +1 -1
  88. package/dist/packageMetadata.mjs +2 -2
  89. package/dist/request/RequestHelpers.mjs +1 -1
  90. package/dist/response/ResponseHandler.mjs +1 -1
  91. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  92. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  93. package/dist/utils/BrowserConstants.mjs +1 -1
  94. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  95. package/dist/utils/BrowserUtils.mjs +1 -1
  96. package/lib/msal-browser.cjs +198 -183
  97. package/lib/msal-browser.cjs.map +1 -1
  98. package/lib/msal-browser.js +198 -183
  99. package/lib/msal-browser.js.map +1 -1
  100. package/lib/msal-browser.min.js +61 -61
  101. package/lib/types/app/IPublicClientApplication.d.ts +2 -1
  102. package/lib/types/app/IPublicClientApplication.d.ts.map +1 -1
  103. package/lib/types/app/PublicClientApplication.d.ts +3 -1
  104. package/lib/types/app/PublicClientApplication.d.ts.map +1 -1
  105. package/lib/types/app/PublicClientNext.d.ts +2 -1
  106. package/lib/types/app/PublicClientNext.d.ts.map +1 -1
  107. package/lib/types/controllers/IController.d.ts +2 -4
  108. package/lib/types/controllers/IController.d.ts.map +1 -1
  109. package/lib/types/controllers/NestedAppAuthController.d.ts +3 -6
  110. package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  111. package/lib/types/controllers/StandardController.d.ts +7 -5
  112. package/lib/types/controllers/StandardController.d.ts.map +1 -1
  113. package/lib/types/controllers/UnknownOperatingContextController.d.ts +2 -4
  114. package/lib/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  115. package/lib/types/event/EventHandler.d.ts +6 -18
  116. package/lib/types/event/EventHandler.d.ts.map +1 -1
  117. package/lib/types/index.d.ts +1 -0
  118. package/lib/types/index.d.ts.map +1 -1
  119. package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
  120. package/lib/types/packageMetadata.d.ts +1 -1
  121. package/package.json +2 -4
  122. package/src/app/IPublicClientApplication.ts +5 -1
  123. package/src/app/PublicClientApplication.ts +7 -2
  124. package/src/app/PublicClientNext.ts +6 -2
  125. package/src/controllers/IController.ts +5 -5
  126. package/src/controllers/NestedAppAuthController.ts +7 -11
  127. package/src/controllers/StandardController.ts +105 -13
  128. package/src/controllers/UnknownOperatingContextController.ts +12 -14
  129. package/src/event/EventHandler.ts +42 -117
  130. package/src/index.ts +1 -0
  131. package/src/interaction_client/RedirectClient.ts +25 -1
  132. package/src/packageMetadata.ts +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v3.24.0 2024-09-20 */
1
+ /*! @azure/msal-browser v3.26.0 2024-10-08 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -6,7 +6,7 @@
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
7
7
  })(this, (function (exports) { 'use strict';
8
8
 
9
- /*! @azure/msal-common v14.15.0 2024-09-20 */
9
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -315,7 +315,7 @@
315
315
  // Token renewal offset default in seconds
316
316
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
317
317
 
318
- /*! @azure/msal-common v14.15.0 2024-09-20 */
318
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
319
319
  /*
320
320
  * Copyright (c) Microsoft Corporation. All rights reserved.
321
321
  * Licensed under the MIT License.
@@ -332,7 +332,7 @@
332
332
  unexpectedError: unexpectedError
333
333
  });
334
334
 
335
- /*! @azure/msal-common v14.15.0 2024-09-20 */
335
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
336
336
 
337
337
  /*
338
338
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -381,7 +381,7 @@
381
381
  : AuthErrorMessages[code]);
382
382
  }
383
383
 
384
- /*! @azure/msal-common v14.15.0 2024-09-20 */
384
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
385
385
  /*
386
386
  * Copyright (c) Microsoft Corporation. All rights reserved.
387
387
  * Licensed under the MIT License.
@@ -479,7 +479,7 @@
479
479
  userTimeoutReached: userTimeoutReached
480
480
  });
481
481
 
482
- /*! @azure/msal-common v14.15.0 2024-09-20 */
482
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
483
483
 
484
484
  /*
485
485
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -731,7 +731,7 @@
731
731
  return new ClientAuthError(errorCode, additionalMessage);
732
732
  }
733
733
 
734
- /*! @azure/msal-common v14.15.0 2024-09-20 */
734
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
735
735
 
736
736
  /*
737
737
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -770,7 +770,7 @@
770
770
  },
771
771
  };
772
772
 
773
- /*! @azure/msal-common v14.15.0 2024-09-20 */
773
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
774
774
 
775
775
  /*
776
776
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -961,12 +961,12 @@
961
961
  }
962
962
  }
963
963
 
964
- /*! @azure/msal-common v14.15.0 2024-09-20 */
964
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
965
965
  /* eslint-disable header/header */
966
966
  const name$1 = "@azure/msal-common";
967
967
  const version$1 = "14.15.0";
968
968
 
969
- /*! @azure/msal-common v14.15.0 2024-09-20 */
969
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
970
970
  /*
971
971
  * Copyright (c) Microsoft Corporation. All rights reserved.
972
972
  * Licensed under the MIT License.
@@ -986,7 +986,7 @@
986
986
  AzureUsGovernment: "https://login.microsoftonline.us",
987
987
  };
988
988
 
989
- /*! @azure/msal-common v14.15.0 2024-09-20 */
989
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
990
990
 
991
991
  /*
992
992
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1047,7 +1047,7 @@
1047
1047
  }
1048
1048
  }
1049
1049
 
1050
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1050
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1051
1051
  /*
1052
1052
  * Copyright (c) Microsoft Corporation. All rights reserved.
1053
1053
  * Licensed under the MIT License.
@@ -1084,7 +1084,7 @@
1084
1084
  return cachedAtSec > nowSeconds();
1085
1085
  }
1086
1086
 
1087
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1087
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1088
1088
 
1089
1089
  /*
1090
1090
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1411,7 +1411,7 @@
1411
1411
  return metadata.expiresAt <= nowSeconds();
1412
1412
  }
1413
1413
 
1414
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1414
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1415
1415
  /*
1416
1416
  * Copyright (c) Microsoft Corporation. All rights reserved.
1417
1417
  * Licensed under the MIT License.
@@ -1465,7 +1465,7 @@
1465
1465
  urlParseError: urlParseError
1466
1466
  });
1467
1467
 
1468
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1468
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1469
1469
 
1470
1470
  /*
1471
1471
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1603,7 +1603,7 @@
1603
1603
  return new ClientConfigurationError(errorCode);
1604
1604
  }
1605
1605
 
1606
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1606
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1607
1607
  /*
1608
1608
  * Copyright (c) Microsoft Corporation. All rights reserved.
1609
1609
  * Licensed under the MIT License.
@@ -1700,7 +1700,7 @@
1700
1700
  }
1701
1701
  }
1702
1702
 
1703
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1703
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1704
1704
 
1705
1705
  /*
1706
1706
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1900,7 +1900,7 @@
1900
1900
  }
1901
1901
  }
1902
1902
 
1903
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1903
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1904
1904
 
1905
1905
  /*
1906
1906
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1940,7 +1940,7 @@
1940
1940
  };
1941
1941
  }
1942
1942
 
1943
- /*! @azure/msal-common v14.15.0 2024-09-20 */
1943
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
1944
1944
  /*
1945
1945
  * Copyright (c) Microsoft Corporation. All rights reserved.
1946
1946
  * Licensed under the MIT License.
@@ -2019,7 +2019,7 @@
2019
2019
  return updatedAccountInfo;
2020
2020
  }
2021
2021
 
2022
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2022
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2023
2023
  /*
2024
2024
  * Copyright (c) Microsoft Corporation. All rights reserved.
2025
2025
  * Licensed under the MIT License.
@@ -2034,7 +2034,7 @@
2034
2034
  Ciam: 3,
2035
2035
  };
2036
2036
 
2037
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2037
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2038
2038
  /*
2039
2039
  * Copyright (c) Microsoft Corporation. All rights reserved.
2040
2040
  * Licensed under the MIT License.
@@ -2056,7 +2056,7 @@
2056
2056
  return null;
2057
2057
  }
2058
2058
 
2059
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2059
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2060
2060
  /*
2061
2061
  * Copyright (c) Microsoft Corporation. All rights reserved.
2062
2062
  * Licensed under the MIT License.
@@ -2069,7 +2069,7 @@
2069
2069
  OIDC: "OIDC",
2070
2070
  };
2071
2071
 
2072
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2072
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2073
2073
 
2074
2074
  /*
2075
2075
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2312,7 +2312,7 @@
2312
2312
  }
2313
2313
  }
2314
2314
 
2315
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2315
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2316
2316
 
2317
2317
  /*
2318
2318
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2359,7 +2359,7 @@
2359
2359
  return null;
2360
2360
  }
2361
2361
 
2362
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2362
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2363
2363
 
2364
2364
  /*
2365
2365
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2523,7 +2523,7 @@
2523
2523
  }
2524
2524
  }
2525
2525
 
2526
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2526
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2527
2527
 
2528
2528
  /*
2529
2529
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2663,7 +2663,7 @@
2663
2663
  return null;
2664
2664
  }
2665
2665
 
2666
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2666
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2667
2667
  /*
2668
2668
  * Copyright (c) Microsoft Corporation. All rights reserved.
2669
2669
  * Licensed under the MIT License.
@@ -2671,7 +2671,7 @@
2671
2671
  const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
2672
2672
  const cacheUnknownErrorCode = "cache_error_unknown";
2673
2673
 
2674
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2674
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2675
2675
 
2676
2676
  /*
2677
2677
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2698,7 +2698,7 @@
2698
2698
  }
2699
2699
  }
2700
2700
 
2701
- /*! @azure/msal-common v14.15.0 2024-09-20 */
2701
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
2702
2702
 
2703
2703
  /*
2704
2704
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3950,7 +3950,7 @@
3950
3950
  }
3951
3951
  }
3952
3952
 
3953
- /*! @azure/msal-common v14.15.0 2024-09-20 */
3953
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
3954
3954
 
3955
3955
  /*
3956
3956
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4049,7 +4049,7 @@
4049
4049
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
4050
4050
  }
4051
4051
 
4052
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4052
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4053
4053
 
4054
4054
  /*
4055
4055
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4068,7 +4068,7 @@
4068
4068
  }
4069
4069
  }
4070
4070
 
4071
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4071
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4072
4072
 
4073
4073
  /*
4074
4074
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4166,7 +4166,7 @@
4166
4166
  }
4167
4167
  }
4168
4168
 
4169
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4169
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4170
4170
 
4171
4171
  /*
4172
4172
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4203,7 +4203,7 @@
4203
4203
  }
4204
4204
  }
4205
4205
 
4206
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4206
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4207
4207
  /*
4208
4208
  * Copyright (c) Microsoft Corporation. All rights reserved.
4209
4209
  * Licensed under the MIT License.
@@ -4213,7 +4213,7 @@
4213
4213
  UPN: "UPN",
4214
4214
  };
4215
4215
 
4216
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4216
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4217
4217
  /*
4218
4218
  * Copyright (c) Microsoft Corporation. All rights reserved.
4219
4219
  * Licensed under the MIT License.
@@ -4261,7 +4261,7 @@
4261
4261
  const DOMAIN_HINT = "domain_hint";
4262
4262
  const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
4263
4263
 
4264
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4264
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4265
4265
 
4266
4266
  /*
4267
4267
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4328,7 +4328,7 @@
4328
4328
  }
4329
4329
  }
4330
4330
 
4331
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4331
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4332
4332
 
4333
4333
  /*
4334
4334
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4713,7 +4713,7 @@
4713
4713
  }
4714
4714
  }
4715
4715
 
4716
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4716
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4717
4717
  /*
4718
4718
  * Copyright (c) Microsoft Corporation. All rights reserved.
4719
4719
  * Licensed under the MIT License.
@@ -4725,7 +4725,7 @@
4725
4725
  response.hasOwnProperty("jwks_uri"));
4726
4726
  }
4727
4727
 
4728
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4728
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4729
4729
  /*
4730
4730
  * Copyright (c) Microsoft Corporation. All rights reserved.
4731
4731
  * Licensed under the MIT License.
@@ -4735,7 +4735,7 @@
4735
4735
  response.hasOwnProperty("metadata"));
4736
4736
  }
4737
4737
 
4738
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4738
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4739
4739
  /*
4740
4740
  * Copyright (c) Microsoft Corporation. All rights reserved.
4741
4741
  * Licensed under the MIT License.
@@ -4745,7 +4745,7 @@
4745
4745
  response.hasOwnProperty("error_description"));
4746
4746
  }
4747
4747
 
4748
- /*! @azure/msal-common v14.15.0 2024-09-20 */
4748
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
4749
4749
  /*
4750
4750
  * Copyright (c) Microsoft Corporation. All rights reserved.
4751
4751
  * Licensed under the MIT License.
@@ -5227,7 +5227,7 @@
5227
5227
  "multiMatchedRT",
5228
5228
  ]);
5229
5229
 
5230
- /*! @azure/msal-common v14.15.0 2024-09-20 */
5230
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
5231
5231
  /*
5232
5232
  * Copyright (c) Microsoft Corporation. All rights reserved.
5233
5233
  * Licensed under the MIT License.
@@ -5323,7 +5323,7 @@
5323
5323
  };
5324
5324
  };
5325
5325
 
5326
- /*! @azure/msal-common v14.15.0 2024-09-20 */
5326
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
5327
5327
 
5328
5328
  /*
5329
5329
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5432,7 +5432,7 @@
5432
5432
  },
5433
5433
  };
5434
5434
 
5435
- /*! @azure/msal-common v14.15.0 2024-09-20 */
5435
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
5436
5436
 
5437
5437
  /*
5438
5438
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6271,7 +6271,7 @@
6271
6271
  };
6272
6272
  }
6273
6273
 
6274
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6274
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6275
6275
 
6276
6276
  /*
6277
6277
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6302,7 +6302,7 @@
6302
6302
  }
6303
6303
  }
6304
6304
 
6305
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6305
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6306
6306
 
6307
6307
  /*
6308
6308
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6405,7 +6405,7 @@
6405
6405
  }
6406
6406
  }
6407
6407
 
6408
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6408
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6409
6409
  /*
6410
6410
  * Copyright (c) Microsoft Corporation. All rights reserved.
6411
6411
  * Licensed under the MIT License.
@@ -6431,7 +6431,7 @@
6431
6431
  refreshTokenExpired: refreshTokenExpired
6432
6432
  });
6433
6433
 
6434
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6434
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6435
6435
 
6436
6436
  /*
6437
6437
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6519,7 +6519,7 @@
6519
6519
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
6520
6520
  }
6521
6521
 
6522
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6522
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6523
6523
 
6524
6524
  /*
6525
6525
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6591,7 +6591,7 @@
6591
6591
  }
6592
6592
  }
6593
6593
 
6594
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6594
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6595
6595
 
6596
6596
  /*
6597
6597
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6675,7 +6675,7 @@
6675
6675
  }
6676
6676
  }
6677
6677
 
6678
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6678
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6679
6679
  /*
6680
6680
  * Copyright (c) Microsoft Corporation. All rights reserved.
6681
6681
  * Licensed under the MIT License.
@@ -6702,7 +6702,7 @@
6702
6702
  }
6703
6703
  }
6704
6704
 
6705
- /*! @azure/msal-common v14.15.0 2024-09-20 */
6705
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
6706
6706
 
6707
6707
  /*
6708
6708
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7079,7 +7079,7 @@
7079
7079
  return baseAccount;
7080
7080
  }
7081
7081
 
7082
- /*! @azure/msal-common v14.15.0 2024-09-20 */
7082
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7083
7083
  /*
7084
7084
  * Copyright (c) Microsoft Corporation. All rights reserved.
7085
7085
  * Licensed under the MIT License.
@@ -7097,7 +7097,7 @@
7097
7097
  }
7098
7098
  }
7099
7099
 
7100
- /*! @azure/msal-common v14.15.0 2024-09-20 */
7100
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7101
7101
 
7102
7102
  /*
7103
7103
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7528,7 +7528,7 @@
7528
7528
  }
7529
7529
  }
7530
7530
 
7531
- /*! @azure/msal-common v14.15.0 2024-09-20 */
7531
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7532
7532
 
7533
7533
  /*
7534
7534
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7742,7 +7742,7 @@
7742
7742
  }
7743
7743
  }
7744
7744
 
7745
- /*! @azure/msal-common v14.15.0 2024-09-20 */
7745
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7746
7746
 
7747
7747
  /*
7748
7748
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7878,7 +7878,7 @@
7878
7878
  }
7879
7879
  }
7880
7880
 
7881
- /*! @azure/msal-common v14.15.0 2024-09-20 */
7881
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7882
7882
 
7883
7883
  /*
7884
7884
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7893,7 +7893,7 @@
7893
7893
  },
7894
7894
  };
7895
7895
 
7896
- /*! @azure/msal-common v14.15.0 2024-09-20 */
7896
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7897
7897
 
7898
7898
  /*
7899
7899
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7951,7 +7951,7 @@
7951
7951
  }
7952
7952
  }
7953
7953
 
7954
- /*! @azure/msal-common v14.15.0 2024-09-20 */
7954
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
7955
7955
 
7956
7956
  /*
7957
7957
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8214,7 +8214,7 @@
8214
8214
  }
8215
8215
  }
8216
8216
 
8217
- /*! @azure/msal-common v14.15.0 2024-09-20 */
8217
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8218
8218
  /*
8219
8219
  * Copyright (c) Microsoft Corporation. All rights reserved.
8220
8220
  * Licensed under the MIT License.
@@ -8222,7 +8222,7 @@
8222
8222
  const missingKidError = "missing_kid_error";
8223
8223
  const missingAlgError = "missing_alg_error";
8224
8224
 
8225
- /*! @azure/msal-common v14.15.0 2024-09-20 */
8225
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8226
8226
 
8227
8227
  /*
8228
8228
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8247,7 +8247,7 @@
8247
8247
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
8248
8248
  }
8249
8249
 
8250
- /*! @azure/msal-common v14.15.0 2024-09-20 */
8250
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8251
8251
 
8252
8252
  /*
8253
8253
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8287,7 +8287,7 @@
8287
8287
  }
8288
8288
  }
8289
8289
 
8290
- /*! @azure/msal-common v14.15.0 2024-09-20 */
8290
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8291
8291
 
8292
8292
  /*
8293
8293
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8366,7 +8366,7 @@
8366
8366
  }
8367
8367
  }
8368
8368
 
8369
- /*! @azure/msal-common v14.15.0 2024-09-20 */
8369
+ /*! @azure/msal-common v14.15.0 2024-10-08 */
8370
8370
 
8371
8371
  /*
8372
8372
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10238,7 +10238,7 @@
10238
10238
 
10239
10239
  /* eslint-disable header/header */
10240
10240
  const name = "@azure/msal-browser";
10241
- const version = "3.24.0";
10241
+ const version = "3.26.0";
10242
10242
 
10243
10243
  /*
10244
10244
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -12709,24 +12709,26 @@
12709
12709
  * Licensed under the MIT License.
12710
12710
  */
12711
12711
  class EventHandler {
12712
- constructor(logger, browserCrypto) {
12712
+ constructor(logger) {
12713
12713
  this.eventCallbacks = new Map();
12714
- this.logger = logger;
12715
- this.browserCrypto = browserCrypto;
12716
- this.listeningToStorageEvents = false;
12717
- this.handleAccountCacheChange =
12718
- this.handleAccountCacheChange.bind(this);
12714
+ this.logger = logger || new Logger({});
12719
12715
  }
12720
12716
  /**
12721
12717
  * Adds event callbacks to array
12722
- * @param callback
12718
+ * @param callback - callback to be invoked when an event is raised
12719
+ * @param eventTypes - list of events that this callback will be invoked for, if not provided callback will be invoked for all events
12720
+ * @param callbackId - Identifier for the callback, used to locate and remove the callback when no longer required
12723
12721
  */
12724
- addEventCallback(callback) {
12722
+ addEventCallback(callback, eventTypes, callbackId) {
12725
12723
  if (typeof window !== "undefined") {
12726
- const callbackId = createNewGuid();
12727
- this.eventCallbacks.set(callbackId, callback);
12728
- this.logger.verbose(`Event callback registered with id: ${callbackId}`);
12729
- return callbackId;
12724
+ const id = callbackId || createGuid();
12725
+ if (this.eventCallbacks.has(id)) {
12726
+ this.logger.error(`Event callback with id: ${id} is already registered. Please provide a unique id or remove the existing callback and try again.`);
12727
+ return null;
12728
+ }
12729
+ this.eventCallbacks.set(id, [callback, eventTypes || []]);
12730
+ this.logger.verbose(`Event callback registered with id: ${id}`);
12731
+ return id;
12730
12732
  }
12731
12733
  return null;
12732
12734
  }
@@ -12738,38 +12740,6 @@
12738
12740
  this.eventCallbacks.delete(callbackId);
12739
12741
  this.logger.verbose(`Event callback ${callbackId} removed.`);
12740
12742
  }
12741
- /**
12742
- * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
12743
- */
12744
- enableAccountStorageEvents() {
12745
- if (typeof window === "undefined") {
12746
- return;
12747
- }
12748
- if (!this.listeningToStorageEvents) {
12749
- this.logger.verbose("Adding account storage listener.");
12750
- this.listeningToStorageEvents = true;
12751
- window.addEventListener("storage", this.handleAccountCacheChange);
12752
- }
12753
- else {
12754
- this.logger.verbose("Account storage listener already registered.");
12755
- }
12756
- }
12757
- /**
12758
- * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
12759
- */
12760
- disableAccountStorageEvents() {
12761
- if (typeof window === "undefined") {
12762
- return;
12763
- }
12764
- if (this.listeningToStorageEvents) {
12765
- this.logger.verbose("Removing account storage listener.");
12766
- window.removeEventListener("storage", this.handleAccountCacheChange);
12767
- this.listeningToStorageEvents = false;
12768
- }
12769
- else {
12770
- this.logger.verbose("No account storage listener registered.");
12771
- }
12772
- }
12773
12743
  /**
12774
12744
  * Emits events by calling callback with event message
12775
12745
  * @param eventType
@@ -12786,48 +12756,15 @@
12786
12756
  error: error || null,
12787
12757
  timestamp: Date.now(),
12788
12758
  };
12789
- this.logger.info(`Emitting event: ${eventType}`);
12790
- this.eventCallbacks.forEach((callback, callbackId) => {
12791
- this.logger.verbose(`Emitting event to callback ${callbackId}: ${eventType}`);
12792
- callback.apply(null, [message]);
12759
+ this.eventCallbacks.forEach(([callback, eventTypes], callbackId) => {
12760
+ if (eventTypes.length === 0 ||
12761
+ eventTypes.includes(eventType)) {
12762
+ this.logger.verbose(`Emitting event to callback ${callbackId}: ${eventType}`);
12763
+ callback.apply(null, [message]);
12764
+ }
12793
12765
  });
12794
12766
  }
12795
12767
  }
12796
- /**
12797
- * Emit account added/removed events when cached accounts are changed in a different tab or frame
12798
- */
12799
- handleAccountCacheChange(e) {
12800
- try {
12801
- // Handle active account filter change
12802
- if (e.key?.includes(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS)) {
12803
- // This event has no payload, it only signals cross-tab app instances that the results of calling getActiveAccount() will have changed
12804
- this.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);
12805
- }
12806
- // Handle account object change
12807
- const cacheValue = e.newValue || e.oldValue;
12808
- if (!cacheValue) {
12809
- return;
12810
- }
12811
- const parsedValue = JSON.parse(cacheValue);
12812
- if (typeof parsedValue !== "object" ||
12813
- !AccountEntity.isAccountEntity(parsedValue)) {
12814
- return;
12815
- }
12816
- const accountEntity = CacheManager.toObject(new AccountEntity(), parsedValue);
12817
- const accountInfo = accountEntity.getAccountInfo();
12818
- if (!e.oldValue && e.newValue) {
12819
- this.logger.info("Account was added to cache in a different window");
12820
- this.emitEvent(EventType.ACCOUNT_ADDED, undefined, accountInfo);
12821
- }
12822
- else if (!e.newValue && e.oldValue) {
12823
- this.logger.info("Account was removed from cache in a different window");
12824
- this.emitEvent(EventType.ACCOUNT_REMOVED, undefined, accountInfo);
12825
- }
12826
- }
12827
- catch (e) {
12828
- return;
12829
- }
12830
- }
12831
12768
  }
12832
12769
 
12833
12770
  /*
@@ -14992,6 +14929,18 @@
14992
14929
  * Copyright (c) Microsoft Corporation. All rights reserved.
14993
14930
  * Licensed under the MIT License.
14994
14931
  */
14932
+ function getNavigationType() {
14933
+ if (typeof window === "undefined" ||
14934
+ typeof window.performance === "undefined" ||
14935
+ typeof window.performance.getEntriesByType !== "function") {
14936
+ return undefined;
14937
+ }
14938
+ const navigationEntries = window.performance.getEntriesByType("navigation");
14939
+ const navigation = navigationEntries.length
14940
+ ? navigationEntries[0]
14941
+ : undefined;
14942
+ return navigation?.type;
14943
+ }
14995
14944
  class RedirectClient extends StandardInteractionClient {
14996
14945
  constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, nativeStorageImpl, nativeMessageHandler, correlationId) {
14997
14946
  super(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, nativeMessageHandler, correlationId);
@@ -15073,7 +15022,13 @@
15073
15022
  // Not a recognized server response hash or hash not associated with a redirect request
15074
15023
  this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache.");
15075
15024
  this.browserStorage.cleanRequestByInteractionType(exports.InteractionType.Redirect);
15076
- parentMeasurement.event.errorCode = "no_server_response";
15025
+ // Do not instrument "no_server_response" if user clicked back button
15026
+ if (getNavigationType() !== "back_forward") {
15027
+ parentMeasurement.event.errorCode = "no_server_response";
15028
+ }
15029
+ else {
15030
+ this.logger.verbose("Back navigation event detected. Muting no_server_response error");
15031
+ }
15077
15032
  return null;
15078
15033
  }
15079
15034
  // If navigateToLoginRequestUrl is true, get the url where the redirect request was initiated
@@ -15971,7 +15926,7 @@
15971
15926
  this.browserCrypto = this.isBrowserEnvironment
15972
15927
  ? new CryptoOps(this.logger, this.performanceClient)
15973
15928
  : DEFAULT_CRYPTO_IMPLEMENTATION;
15974
- this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
15929
+ this.eventHandler = new EventHandler(this.logger);
15975
15930
  // Initialize the browser storage class.
15976
15931
  this.browserStorage = this.isBrowserEnvironment
15977
15932
  ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, buildStaticAuthorityOptions(this.config.auth), this.performanceClient)
@@ -15994,6 +15949,10 @@
15994
15949
  // Register listener functions
15995
15950
  this.trackPageVisibilityWithMeasurement =
15996
15951
  this.trackPageVisibilityWithMeasurement.bind(this);
15952
+ // account storage events
15953
+ this.listeningToStorageEvents = false;
15954
+ this.handleAccountCacheChange =
15955
+ this.handleAccountCacheChange.bind(this);
15997
15956
  }
15998
15957
  static async createController(operatingContext, request) {
15999
15958
  const controller = new StandardController(operatingContext);
@@ -16017,6 +15976,12 @@
16017
15976
  this.logger.info("initialize has already been called, exiting early.");
16018
15977
  return;
16019
15978
  }
15979
+ if (!this.isBrowserEnvironment) {
15980
+ this.logger.info("in non-browser environment, exiting early.");
15981
+ this.initialized = true;
15982
+ this.eventHandler.emitEvent(EventType.INITIALIZE_END);
15983
+ return;
15984
+ }
16020
15985
  const initCorrelationId = request?.correlationId || this.getRequestCorrelationId();
16021
15986
  const allowNativeBroker = this.config.system.allowNativeBroker;
16022
15987
  const initMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.InitializeClientApplication, initCorrelationId);
@@ -16666,6 +16631,10 @@
16666
16631
  * @param logoutRequest
16667
16632
  */
16668
16633
  async clearCache(logoutRequest) {
16634
+ if (!this.isBrowserEnvironment) {
16635
+ this.logger.info("in non-browser environment, returning early.");
16636
+ return;
16637
+ }
16669
16638
  const correlationId = this.getRequestCorrelationId(logoutRequest);
16670
16639
  const cacheClient = this.createSilentCacheClient(correlationId);
16671
16640
  return cacheClient.logout(logoutRequest);
@@ -16851,8 +16820,8 @@
16851
16820
  * Adds event callbacks to array
16852
16821
  * @param callback
16853
16822
  */
16854
- addEventCallback(callback) {
16855
- return this.eventHandler.addEventCallback(callback);
16823
+ addEventCallback(callback, eventTypes) {
16824
+ return this.eventHandler.addEventCallback(callback, eventTypes);
16856
16825
  }
16857
16826
  /**
16858
16827
  * Removes callback with provided id from callback array
@@ -16868,6 +16837,7 @@
16868
16837
  * @returns {string}
16869
16838
  */
16870
16839
  addPerformanceCallback(callback) {
16840
+ blockNonBrowserEnvironment();
16871
16841
  return this.performanceClient.addPerformanceCallback(callback);
16872
16842
  }
16873
16843
  /**
@@ -16883,13 +16853,68 @@
16883
16853
  * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
16884
16854
  */
16885
16855
  enableAccountStorageEvents() {
16886
- this.eventHandler.enableAccountStorageEvents();
16856
+ if (typeof window === "undefined") {
16857
+ return;
16858
+ }
16859
+ if (!this.listeningToStorageEvents) {
16860
+ this.logger.verbose("Adding account storage listener.");
16861
+ this.listeningToStorageEvents = true;
16862
+ window.addEventListener("storage", this.handleAccountCacheChange);
16863
+ }
16864
+ else {
16865
+ this.logger.verbose("Account storage listener already registered.");
16866
+ }
16887
16867
  }
16888
16868
  /**
16889
16869
  * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
16890
16870
  */
16891
16871
  disableAccountStorageEvents() {
16892
- this.eventHandler.disableAccountStorageEvents();
16872
+ if (typeof window === "undefined") {
16873
+ return;
16874
+ }
16875
+ if (this.listeningToStorageEvents) {
16876
+ this.logger.verbose("Removing account storage listener.");
16877
+ window.removeEventListener("storage", this.handleAccountCacheChange);
16878
+ this.listeningToStorageEvents = false;
16879
+ }
16880
+ else {
16881
+ this.logger.verbose("No account storage listener registered.");
16882
+ }
16883
+ }
16884
+ /**
16885
+ * Emit account added/removed events when cached accounts are changed in a different tab or frame
16886
+ */
16887
+ handleAccountCacheChange(e) {
16888
+ try {
16889
+ // Handle active account filter change
16890
+ if (e.key?.includes(PersistentCacheKeys.ACTIVE_ACCOUNT_FILTERS)) {
16891
+ // This event has no payload, it only signals cross-tab app instances that the results of calling getActiveAccount() will have changed
16892
+ this.eventHandler.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);
16893
+ }
16894
+ // Handle account object change
16895
+ const cacheValue = e.newValue || e.oldValue;
16896
+ if (!cacheValue) {
16897
+ return;
16898
+ }
16899
+ const parsedValue = JSON.parse(cacheValue);
16900
+ if (typeof parsedValue !== "object" ||
16901
+ !AccountEntity.isAccountEntity(parsedValue)) {
16902
+ return;
16903
+ }
16904
+ const accountEntity = CacheManager.toObject(new AccountEntity(), parsedValue);
16905
+ const accountInfo = accountEntity.getAccountInfo();
16906
+ if (!e.oldValue && e.newValue) {
16907
+ this.logger.info("Account was added to cache in a different window");
16908
+ this.eventHandler.emitEvent(EventType.ACCOUNT_ADDED, undefined, accountInfo);
16909
+ }
16910
+ else if (!e.newValue && e.oldValue) {
16911
+ this.logger.info("Account was removed from cache in a different window");
16912
+ this.eventHandler.emitEvent(EventType.ACCOUNT_REMOVED, undefined, accountInfo);
16913
+ }
16914
+ }
16915
+ catch (e) {
16916
+ return;
16917
+ }
16893
16918
  }
16894
16919
  /**
16895
16920
  * Gets the token cache for the application.
@@ -16944,12 +16969,6 @@
16944
16969
  isBrowserEnv() {
16945
16970
  return this.isBrowserEnvironment;
16946
16971
  }
16947
- /**
16948
- * Returns the event handler
16949
- */
16950
- getEventHandler() {
16951
- return this.eventHandler;
16952
- }
16953
16972
  /**
16954
16973
  * Generates a correlation id for a request if none is provided.
16955
16974
  *
@@ -17475,7 +17494,7 @@
17475
17494
  this.browserStorage = this.operatingContext.isBrowserEnvironment()
17476
17495
  ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, buildStaticAuthorityOptions(this.config.auth))
17477
17496
  : DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);
17478
- this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
17497
+ this.eventHandler = new EventHandler(this.logger);
17479
17498
  this.nestedAppAuthAdapter = new NestedAppAuthAdapter(this.config.auth.clientId, this.config.auth.clientCapabilities, this.browserCrypto, this.logger);
17480
17499
  // Set the active account if available
17481
17500
  const accountContext = this.bridgeProxy.getAccountContext();
@@ -17484,13 +17503,6 @@
17484
17503
  setActiveAccount(cachedAccount, this.browserStorage);
17485
17504
  }
17486
17505
  }
17487
- /**
17488
- * Returns the event handler instance
17489
- * @returns EventHandler
17490
- */
17491
- getEventHandler() {
17492
- return this.eventHandler;
17493
- }
17494
17506
  /**
17495
17507
  * Factory function to create a new instance of NestedAppAuthController
17496
17508
  * @param operatingContext
@@ -17746,9 +17758,10 @@
17746
17758
  /**
17747
17759
  * Adds event callbacks to array
17748
17760
  * @param callback
17761
+ * @param eventTypes
17749
17762
  */
17750
- addEventCallback(callback) {
17751
- return this.eventHandler.addEventCallback(callback);
17763
+ addEventCallback(callback, eventTypes) {
17764
+ return this.eventHandler.addEventCallback(callback, eventTypes);
17752
17765
  }
17753
17766
  /**
17754
17767
  * Removes callback with provided id from callback array
@@ -18047,9 +18060,10 @@
18047
18060
  /**
18048
18061
  * Adds event callbacks to array
18049
18062
  * @param callback
18063
+ * @param eventTypes
18050
18064
  */
18051
- addEventCallback(callback) {
18052
- return this.controller.addEventCallback(callback);
18065
+ addEventCallback(callback, eventTypes) {
18066
+ return this.controller.addEventCallback(callback, eventTypes);
18053
18067
  }
18054
18068
  /**
18055
18069
  * Removes callback with provided id from callback array
@@ -18349,14 +18363,10 @@
18349
18363
  this.browserStorage = this.isBrowserEnvironment
18350
18364
  ? new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger, undefined, this.performanceClient)
18351
18365
  : DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);
18352
- this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
18353
18366
  }
18354
18367
  getBrowserStorage() {
18355
18368
  return this.browserStorage;
18356
18369
  }
18357
- getEventHandler() {
18358
- return this.eventHandler;
18359
- }
18360
18370
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18361
18371
  getAccount(accountFilter) {
18362
18372
  return null;
@@ -18426,12 +18436,16 @@
18426
18436
  blockNonBrowserEnvironment();
18427
18437
  return {};
18428
18438
  }
18429
- addEventCallback(callback) {
18430
- return this.eventHandler.addEventCallback(callback);
18431
- }
18432
- removeEventCallback(callbackId) {
18433
- this.eventHandler.removeEventCallback(callbackId);
18439
+ addEventCallback(
18440
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18441
+ callback,
18442
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18443
+ eventTypes) {
18444
+ return null;
18434
18445
  }
18446
+ removeEventCallback(
18447
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18448
+ callbackId) { }
18435
18449
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18436
18450
  addPerformanceCallback(callback) {
18437
18451
  blockAPICallsBeforeInitialize(this.initialized);
@@ -18732,8 +18746,8 @@
18732
18746
  * Adds event callbacks to array
18733
18747
  * @param callback
18734
18748
  */
18735
- addEventCallback(callback) {
18736
- return this.controller.addEventCallback(callback);
18749
+ addEventCallback(callback, eventTypes) {
18750
+ return this.controller.addEventCallback(callback, eventTypes);
18737
18751
  }
18738
18752
  /**
18739
18753
  * Removes callback with provided id from callback array
@@ -19470,6 +19484,7 @@
19470
19484
  exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
19471
19485
  exports.ClientConfigurationErrorMessage = ClientConfigurationErrorMessage;
19472
19486
  exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS;
19487
+ exports.EventHandler = EventHandler;
19473
19488
  exports.EventMessageUtils = EventMessageUtils;
19474
19489
  exports.EventType = EventType;
19475
19490
  exports.InteractionRequiredAuthError = InteractionRequiredAuthError;