@azure/msal-browser 2.38.1 → 2.38.3

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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.d.ts.map +1 -1
  4. package/dist/app/ClientApplication.js +11 -2
  5. package/dist/app/ClientApplication.js.map +1 -1
  6. package/dist/app/IPublicClientApplication.js +1 -1
  7. package/dist/app/PublicClientApplication.js +1 -1
  8. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  9. package/dist/cache/AsyncMemoryStorage.js +1 -1
  10. package/dist/cache/BrowserCacheManager.d.ts +6 -0
  11. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  12. package/dist/cache/BrowserCacheManager.js +35 -1
  13. package/dist/cache/BrowserCacheManager.js.map +1 -1
  14. package/dist/cache/BrowserStorage.js +1 -1
  15. package/dist/cache/CryptoKeyStore.js +1 -1
  16. package/dist/cache/DatabaseStorage.js +1 -1
  17. package/dist/cache/MemoryStorage.js +1 -1
  18. package/dist/cache/TokenCache.js +1 -1
  19. package/dist/config/Configuration.js +1 -1
  20. package/dist/crypto/BrowserCrypto.js +1 -1
  21. package/dist/crypto/CryptoOps.js +1 -1
  22. package/dist/crypto/GuidGenerator.js +1 -1
  23. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  24. package/dist/crypto/MsBrowserCrypto.js +1 -1
  25. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  26. package/dist/crypto/PkceGenerator.js +1 -1
  27. package/dist/crypto/SignedHttpRequest.js +1 -1
  28. package/dist/encode/Base64Decode.js +1 -1
  29. package/dist/encode/Base64Encode.js +1 -1
  30. package/dist/error/BrowserAuthError.js +1 -1
  31. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  32. package/dist/error/NativeAuthError.js +1 -1
  33. package/dist/event/EventHandler.js +1 -1
  34. package/dist/event/EventMessage.js +1 -1
  35. package/dist/event/EventType.js +1 -1
  36. package/dist/index.cjs.js +121 -65
  37. package/dist/index.cjs.js.map +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  40. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  41. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  42. package/dist/interaction_client/PopupClient.js +1 -1
  43. package/dist/interaction_client/RedirectClient.js +1 -1
  44. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  45. package/dist/interaction_client/SilentCacheClient.js +1 -1
  46. package/dist/interaction_client/SilentIframeClient.js +1 -1
  47. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  48. package/dist/interaction_client/StandardInteractionClient.js +1 -1
  49. package/dist/interaction_handler/InteractionHandler.js +1 -1
  50. package/dist/interaction_handler/RedirectHandler.js +1 -1
  51. package/dist/interaction_handler/SilentHandler.js +1 -1
  52. package/dist/internals.js +1 -1
  53. package/dist/navigation/NavigationClient.js +1 -1
  54. package/dist/network/FetchClient.js +1 -1
  55. package/dist/network/XhrClient.js +1 -1
  56. package/dist/packageMetadata.d.ts +1 -1
  57. package/dist/packageMetadata.js +2 -2
  58. package/dist/packageMetadata.js.map +1 -1
  59. package/dist/telemetry/BrowserPerformanceClient.js +1 -1
  60. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  61. package/dist/utils/BrowserConstants.js +1 -1
  62. package/dist/utils/BrowserProtocolUtils.js +1 -1
  63. package/dist/utils/BrowserStringUtils.js +1 -1
  64. package/dist/utils/BrowserUtils.js +1 -1
  65. package/dist/utils/MathUtils.js +1 -1
  66. package/lib/msal-browser.js +121 -65
  67. package/lib/msal-browser.js.map +1 -1
  68. package/lib/msal-browser.min.js +30 -30
  69. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.1 2023-08-07 */
1
+ /*! @azure/msal-browser v2.38.3 2023-10-27 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -119,7 +119,7 @@
119
119
  return ar;
120
120
  }
121
121
 
122
- /*! @azure/msal-common v13.2.1 2023-08-07 */
122
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
123
123
  /*! *****************************************************************************
124
124
  Copyright (c) Microsoft Corporation.
125
125
 
@@ -206,7 +206,7 @@
206
206
  return r;
207
207
  }
208
208
 
209
- /*! @azure/msal-common v13.2.1 2023-08-07 */
209
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
210
210
 
211
211
  /*
212
212
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -579,7 +579,7 @@
579
579
  JsonTypes["Pop"] = "pop";
580
580
  })(JsonTypes || (JsonTypes = {}));
581
581
 
582
- /*! @azure/msal-common v13.2.1 2023-08-07 */
582
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
583
583
 
584
584
  /*
585
585
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -635,7 +635,7 @@
635
635
  return AuthError;
636
636
  }(Error));
637
637
 
638
- /*! @azure/msal-common v13.2.1 2023-08-07 */
638
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
639
639
 
640
640
  /*
641
641
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -710,7 +710,7 @@
710
710
  }
711
711
  };
712
712
 
713
- /*! @azure/msal-common v13.2.1 2023-08-07 */
713
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
714
714
 
715
715
  /*
716
716
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1225,7 +1225,7 @@
1225
1225
  return ClientAuthError;
1226
1226
  }(AuthError));
1227
1227
 
1228
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1228
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
1229
1229
 
1230
1230
  /*
1231
1231
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1350,7 +1350,7 @@
1350
1350
  return StringUtils;
1351
1351
  }());
1352
1352
 
1353
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1353
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
1354
1354
 
1355
1355
  /*
1356
1356
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1540,12 +1540,12 @@
1540
1540
  return Logger;
1541
1541
  }());
1542
1542
 
1543
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1543
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
1544
1544
  /* eslint-disable header/header */
1545
1545
  var name$1 = "@azure/msal-common";
1546
- var version$1 = "13.2.1";
1546
+ var version$1 = "13.3.1";
1547
1547
 
1548
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1548
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
1549
1549
  /*
1550
1550
  * Copyright (c) Microsoft Corporation. All rights reserved.
1551
1551
  * Licensed under the MIT License.
@@ -1566,7 +1566,7 @@
1566
1566
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1567
1567
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1568
1568
 
1569
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1569
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
1570
1570
 
1571
1571
  /*
1572
1572
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1831,7 +1831,7 @@
1831
1831
  return ClientConfigurationError;
1832
1832
  }(ClientAuthError));
1833
1833
 
1834
- /*! @azure/msal-common v13.2.1 2023-08-07 */
1834
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
1835
1835
 
1836
1836
  /*
1837
1837
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2030,7 +2030,7 @@
2030
2030
  return ScopeSet;
2031
2031
  }());
2032
2032
 
2033
- /*! @azure/msal-common v13.2.1 2023-08-07 */
2033
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2034
2034
 
2035
2035
  /*
2036
2036
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2068,7 +2068,7 @@
2068
2068
  };
2069
2069
  }
2070
2070
 
2071
- /*! @azure/msal-common v13.2.1 2023-08-07 */
2071
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2072
2072
  /*
2073
2073
  * Copyright (c) Microsoft Corporation. All rights reserved.
2074
2074
  * Licensed under the MIT License.
@@ -2084,7 +2084,7 @@
2084
2084
  AuthorityType[AuthorityType["Ciam"] = 3] = "Ciam";
2085
2085
  })(AuthorityType || (AuthorityType = {}));
2086
2086
 
2087
- /*! @azure/msal-common v13.2.1 2023-08-07 */
2087
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2088
2088
 
2089
2089
  /*
2090
2090
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2323,7 +2323,7 @@
2323
2323
  return AccountEntity;
2324
2324
  }());
2325
2325
 
2326
- /*! @azure/msal-common v13.2.1 2023-08-07 */
2326
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2327
2327
 
2328
2328
  /*
2329
2329
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2375,7 +2375,7 @@
2375
2375
  return AuthToken;
2376
2376
  }());
2377
2377
 
2378
- /*! @azure/msal-common v13.2.1 2023-08-07 */
2378
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
2379
2379
 
2380
2380
  /*
2381
2381
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2903,6 +2903,7 @@
2903
2903
  * @param inputRealm
2904
2904
  */
2905
2905
  CacheManager.prototype.getIdToken = function (account, tokenKeys) {
2906
+ var _this = this;
2906
2907
  this.commonLogger.trace("CacheManager - getIdToken called");
2907
2908
  var idTokenFilter = {
2908
2909
  homeAccountId: account.homeAccountId,
@@ -2918,7 +2919,11 @@
2918
2919
  return null;
2919
2920
  }
2920
2921
  else if (numIdTokens > 1) {
2921
- throw ClientAuthError.createMultipleMatchingTokensInCacheError();
2922
+ this.commonLogger.info("CacheManager:getIdToken - Multiple id tokens found, clearing them");
2923
+ idTokens.forEach(function (idToken) {
2924
+ _this.removeIdToken(idToken.generateCredentialKey());
2925
+ });
2926
+ return null;
2922
2927
  }
2923
2928
  this.commonLogger.info("CacheManager:getIdToken - Returning id token");
2924
2929
  return idTokens[0];
@@ -3019,7 +3024,11 @@
3019
3024
  return null;
3020
3025
  }
3021
3026
  else if (numAccessTokens > 1) {
3022
- throw ClientAuthError.createMultipleMatchingTokensInCacheError();
3027
+ this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them");
3028
+ accessTokens.forEach(function (accessToken) {
3029
+ _this.removeAccessToken(accessToken.generateCredentialKey());
3030
+ });
3031
+ return null;
3023
3032
  }
3024
3033
  this.commonLogger.info("CacheManager:getAccessToken - Returning access token");
3025
3034
  return accessTokens[0];
@@ -3423,7 +3432,7 @@
3423
3432
  return DefaultStorageClass;
3424
3433
  }(CacheManager));
3425
3434
 
3426
- /*! @azure/msal-common v13.2.1 2023-08-07 */
3435
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
3427
3436
 
3428
3437
  /*
3429
3438
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3520,7 +3529,7 @@
3520
3529
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
3521
3530
  }
3522
3531
 
3523
- /*! @azure/msal-common v13.2.1 2023-08-07 */
3532
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
3524
3533
 
3525
3534
  /*
3526
3535
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3540,7 +3549,7 @@
3540
3549
  return ServerError;
3541
3550
  }(AuthError));
3542
3551
 
3543
- /*! @azure/msal-common v13.2.1 2023-08-07 */
3552
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
3544
3553
 
3545
3554
  /*
3546
3555
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3636,7 +3645,7 @@
3636
3645
  return ThrottlingUtils;
3637
3646
  }());
3638
3647
 
3639
- /*! @azure/msal-common v13.2.1 2023-08-07 */
3648
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
3640
3649
 
3641
3650
  /*
3642
3651
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3685,7 +3694,7 @@
3685
3694
  return NetworkManager;
3686
3695
  }());
3687
3696
 
3688
- /*! @azure/msal-common v13.2.1 2023-08-07 */
3697
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
3689
3698
  /*
3690
3699
  * Copyright (c) Microsoft Corporation. All rights reserved.
3691
3700
  * Licensed under the MIT License.
@@ -3696,7 +3705,7 @@
3696
3705
  CcsCredentialType["UPN"] = "UPN";
3697
3706
  })(CcsCredentialType || (CcsCredentialType = {}));
3698
3707
 
3699
- /*! @azure/msal-common v13.2.1 2023-08-07 */
3708
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
3700
3709
 
3701
3710
  /*
3702
3711
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3787,7 +3796,7 @@
3787
3796
  return RequestValidator;
3788
3797
  }());
3789
3798
 
3790
- /*! @azure/msal-common v13.2.1 2023-08-07 */
3799
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
3791
3800
 
3792
3801
  /*
3793
3802
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4165,7 +4174,7 @@
4165
4174
  return RequestParameterBuilder;
4166
4175
  }());
4167
4176
 
4168
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4177
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4169
4178
 
4170
4179
  /*
4171
4180
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4267,7 +4276,7 @@
4267
4276
  return BaseClient;
4268
4277
  }());
4269
4278
 
4270
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4279
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4271
4280
 
4272
4281
  /*
4273
4282
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4405,7 +4414,7 @@
4405
4414
  return CredentialEntity;
4406
4415
  }());
4407
4416
 
4408
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4417
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4409
4418
 
4410
4419
  /*
4411
4420
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4469,7 +4478,7 @@
4469
4478
  return IdTokenEntity;
4470
4479
  }(CredentialEntity));
4471
4480
 
4472
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4481
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4473
4482
  /*
4474
4483
  * Copyright (c) Microsoft Corporation. All rights reserved.
4475
4484
  * Licensed under the MIT License.
@@ -4519,7 +4528,7 @@
4519
4528
  return TimeUtils;
4520
4529
  }());
4521
4530
 
4522
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4531
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4523
4532
 
4524
4533
  /*
4525
4534
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4633,7 +4642,7 @@
4633
4642
  return AccessTokenEntity;
4634
4643
  }(CredentialEntity));
4635
4644
 
4636
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4645
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4637
4646
 
4638
4647
  /*
4639
4648
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4700,7 +4709,7 @@
4700
4709
  return RefreshTokenEntity;
4701
4710
  }(CredentialEntity));
4702
4711
 
4703
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4712
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4704
4713
 
4705
4714
  /*
4706
4715
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4779,7 +4788,7 @@
4779
4788
  return InteractionRequiredAuthError;
4780
4789
  }(AuthError));
4781
4790
 
4782
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4791
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4783
4792
  /*
4784
4793
  * Copyright (c) Microsoft Corporation. All rights reserved.
4785
4794
  * Licensed under the MIT License.
@@ -4795,7 +4804,7 @@
4795
4804
  return CacheRecord;
4796
4805
  }());
4797
4806
 
4798
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4807
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4799
4808
 
4800
4809
  /*
4801
4810
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4866,7 +4875,7 @@
4866
4875
  return ProtocolUtils;
4867
4876
  }());
4868
4877
 
4869
- /*! @azure/msal-common v13.2.1 2023-08-07 */
4878
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
4870
4879
 
4871
4880
  /*
4872
4881
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5100,7 +5109,7 @@
5100
5109
  return UrlString;
5101
5110
  }());
5102
5111
 
5103
- /*! @azure/msal-common v13.2.1 2023-08-07 */
5112
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
5104
5113
  /*
5105
5114
  * Copyright (c) Microsoft Corporation. All rights reserved.
5106
5115
  * Licensed under the MIT License.
@@ -5304,6 +5313,10 @@
5304
5313
  PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
5305
5314
  PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
5306
5315
  PerformanceEvents["NativeMessageHandlerHandshake"] = "nativeMessageHandlerHandshake";
5316
+ /**
5317
+ * Cache operations
5318
+ */
5319
+ PerformanceEvents["ClearTokensAndKeysWithClaims"] = "clearTokensAndKeysWithClaims";
5307
5320
  })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5308
5321
  /**
5309
5322
  * State of the performance event.
@@ -5329,7 +5342,7 @@
5329
5342
  "status",
5330
5343
  ]);
5331
5344
 
5332
- /*! @azure/msal-common v13.2.1 2023-08-07 */
5345
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
5333
5346
 
5334
5347
  /*
5335
5348
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5438,7 +5451,7 @@
5438
5451
  return PopTokenGenerator;
5439
5452
  }());
5440
5453
 
5441
- /*! @azure/msal-common v13.2.1 2023-08-07 */
5454
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
5442
5455
 
5443
5456
  /*
5444
5457
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5508,7 +5521,7 @@
5508
5521
  return AppMetadataEntity;
5509
5522
  }());
5510
5523
 
5511
- /*! @azure/msal-common v13.2.1 2023-08-07 */
5524
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
5512
5525
  /*
5513
5526
  * Copyright (c) Microsoft Corporation. All rights reserved.
5514
5527
  * Licensed under the MIT License.
@@ -5544,7 +5557,7 @@
5544
5557
  return TokenCacheContext;
5545
5558
  }());
5546
5559
 
5547
- /*! @azure/msal-common v13.2.1 2023-08-07 */
5560
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
5548
5561
 
5549
5562
  /*
5550
5563
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5831,7 +5844,7 @@
5831
5844
  return ResponseHandler;
5832
5845
  }());
5833
5846
 
5834
- /*! @azure/msal-common v13.2.1 2023-08-07 */
5847
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
5835
5848
 
5836
5849
  /*
5837
5850
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6309,7 +6322,7 @@
6309
6322
  return AuthorizationCodeClient;
6310
6323
  }(BaseClient));
6311
6324
 
6312
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6325
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6313
6326
 
6314
6327
  /*
6315
6328
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6583,7 +6596,7 @@
6583
6596
  return RefreshTokenClient;
6584
6597
  }(BaseClient));
6585
6598
 
6586
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6599
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6587
6600
 
6588
6601
  /*
6589
6602
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6713,7 +6726,7 @@
6713
6726
  return SilentFlowClient;
6714
6727
  }(BaseClient));
6715
6728
 
6716
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6729
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6717
6730
  /*
6718
6731
  * Copyright (c) Microsoft Corporation. All rights reserved.
6719
6732
  * Licensed under the MIT License.
@@ -6725,7 +6738,7 @@
6725
6738
  response.hasOwnProperty("jwks_uri"));
6726
6739
  }
6727
6740
 
6728
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6741
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6729
6742
  /*
6730
6743
  * Copyright (c) Microsoft Corporation. All rights reserved.
6731
6744
  * Licensed under the MIT License.
@@ -6734,7 +6747,7 @@
6734
6747
  var EndpointMetadata = rawMetdataJSON.endpointMetadata;
6735
6748
  var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
6736
6749
 
6737
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6750
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6738
6751
  /*
6739
6752
  * Copyright (c) Microsoft Corporation. All rights reserved.
6740
6753
  * Licensed under the MIT License.
@@ -6748,7 +6761,7 @@
6748
6761
  ProtocolMode["OIDC"] = "OIDC";
6749
6762
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
6750
6763
 
6751
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6764
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6752
6765
 
6753
6766
  /*
6754
6767
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6825,7 +6838,7 @@
6825
6838
  return AuthorityMetadataEntity;
6826
6839
  }());
6827
6840
 
6828
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6841
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6829
6842
  /*
6830
6843
  * Copyright (c) Microsoft Corporation. All rights reserved.
6831
6844
  * Licensed under the MIT License.
@@ -6835,7 +6848,7 @@
6835
6848
  response.hasOwnProperty("metadata"));
6836
6849
  }
6837
6850
 
6838
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6851
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6839
6852
  /*
6840
6853
  * Copyright (c) Microsoft Corporation. All rights reserved.
6841
6854
  * Licensed under the MIT License.
@@ -6845,7 +6858,7 @@
6845
6858
  response.hasOwnProperty("error_description"));
6846
6859
  }
6847
6860
 
6848
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6861
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6849
6862
 
6850
6863
  /*
6851
6864
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6977,7 +6990,7 @@
6977
6990
  return RegionDiscovery;
6978
6991
  }());
6979
6992
 
6980
- /*! @azure/msal-common v13.2.1 2023-08-07 */
6993
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
6981
6994
 
6982
6995
  /*
6983
6996
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7770,7 +7783,7 @@
7770
7783
  return Authority;
7771
7784
  }());
7772
7785
 
7773
- /*! @azure/msal-common v13.2.1 2023-08-07 */
7786
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
7774
7787
 
7775
7788
  /*
7776
7789
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7834,7 +7847,7 @@
7834
7847
  return AuthorityFactory;
7835
7848
  }());
7836
7849
 
7837
- /*! @azure/msal-common v13.2.1 2023-08-07 */
7850
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
7838
7851
 
7839
7852
  /*
7840
7853
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7865,7 +7878,7 @@
7865
7878
  return ServerTelemetryEntity;
7866
7879
  }());
7867
7880
 
7868
- /*! @azure/msal-common v13.2.1 2023-08-07 */
7881
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
7869
7882
 
7870
7883
  /*
7871
7884
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7893,7 +7906,7 @@
7893
7906
  return ThrottlingEntity;
7894
7907
  }());
7895
7908
 
7896
- /*! @azure/msal-common v13.2.1 2023-08-07 */
7909
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
7897
7910
 
7898
7911
  /*
7899
7912
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7910,7 +7923,7 @@
7910
7923
  }
7911
7924
  };
7912
7925
 
7913
- /*! @azure/msal-common v13.2.1 2023-08-07 */
7926
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
7914
7927
 
7915
7928
  /*
7916
7929
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7955,7 +7968,7 @@
7955
7968
  return JoseHeaderError;
7956
7969
  }(AuthError));
7957
7970
 
7958
- /*! @azure/msal-common v13.2.1 2023-08-07 */
7971
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
7959
7972
 
7960
7973
  /*
7961
7974
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7995,7 +8008,7 @@
7995
8008
  return JoseHeader;
7996
8009
  }());
7997
8010
 
7998
- /*! @azure/msal-common v13.2.1 2023-08-07 */
8011
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
7999
8012
 
8000
8013
  /*
8001
8014
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8054,7 +8067,7 @@
8054
8067
  return AuthenticationHeaderParser;
8055
8068
  }());
8056
8069
 
8057
- /*! @azure/msal-common v13.2.1 2023-08-07 */
8070
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
8058
8071
 
8059
8072
  /*
8060
8073
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8216,7 +8229,7 @@
8216
8229
  return ServerTelemetryManager;
8217
8230
  }());
8218
8231
 
8219
- /*! @azure/msal-common v13.2.1 2023-08-07 */
8232
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
8220
8233
 
8221
8234
  /*
8222
8235
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8619,7 +8632,7 @@
8619
8632
  return PerformanceClient;
8620
8633
  }());
8621
8634
 
8622
- /*! @azure/msal-common v13.2.1 2023-08-07 */
8635
+ /*! @azure/msal-common v13.3.1 2023-10-27 */
8623
8636
 
8624
8637
  /*
8625
8638
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10450,6 +10463,40 @@
10450
10463
  });
10451
10464
  });
10452
10465
  };
10466
+ /**
10467
+ * Clears all access tokes that have claims prior to saving the current one
10468
+ * @param credential
10469
+ * @returns
10470
+ */
10471
+ BrowserCacheManager.prototype.clearTokensAndKeysWithClaims = function () {
10472
+ return __awaiter$1(this, void 0, void 0, function () {
10473
+ var tokenKeys, removedAccessTokens;
10474
+ var _this = this;
10475
+ return __generator$1(this, function (_a) {
10476
+ switch (_a.label) {
10477
+ case 0:
10478
+ this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called");
10479
+ tokenKeys = this.getTokenKeys();
10480
+ removedAccessTokens = [];
10481
+ tokenKeys.accessToken.forEach(function (key) {
10482
+ // if the access token has claims in its key, remove the token key and the token
10483
+ var credential = _this.getAccessTokenCredential(key);
10484
+ if ((credential === null || credential === void 0 ? void 0 : credential.requestedClaimsHash) && key.includes(credential.requestedClaimsHash.toLowerCase())) {
10485
+ removedAccessTokens.push(_this.removeAccessToken(key));
10486
+ }
10487
+ });
10488
+ return [4 /*yield*/, Promise.all(removedAccessTokens)];
10489
+ case 1:
10490
+ _a.sent();
10491
+ // warn if any access tokens are removed
10492
+ if (removedAccessTokens.length > 0) {
10493
+ this.logger.warning(removedAccessTokens.length + " access tokens with claims in the cache keys have been removed from the cache.");
10494
+ }
10495
+ return [2 /*return*/];
10496
+ }
10497
+ });
10498
+ });
10499
+ };
10453
10500
  /**
10454
10501
  * Add value to cookies
10455
10502
  * @param cookieName
@@ -10845,7 +10892,7 @@
10845
10892
 
10846
10893
  /* eslint-disable header/header */
10847
10894
  var name = "@azure/msal-browser";
10848
- var version = "2.38.1";
10895
+ var version = "2.38.3";
10849
10896
 
10850
10897
  /*
10851
10898
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -16711,7 +16758,7 @@
16711
16758
  */
16712
16759
  ClientApplication.prototype.initialize = function () {
16713
16760
  return __awaiter$1(this, void 0, void 0, function () {
16714
- var allowNativeBroker, initMeasurement, _a, e_1;
16761
+ var allowNativeBroker, initMeasurement, _a, e_1, claimsTokensRemovalMeasurement;
16715
16762
  return __generator$1(this, function (_b) {
16716
16763
  switch (_b.label) {
16717
16764
  case 0:
@@ -16737,6 +16784,15 @@
16737
16784
  this.logger.verbose(e_1);
16738
16785
  return [3 /*break*/, 4];
16739
16786
  case 4:
16787
+ if (!!this.config.cache.claimsBasedCachingEnabled) return [3 /*break*/, 6];
16788
+ this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims");
16789
+ claimsTokensRemovalMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.ClearTokensAndKeysWithClaims);
16790
+ return [4 /*yield*/, this.browserStorage.clearTokensAndKeysWithClaims()];
16791
+ case 5:
16792
+ _b.sent();
16793
+ claimsTokensRemovalMeasurement.endMeasurement({ success: true });
16794
+ _b.label = 6;
16795
+ case 6:
16740
16796
  this.initialized = true;
16741
16797
  this.eventHandler.emitEvent(exports.EventType.INITIALIZE_END);
16742
16798
  initMeasurement.endMeasurement({ allowNativeBroker: allowNativeBroker, success: true });