@azure/msal-node 6.0.0 → 7.0.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 (79) hide show
  1. package/dist/cache/CacheHelpers.mjs +1 -1
  2. package/dist/cache/NodeStorage.mjs +1 -1
  3. package/dist/cache/TokenCache.mjs +1 -1
  4. package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
  5. package/dist/cache/serializer/Deserializer.mjs +1 -1
  6. package/dist/cache/serializer/Serializer.mjs +1 -1
  7. package/dist/client/BaseClient.mjs +1 -1
  8. package/dist/client/ClientApplication.mjs +26 -10
  9. package/dist/client/ClientApplication.mjs.map +1 -1
  10. package/dist/client/ClientAssertion.mjs +1 -1
  11. package/dist/client/ClientCredentialClient.mjs +1 -1
  12. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  13. package/dist/client/DeviceCodeClient.mjs +1 -1
  14. package/dist/client/ManagedIdentityApplication.mjs +1 -1
  15. package/dist/client/ManagedIdentityClient.mjs +1 -1
  16. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  17. package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
  18. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
  19. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  20. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  21. package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
  22. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  23. package/dist/client/OnBehalfOfClient.mjs +1 -1
  24. package/dist/client/PublicClientApplication.mjs +13 -9
  25. package/dist/client/PublicClientApplication.mjs.map +1 -1
  26. package/dist/client/SilentRequestCoalescer.mjs +125 -0
  27. package/dist/client/SilentRequestCoalescer.mjs.map +1 -0
  28. package/dist/client/UserFederatedIdentityCredentialClient.mjs +1 -1
  29. package/dist/client/UsernamePasswordClient.mjs +1 -1
  30. package/dist/config/Configuration.mjs +1 -1
  31. package/dist/config/ManagedIdentityId.mjs +1 -1
  32. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  33. package/dist/crypto/CryptoProvider.mjs +1 -1
  34. package/dist/crypto/GuidGenerator.mjs +1 -1
  35. package/dist/crypto/HashUtils.mjs +1 -1
  36. package/dist/crypto/PkceGenerator.mjs +1 -1
  37. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  38. package/dist/error/ManagedIdentityError.mjs +1 -1
  39. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  40. package/dist/error/NodeAuthError.mjs +11 -1
  41. package/dist/error/NodeAuthError.mjs.map +1 -1
  42. package/dist/index.mjs +1 -1
  43. package/dist/internals.mjs +1 -1
  44. package/dist/network/HttpClient.mjs +1 -1
  45. package/dist/network/HttpClientWithRetries.mjs +1 -1
  46. package/dist/network/LoopbackClient.mjs +9 -14
  47. package/dist/network/LoopbackClient.mjs.map +1 -1
  48. package/dist/packageMetadata.mjs +2 -2
  49. package/dist/protocol/Authorize.mjs +1 -1
  50. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
  51. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  52. package/dist/retry/ImdsRetryPolicy.mjs +1 -1
  53. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  54. package/dist/utils/Constants.mjs +1 -1
  55. package/dist/utils/EncodingUtils.mjs +1 -1
  56. package/dist/utils/TimeUtils.mjs +1 -1
  57. package/lib/msal-node.cjs +260 -104
  58. package/lib/msal-node.cjs.map +1 -1
  59. package/package.json +2 -2
  60. package/src/client/ClientApplication.ts +49 -8
  61. package/src/client/PublicClientApplication.ts +26 -9
  62. package/src/client/SilentRequestCoalescer.ts +197 -0
  63. package/src/error/NodeAuthError.ts +15 -0
  64. package/src/network/LoopbackClient.ts +12 -15
  65. package/src/packageMetadata.ts +1 -1
  66. package/src/request/AuthorizationCodeRequest.ts +1 -1
  67. package/src/request/InteractiveRequest.ts +4 -1
  68. package/types/client/ClientApplication.d.ts +2 -0
  69. package/types/client/ClientApplication.d.ts.map +1 -1
  70. package/types/client/PublicClientApplication.d.ts.map +1 -1
  71. package/types/client/SilentRequestCoalescer.d.ts +26 -0
  72. package/types/client/SilentRequestCoalescer.d.ts.map +1 -0
  73. package/types/error/NodeAuthError.d.ts +8 -0
  74. package/types/error/NodeAuthError.d.ts.map +1 -1
  75. package/types/network/LoopbackClient.d.ts.map +1 -1
  76. package/types/packageMetadata.d.ts +1 -1
  77. package/types/request/AuthorizationCodeRequest.d.ts +1 -1
  78. package/types/request/InteractiveRequest.d.ts +1 -1
  79. package/types/request/InteractiveRequest.d.ts.map +1 -1
package/lib/msal-node.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-node v6.0.0 2026-08-28 */
1
+ /*! @azure/msal-node v7.0.0 2026-09-23 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -151,7 +151,7 @@ class Serializer {
151
151
  }
152
152
  }
153
153
 
154
- /*! @azure/msal-common v16.14.0 2026-08-28 */
154
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
155
155
  /*
156
156
  * Copyright (c) Microsoft Corporation. All rights reserved.
157
157
  * Licensed under the MIT License.
@@ -209,7 +209,7 @@ const USER_ID = "user_id";
209
209
  const FMI_PATH = "fmi_path";
210
210
  const ATTRIBUTE_TOKENS = "attribute_tokens";
211
211
 
212
- /*! @azure/msal-common v16.14.0 2026-08-28 */
212
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
213
213
  /*
214
214
  * Copyright (c) Microsoft Corporation. All rights reserved.
215
215
  * Licensed under the MIT License.
@@ -251,7 +251,6 @@ const KNOWN_PUBLIC_CLOUDS = [
251
251
  ];
252
252
  const INVALID_INSTANCE = "invalid_instance";
253
253
  const HTTP_SUCCESS = 200;
254
- const HTTP_REDIRECT = 302;
255
254
  const HTTP_CLIENT_ERROR_RANGE_START = 400;
256
255
  const HTTP_BAD_REQUEST = 400;
257
256
  const HTTP_UNAUTHORIZED = 401;
@@ -468,7 +467,7 @@ const EncodingTypes = {
468
467
  UTF8: "utf-8",
469
468
  };
470
469
 
471
- /*! @azure/msal-common v16.14.0 2026-08-28 */
470
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
472
471
  /*
473
472
  * Copyright (c) Microsoft Corporation. All rights reserved.
474
473
  * Licensed under the MIT License.
@@ -497,7 +496,7 @@ function createAuthError(code, correlationId, additionalMessage) {
497
496
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));
498
497
  }
499
498
 
500
- /*! @azure/msal-common v16.14.0 2026-08-28 */
499
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
501
500
 
502
501
  /*
503
502
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -520,7 +519,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
520
519
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
521
520
  }
522
521
 
523
- /*! @azure/msal-common v16.14.0 2026-08-28 */
522
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
524
523
  /*
525
524
  * Copyright (c) Microsoft Corporation. All rights reserved.
526
525
  * Licensed under the MIT License.
@@ -606,7 +605,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
606
605
  userCanceled: userCanceled
607
606
  });
608
607
 
609
- /*! @azure/msal-common v16.14.0 2026-08-28 */
608
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
610
609
 
611
610
  /*
612
611
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -644,7 +643,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
644
643
  };
645
644
  }
646
645
 
647
- /*! @azure/msal-common v16.14.0 2026-08-28 */
646
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
648
647
 
649
648
  /*
650
649
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -710,7 +709,7 @@ function getJWSPayload(authToken, correlationId) {
710
709
  return matches[2];
711
710
  }
712
711
 
713
- /*! @azure/msal-common v16.14.0 2026-08-28 */
712
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
714
713
 
715
714
  /*
716
715
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -798,7 +797,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
798
797
  return updatedAccountInfo;
799
798
  }
800
799
 
801
- /*! @azure/msal-common v16.14.0 2026-08-28 */
800
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
802
801
  /*
803
802
  * Copyright (c) Microsoft Corporation. All rights reserved.
804
803
  * Licensed under the MIT License.
@@ -812,7 +811,7 @@ const AuthorityType = {
812
811
  Ciam: 3,
813
812
  };
814
813
 
815
- /*! @azure/msal-common v16.14.0 2026-08-28 */
814
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
816
815
  /*
817
816
  * Copyright (c) Microsoft Corporation. All rights reserved.
818
817
  * Licensed under the MIT License.
@@ -834,7 +833,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
834
833
  return null;
835
834
  }
836
835
 
837
- /*! @azure/msal-common v16.14.0 2026-08-28 */
836
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
838
837
  /*
839
838
  * Copyright (c) Microsoft Corporation. All rights reserved.
840
839
  * Licensed under the MIT License.
@@ -858,7 +857,7 @@ const ProtocolMode = {
858
857
  EAR: "EAR",
859
858
  };
860
859
 
861
- /*! @azure/msal-common v16.14.0 2026-08-28 */
860
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
862
861
  /**
863
862
  * Returns the AccountInfo interface for this account.
864
863
  * @internal
@@ -1007,7 +1006,7 @@ function isAccountEntity(entity) {
1007
1006
  entity.hasOwnProperty("authorityType"));
1008
1007
  }
1009
1008
 
1010
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1009
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1011
1010
  /*
1012
1011
  * Copyright (c) Microsoft Corporation. All rights reserved.
1013
1012
  * Licensed under the MIT License.
@@ -1024,7 +1023,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
1024
1023
  unexpectedError: unexpectedError
1025
1024
  });
1026
1025
 
1027
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1026
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1028
1027
 
1029
1028
  /*
1030
1029
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1044,7 +1043,7 @@ function createClientConfigurationError(errorCode, correlationId) {
1044
1043
  return new ClientConfigurationError(errorCode, correlationId);
1045
1044
  }
1046
1045
 
1047
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1046
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1048
1047
  /*
1049
1048
  * Copyright (c) Microsoft Corporation. All rights reserved.
1050
1049
  * Licensed under the MIT License.
@@ -1114,7 +1113,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
1114
1113
  urlParseError: urlParseError
1115
1114
  });
1116
1115
 
1117
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1116
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1118
1117
  /*
1119
1118
  * Copyright (c) Microsoft Corporation. All rights reserved.
1120
1119
  * Licensed under the MIT License.
@@ -1126,7 +1125,7 @@ function isOpenIdConfigResponse(response) {
1126
1125
  response.hasOwnProperty("jwks_uri"));
1127
1126
  }
1128
1127
 
1129
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1128
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1130
1129
  /*
1131
1130
  * Copyright (c) Microsoft Corporation. All rights reserved.
1132
1131
  * Licensed under the MIT License.
@@ -1206,7 +1205,7 @@ class StringUtils {
1206
1205
  }
1207
1206
  }
1208
1207
 
1209
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1208
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1210
1209
 
1211
1210
  /*
1212
1211
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1364,7 +1363,7 @@ class UrlString {
1364
1363
  }
1365
1364
  }
1366
1365
 
1367
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1366
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1368
1367
 
1369
1368
  /*
1370
1369
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1518,7 +1517,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
1518
1517
  return null;
1519
1518
  }
1520
1519
 
1521
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1520
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1522
1521
  /*
1523
1522
  * Copyright (c) Microsoft Corporation. All rights reserved.
1524
1523
  * Licensed under the MIT License.
@@ -1536,7 +1535,7 @@ const AzureCloudInstance = {
1536
1535
  AzureUsGovernment: "https://login.microsoftonline.us",
1537
1536
  };
1538
1537
 
1539
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1538
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1540
1539
  /*
1541
1540
  * Copyright (c) Microsoft Corporation. All rights reserved.
1542
1541
  * Licensed under the MIT License.
@@ -1546,7 +1545,7 @@ function isCloudInstanceDiscoveryResponse(response) {
1546
1545
  response.hasOwnProperty("metadata"));
1547
1546
  }
1548
1547
 
1549
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1548
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1550
1549
  /*
1551
1550
  * Copyright (c) Microsoft Corporation. All rights reserved.
1552
1551
  * Licensed under the MIT License.
@@ -1556,7 +1555,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
1556
1555
  response.hasOwnProperty("error_description"));
1557
1556
  }
1558
1557
 
1559
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1558
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1560
1559
  /*
1561
1560
  * Copyright (c) Microsoft Corporation. All rights reserved.
1562
1561
  * Licensed under the MIT License.
@@ -1618,7 +1617,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
1618
1617
  */
1619
1618
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1620
1619
 
1621
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1620
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1622
1621
  /*
1623
1622
  * Copyright (c) Microsoft Corporation. All rights reserved.
1624
1623
  * Licensed under the MIT License.
@@ -1711,7 +1710,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
1711
1710
  };
1712
1711
  };
1713
1712
 
1714
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1713
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1715
1714
 
1716
1715
  /*
1717
1716
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1822,7 +1821,7 @@ RegionDiscovery.IMDS_OPTIONS = {
1822
1821
  },
1823
1822
  };
1824
1823
 
1825
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1824
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1826
1825
  /*
1827
1826
  * Copyright (c) Microsoft Corporation. All rights reserved.
1828
1827
  * Licensed under the MIT License.
@@ -1877,7 +1876,7 @@ function delay(t, value) {
1877
1876
  return new Promise((resolve) => setTimeout(() => resolve(value), t));
1878
1877
  }
1879
1878
 
1880
- /*! @azure/msal-common v16.14.0 2026-08-28 */
1879
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
1881
1880
 
1882
1881
  /*
1883
1882
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2164,7 +2163,7 @@ function serializeAttributeTokens(attributeTokens) {
2164
2163
  return [...attributeTokens].sort().join(" ");
2165
2164
  }
2166
2165
 
2167
- /*! @azure/msal-common v16.14.0 2026-08-28 */
2166
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
2168
2167
 
2169
2168
  /*
2170
2169
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3132,7 +3131,7 @@ function buildStaticAuthorityOptions(authOptions) {
3132
3131
  };
3133
3132
  }
3134
3133
 
3135
- /*! @azure/msal-common v16.14.0 2026-08-28 */
3134
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
3136
3135
 
3137
3136
  /*
3138
3137
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3166,7 +3165,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
3166
3165
  }
3167
3166
  }
3168
3167
 
3169
- /*! @azure/msal-common v16.14.0 2026-08-28 */
3168
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
3170
3169
 
3171
3170
  /*
3172
3171
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3362,7 +3361,7 @@ class ScopeSet {
3362
3361
  }
3363
3362
  }
3364
3363
 
3365
- /*! @azure/msal-common v16.14.0 2026-08-28 */
3364
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
3366
3365
 
3367
3366
  /*
3368
3367
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3866,7 +3865,7 @@ function addAttributeTokens(parameters, attributeTokens) {
3866
3865
  }
3867
3866
  }
3868
3867
 
3869
- /*! @azure/msal-common v16.14.0 2026-08-28 */
3868
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
3870
3869
 
3871
3870
  /*
3872
3871
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3924,7 +3923,7 @@ function mapToQueryString(parameters) {
3924
3923
  return queryParameterArray.join("&");
3925
3924
  }
3926
3925
 
3927
- /*! @azure/msal-common v16.14.0 2026-08-28 */
3926
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
3928
3927
 
3929
3928
  /*
3930
3929
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3972,7 +3971,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
3972
3971
  },
3973
3972
  };
3974
3973
 
3975
- /*! @azure/msal-common v16.14.0 2026-08-28 */
3974
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
3976
3975
 
3977
3976
  /*
3978
3977
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3995,7 +3994,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
3995
3994
  },
3996
3995
  };
3997
3996
 
3998
- /*! @azure/msal-common v16.14.0 2026-08-28 */
3997
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
3999
3998
  /*
4000
3999
  * Copyright (c) Microsoft Corporation. All rights reserved.
4001
4000
  * Licensed under the MIT License.
@@ -4270,12 +4269,12 @@ class Logger {
4270
4269
  }
4271
4270
  }
4272
4271
 
4273
- /*! @azure/msal-common v16.14.0 2026-08-28 */
4272
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
4274
4273
  /* eslint-disable header/header */
4275
4274
  const name$1 = "@azure/msal-common";
4276
- const version$1 = "16.14.0";
4275
+ const version$1 = "16.14.1";
4277
4276
 
4278
- /*! @azure/msal-common v16.14.0 2026-08-28 */
4277
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
4279
4278
  /*
4280
4279
  * Copyright (c) Microsoft Corporation. All rights reserved.
4281
4280
  * Licensed under the MIT License.
@@ -4283,7 +4282,7 @@ const version$1 = "16.14.0";
4283
4282
  const cacheQuotaExceeded = "cache_quota_exceeded";
4284
4283
  const cacheErrorUnknown = "cache_error_unknown";
4285
4284
 
4286
- /*! @azure/msal-common v16.14.0 2026-08-28 */
4285
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
4287
4286
 
4288
4287
  /*
4289
4288
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4321,7 +4320,7 @@ function createCacheError(e) {
4321
4320
  }
4322
4321
  }
4323
4322
 
4324
- /*! @azure/msal-common v16.14.0 2026-08-28 */
4323
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
4325
4324
 
4326
4325
  /*
4327
4326
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5508,7 +5507,7 @@ class DefaultStorageClass extends CacheManager {
5508
5507
  }
5509
5508
  }
5510
5509
 
5511
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5510
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5512
5511
  /*
5513
5512
  * Copyright (c) Microsoft Corporation. All rights reserved.
5514
5513
  * Licensed under the MIT License.
@@ -5522,7 +5521,7 @@ class DefaultStorageClass extends CacheManager {
5522
5521
  const PerformanceEventStatus = {
5523
5522
  InProgress: 1};
5524
5523
 
5525
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5524
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5526
5525
 
5527
5526
  /*
5528
5527
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5580,7 +5579,7 @@ class StubPerformanceClient {
5580
5579
  }
5581
5580
  }
5582
5581
 
5583
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5582
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5584
5583
 
5585
5584
  /*
5586
5585
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5678,7 +5677,7 @@ function isOidcProtocolMode(config) {
5678
5677
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5679
5678
  }
5680
5679
 
5681
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5680
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5682
5681
  /*
5683
5682
  * Copyright (c) Microsoft Corporation. All rights reserved.
5684
5683
  * Licensed under the MIT License.
@@ -5705,7 +5704,7 @@ function isOidcProtocolMode(config) {
5705
5704
  }
5706
5705
  }
5707
5706
 
5708
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5707
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5709
5708
 
5710
5709
  /*
5711
5710
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5726,7 +5725,7 @@ function createJoseHeaderError(code, correlationId) {
5726
5725
  return new JoseHeaderError(code, correlationId);
5727
5726
  }
5728
5727
 
5729
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5728
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5730
5729
  /*
5731
5730
  * Copyright (c) Microsoft Corporation. All rights reserved.
5732
5731
  * Licensed under the MIT License.
@@ -5751,7 +5750,7 @@ function isPlainObject(value) {
5751
5750
  return Object.getPrototypeOf(value) === proto;
5752
5751
  }
5753
5752
 
5754
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5753
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5755
5754
  /*
5756
5755
  * Copyright (c) Microsoft Corporation. All rights reserved.
5757
5756
  * Licensed under the MIT License.
@@ -5761,7 +5760,7 @@ const missingAlgError = "missing_alg_error";
5761
5760
  const missingJwkError = "missing_jwk_error";
5762
5761
  const invalidJwkError = "invalid_jwk_error";
5763
5762
 
5764
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5763
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5765
5764
 
5766
5765
  /*
5767
5766
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5827,7 +5826,7 @@ class JoseHeader {
5827
5826
  }
5828
5827
  }
5829
5828
 
5830
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5829
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5831
5830
 
5832
5831
  /*
5833
5832
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5928,7 +5927,7 @@ class PopTokenGenerator {
5928
5927
  }
5929
5928
  }
5930
5929
 
5931
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5930
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
5932
5931
 
5933
5932
  /*
5934
5933
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6073,7 +6072,7 @@ class DpopProofGenerator {
6073
6072
  }
6074
6073
  }
6075
6074
 
6076
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6075
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6077
6076
  /*
6078
6077
  * Copyright (c) Microsoft Corporation. All rights reserved.
6079
6078
  * Licensed under the MIT License.
@@ -6137,7 +6136,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
6137
6136
  uiNotAllowed: uiNotAllowed
6138
6137
  });
6139
6138
 
6140
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6139
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6141
6140
 
6142
6141
  /*
6143
6142
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6204,7 +6203,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
6204
6203
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
6205
6204
  }
6206
6205
 
6207
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6206
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6208
6207
 
6209
6208
  /*
6210
6209
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6223,7 +6222,7 @@ class ServerError extends AuthError {
6223
6222
  }
6224
6223
  }
6225
6224
 
6226
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6225
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6227
6226
  /**
6228
6227
  * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
6229
6228
  * @param base64Decode
@@ -6256,7 +6255,7 @@ function parseRequestState(base64Decode, state, correlationId) {
6256
6255
  }
6257
6256
  }
6258
6257
 
6259
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6258
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6260
6259
 
6261
6260
  /*
6262
6261
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6329,11 +6328,26 @@ class ResponseHandler {
6329
6328
  let idTokenClaims;
6330
6329
  if (serverTokenResponse.id_token) {
6331
6330
  idTokenClaims = extractTokenClaims(serverTokenResponse.id_token || "", this.cryptoObj.base64Decode, request.correlationId);
6332
- // token nonce check (TODO: Add a warning if no nonce is given?)
6333
- if (authCodePayload && authCodePayload.nonce) {
6334
- if (idTokenClaims.nonce !== authCodePayload.nonce) {
6335
- throw createClientAuthError(nonceMismatch, request.correlationId);
6336
- }
6331
+ }
6332
+ /*
6333
+ * Callers opt in to strict nonce-presence validation by including
6334
+ * the nonce property, even when its value is undefined.
6335
+ */
6336
+ if (authCodePayload &&
6337
+ Object.prototype.hasOwnProperty.call(authCodePayload, "nonce")) {
6338
+ const expectedNonce = authCodePayload.nonce;
6339
+ const tokenNonce = idTokenClaims?.nonce;
6340
+ // Warn when the ID Token nonce cannot be bound to the request.
6341
+ if (tokenNonce !== undefined && expectedNonce === undefined) {
6342
+ this.logger.warning("Authorization code response contains an ID Token nonce, but no expected nonce was supplied. Rejecting the response.", request.correlationId);
6343
+ throw createClientAuthError(nonceMismatch, request.correlationId);
6344
+ }
6345
+ // If the request supplies a nonce, the ID Token value must be a matching string.
6346
+ if (expectedNonce !== undefined &&
6347
+ (typeof expectedNonce !== "string" ||
6348
+ typeof tokenNonce !== "string" ||
6349
+ expectedNonce !== tokenNonce)) {
6350
+ throw createClientAuthError(nonceMismatch, request.correlationId);
6337
6351
  }
6338
6352
  }
6339
6353
  // generate homeAccountId
@@ -6669,7 +6683,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
6669
6683
  return baseAccount;
6670
6684
  }
6671
6685
 
6672
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6686
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6673
6687
  /*
6674
6688
  * Copyright (c) Microsoft Corporation. All rights reserved.
6675
6689
  * Licensed under the MIT License.
@@ -6679,7 +6693,7 @@ const CcsCredentialType = {
6679
6693
  UPN: "UPN",
6680
6694
  };
6681
6695
 
6682
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6696
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6683
6697
  /*
6684
6698
  * Copyright (c) Microsoft Corporation. All rights reserved.
6685
6699
  * Licensed under the MIT License.
@@ -6698,7 +6712,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
6698
6712
  }
6699
6713
  }
6700
6714
 
6701
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6715
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6702
6716
 
6703
6717
  /*
6704
6718
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6722,7 +6736,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
6722
6736
  };
6723
6737
  }
6724
6738
 
6725
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6739
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6726
6740
 
6727
6741
  /*
6728
6742
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6808,7 +6822,7 @@ class ThrottlingUtils {
6808
6822
  }
6809
6823
  }
6810
6824
 
6811
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6825
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6812
6826
 
6813
6827
  /*
6814
6828
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6839,7 +6853,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
6839
6853
  return new NetworkError(error, httpStatus, responseHeaders);
6840
6854
  }
6841
6855
 
6842
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6856
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6843
6857
 
6844
6858
  /*
6845
6859
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6972,7 +6986,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
6972
6986
  return response;
6973
6987
  }
6974
6988
 
6975
- /*! @azure/msal-common v16.14.0 2026-08-28 */
6989
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
6976
6990
 
6977
6991
  /*
6978
6992
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7236,7 +7250,7 @@ class AuthorizationCodeClient {
7236
7250
  }
7237
7251
  }
7238
7252
 
7239
- /*! @azure/msal-common v16.14.0 2026-08-28 */
7253
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
7240
7254
 
7241
7255
  /*
7242
7256
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7387,7 +7401,7 @@ function extractLoginHint(account) {
7387
7401
  return account.loginHint || account.idTokenClaims?.login_hint || null;
7388
7402
  }
7389
7403
 
7390
- /*! @azure/msal-common v16.14.0 2026-08-28 */
7404
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
7391
7405
 
7392
7406
  /*
7393
7407
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7621,7 +7635,7 @@ class RefreshTokenClient {
7621
7635
  }
7622
7636
  }
7623
7637
 
7624
- /*! @azure/msal-common v16.14.0 2026-08-28 */
7638
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
7625
7639
 
7626
7640
  /*
7627
7641
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7887,7 +7901,7 @@ class ServerTelemetryManager {
7887
7901
  }
7888
7902
  }
7889
7903
 
7890
- /*! @azure/msal-common v16.14.0 2026-08-28 */
7904
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
7891
7905
 
7892
7906
  /*
7893
7907
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8014,7 +8028,7 @@ class SilentFlowClient {
8014
8028
  }
8015
8029
  }
8016
8030
 
8017
- /*! @azure/msal-common v16.14.0 2026-08-28 */
8031
+ /*! @azure/msal-common v16.14.1 2026-09-23 */
8018
8032
 
8019
8033
  /*
8020
8034
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8697,6 +8711,10 @@ const NodeAuthErrorMessage = {
8697
8711
  code: "loopback_server_timeout",
8698
8712
  desc: "Timed out waiting for auth code listener to be registered.",
8699
8713
  },
8714
+ loopbackServerQueryResponseNotSupported: {
8715
+ code: "loopback_server_query_response_not_supported",
8716
+ desc: "The loopback server received an OAuth response in the URL. Interactive authentication requires form_post.",
8717
+ },
8700
8718
  stateNotFoundError: {
8701
8719
  code: "state_not_found",
8702
8720
  desc: "State not found. Please verify that the request originated from msal.",
@@ -8751,6 +8769,12 @@ class NodeAuthError extends AuthError {
8751
8769
  static createLoopbackServerTimeoutError(correlationId = "") {
8752
8770
  return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, correlationId, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
8753
8771
  }
8772
+ /**
8773
+ * Creates an error thrown if the loopback server receives an OAuth response in a query string.
8774
+ */
8775
+ static createLoopbackServerQueryResponseNotSupportedError() {
8776
+ return new NodeAuthError(NodeAuthErrorMessage.loopbackServerQueryResponseNotSupported.code, "", NodeAuthErrorMessage.loopbackServerQueryResponseNotSupported.desc);
8777
+ }
8754
8778
  /**
8755
8779
  * Creates an error thrown when the state is not present.
8756
8780
  */
@@ -10044,7 +10068,7 @@ class ClientAssertion {
10044
10068
 
10045
10069
  /* eslint-disable header/header */
10046
10070
  const name = "@azure/msal-node";
10047
- const version = "6.0.0";
10071
+ const version = "7.0.0";
10048
10072
 
10049
10073
  /*
10050
10074
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10240,6 +10264,125 @@ function getAuthCodeRequestUrl(config, authority, request, logger) {
10240
10264
  return getAuthorizeUrl(authority, parameters);
10241
10265
  }
10242
10266
 
10267
+ /*
10268
+ * Copyright (c) Microsoft Corporation. All rights reserved.
10269
+ * Licensed under the MIT License.
10270
+ */
10271
+ const activeSilentTokenRequests = new WeakMap();
10272
+ /**
10273
+ * Shares an in-flight silent acquisition while preserving each caller's correlation ID.
10274
+ */
10275
+ function acquireTokenSilentDeduped(owner, logger, silentRequestKey, correlationId, acquireToken) {
10276
+ const existingRequests = activeSilentTokenRequests.get(owner);
10277
+ const activeRequests = existingRequests || new Map();
10278
+ if (!existingRequests) {
10279
+ activeSilentTokenRequests.set(owner, activeRequests);
10280
+ }
10281
+ const inProgressRequest = activeRequests.get(silentRequestKey);
10282
+ if (inProgressRequest) {
10283
+ logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call", correlationId);
10284
+ return applyCallerCorrelationIdToResult(inProgressRequest, correlationId);
10285
+ }
10286
+ logger.verbose("acquireTokenSilent called for the first time, storing active request", correlationId);
10287
+ const activeRequest = Promise.resolve()
10288
+ .then(acquireToken)
10289
+ .finally(() => {
10290
+ activeRequests.delete(silentRequestKey);
10291
+ if (activeRequests.size === 0) {
10292
+ activeSilentTokenRequests.delete(owner);
10293
+ }
10294
+ });
10295
+ activeRequests.set(silentRequestKey, activeRequest);
10296
+ return applyCallerCorrelationIdToResult(activeRequest, correlationId);
10297
+ }
10298
+ /**
10299
+ * Builds the key used to identify equivalent in-progress silent requests.
10300
+ */
10301
+ function getSilentRequestKey(input) {
10302
+ const { request } = input;
10303
+ const authority = input.requestType === "native" ? request.authority : input.authority;
10304
+ const commonKeyFields = {
10305
+ requestType: input.requestType,
10306
+ clientId: input.requestType === "native"
10307
+ ? input.request.clientId
10308
+ : input.clientId,
10309
+ authority,
10310
+ scopes: canonicalizeRequestValues(request.scopes),
10311
+ claims: request.claims,
10312
+ authenticationScheme: request.authenticationScheme,
10313
+ resourceRequestMethod: request.resourceRequestMethod,
10314
+ resourceRequestUri: request.resourceRequestUri,
10315
+ forceRefresh: request.forceRefresh,
10316
+ redirectUri: request.redirectUri || "",
10317
+ resource: request.resource,
10318
+ extraParameters: canonicalizeRequestValues(request.extraParameters),
10319
+ };
10320
+ if (input.requestType === "native") {
10321
+ return JSON.stringify({
10322
+ ...commonKeyFields,
10323
+ accountId: input.request.accountId,
10324
+ shrNonce: input.request.shrNonce,
10325
+ extraScopesToConsent: canonicalizeRequestValues(input.request.extraScopesToConsent),
10326
+ loginHint: input.request.loginHint,
10327
+ prompt: input.request.prompt,
10328
+ });
10329
+ }
10330
+ const nonNativeRequest = input.request;
10331
+ const thumbprint = getRequestThumbprint(input.clientId, { ...nonNativeRequest, authority }, nonNativeRequest.account.homeAccountId);
10332
+ return JSON.stringify({
10333
+ ...thumbprint,
10334
+ ...commonKeyFields,
10335
+ accountTenantId: nonNativeRequest.account.tenantId,
10336
+ accountEnvironment: nonNativeRequest.account.environment,
10337
+ refreshTokenExpirationOffsetSeconds: nonNativeRequest.refreshTokenExpirationOffsetSeconds,
10338
+ extraQueryParameters: canonicalizeRequestValues(nonNativeRequest.extraQueryParameters),
10339
+ skipBrokerClaims: thumbprint.embeddedClientId ||
10340
+ nonNativeRequest.extraParameters?.[BROKER_CLIENT_ID]
10341
+ ? nonNativeRequest.skipBrokerClaims
10342
+ : undefined,
10343
+ });
10344
+ }
10345
+ /**
10346
+ * Copies mutable native request values so execution cannot diverge from the stored key.
10347
+ */
10348
+ function snapshotNativeRequest(request) {
10349
+ return {
10350
+ ...request,
10351
+ scopes: [...request.scopes],
10352
+ extraParameters: request.extraParameters
10353
+ ? { ...request.extraParameters }
10354
+ : undefined,
10355
+ extraScopesToConsent: request.extraScopesToConsent
10356
+ ? [...request.extraScopesToConsent]
10357
+ : undefined,
10358
+ };
10359
+ }
10360
+ /**
10361
+ * Canonicalizes scope sets and request dictionaries without changing the outgoing request.
10362
+ */
10363
+ function canonicalizeRequestValues(values) {
10364
+ if (Array.isArray(values)) {
10365
+ return Array.from(new Set(values
10366
+ .map((scope) => scope.trim())
10367
+ .filter((scope) => scope.length > 0))).sort();
10368
+ }
10369
+ return values
10370
+ ? Object.keys(values)
10371
+ .sort()
10372
+ .map((key) => [key, values[key]])
10373
+ : undefined;
10374
+ }
10375
+ /**
10376
+ * Applies the caller's correlation ID to successful results.
10377
+ * Shared failures retain the original error and underlying operation correlation ID.
10378
+ */
10379
+ function applyCallerCorrelationIdToResult(activeRequest, correlationId) {
10380
+ return activeRequest.then((result) => ({
10381
+ ...result,
10382
+ correlationId,
10383
+ }));
10384
+ }
10385
+
10243
10386
  /*
10244
10387
  * Copyright (c) Microsoft Corporation. All rights reserved.
10245
10388
  * Licensed under the MIT License.
@@ -10300,13 +10443,14 @@ class ClientApplication {
10300
10443
  state: "",
10301
10444
  };
10302
10445
  }
10303
- if (request.nonce) {
10304
- validatedAuthCodePayload = {
10305
- ...validatedAuthCodePayload,
10306
- code: request.code,
10307
- nonce: request.nonce,
10308
- };
10309
- }
10446
+ const expectedNonce = request.nonce !== undefined
10447
+ ? request.nonce
10448
+ : validatedAuthCodePayload?.nonce;
10449
+ validatedAuthCodePayload = {
10450
+ ...validatedAuthCodePayload,
10451
+ code: request.code,
10452
+ nonce: expectedNonce,
10453
+ };
10310
10454
  const validRequest = {
10311
10455
  ...request,
10312
10456
  ...(await this.initializeBaseRequest(request)),
@@ -10363,6 +10507,7 @@ class ClientApplication {
10363
10507
  *
10364
10508
  * This API expects the user to provide an account object and looks into the cache to retrieve the token if present.
10365
10509
  * There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token.
10510
+ * Concurrent requests with the same request thumbprint return the same in-progress result.
10366
10511
  * In case the refresh_token is expired or not found, an error is thrown
10367
10512
  * and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`).
10368
10513
  */
@@ -10372,9 +10517,22 @@ class ClientApplication {
10372
10517
  ...(await this.initializeBaseRequest(request)),
10373
10518
  forceRefresh: request.forceRefresh || false,
10374
10519
  };
10520
+ if (!validRequest.account) {
10521
+ return this.acquireTokenSilentAsync(validRequest, request.azureCloudOptions);
10522
+ }
10523
+ const authorityForThumbprint = Authority.generateAuthority(validRequest.authority, request.azureCloudOptions || this.config.auth.azureCloudOptions);
10524
+ const silentRequestKey = getSilentRequestKey({
10525
+ requestType: "non-native",
10526
+ request: validRequest,
10527
+ authority: authorityForThumbprint,
10528
+ clientId: this.config.auth.clientId,
10529
+ });
10530
+ return acquireTokenSilentDeduped(this, this.logger, silentRequestKey, validRequest.correlationId, () => this.acquireTokenSilentAsync(validRequest, request.azureCloudOptions));
10531
+ }
10532
+ async acquireTokenSilentAsync(validRequest, azureCloudOptions) {
10375
10533
  const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent, validRequest.correlationId, validRequest.forceRefresh);
10376
10534
  try {
10377
- const discoveredAuthority = await this.createAuthority(validRequest.authority, validRequest.correlationId, undefined, request.azureCloudOptions);
10535
+ const discoveredAuthority = await this.createAuthority(validRequest.authority, validRequest.correlationId, undefined, azureCloudOptions);
10378
10536
  const clientConfiguration = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager);
10379
10537
  const silentFlowClient = new SilentFlowClient(clientConfiguration, new StubPerformanceClient());
10380
10538
  this.logger.verbose("Silent flow client created", validRequest.correlationId);
@@ -10656,28 +10814,23 @@ class LoopbackClient {
10656
10814
  "Auth code was successfully acquired. You can close this window now.");
10657
10815
  return;
10658
10816
  }
10659
- // GET with query params (existing query response_mode flow)
10817
+ /*
10818
+ * GET requests may load the success page or browser resources, but OAuth
10819
+ * responses must be delivered via form_post.
10820
+ */
10660
10821
  if (method === "GET") {
10661
10822
  const redirectUri = this.getRedirectUri();
10662
10823
  const parsedUrl = new URL(url, redirectUri);
10663
10824
  const authCodeResponse = getDeserializedResponse(parsedUrl.search) || {};
10664
10825
  if (!authCodeResponse.code && !authCodeResponse.error) {
10665
- // Ignore requests without OAuth params (e.g., /favicon.ico)
10826
+ // Ignore requests without OAuth params (e.g., /favicon.ico).
10666
10827
  res.writeHead(200);
10667
10828
  res.end();
10668
10829
  return;
10669
10830
  }
10670
- if (authCodeResponse.code) {
10671
- res.writeHead(HTTP_REDIRECT, {
10672
- location: redirectUri,
10673
- }); // Prevent auth code from being saved in the browser history
10674
- res.end();
10675
- }
10676
- if (authCodeResponse.error) {
10677
- res.end(errorTemplate ||
10678
- `Error occurred: ${authCodeResponse.error}`);
10679
- }
10680
- resolve(authCodeResponse);
10831
+ res.writeHead(400);
10832
+ res.end("OAuth responses must use form_post and cannot be returned in the URL.");
10833
+ reject(NodeAuthError.createLoopbackServerQueryResponseNotSupportedError());
10681
10834
  }
10682
10835
  else {
10683
10836
  // Non-root POST (no OAuth response expected here) — ignore
@@ -11099,10 +11252,8 @@ class PublicClientApplication extends ClientApplication {
11099
11252
  }
11100
11253
  const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes();
11101
11254
  const loopbackClient = new LoopbackClient(preferredPort);
11102
- // Validate and resolve responseMode
11103
- const responseMode = remainingProperties.responseMode ??
11104
- ResponseMode$1.FORM_POST;
11105
- if (responseMode !== ResponseMode$1.QUERY &&
11255
+ const responseMode = remainingProperties.responseMode;
11256
+ if (responseMode !== undefined &&
11106
11257
  responseMode !== ResponseMode$1.FORM_POST) {
11107
11258
  throw createClientConfigurationError(invalidResponseMode, correlationId);
11108
11259
  }
@@ -11125,7 +11276,7 @@ class PublicClientApplication extends ClientApplication {
11125
11276
  correlationId: correlationId,
11126
11277
  scopes: request.scopes || OIDC_DEFAULT_SCOPES,
11127
11278
  redirectUri: redirectUri,
11128
- responseMode: responseMode,
11279
+ responseMode: ResponseMode$1.FORM_POST,
11129
11280
  codeChallenge: challenge,
11130
11281
  codeChallengeMethod: CodeChallengeMethodValues.S256,
11131
11282
  };
@@ -11164,7 +11315,8 @@ class PublicClientApplication extends ClientApplication {
11164
11315
  this.logger.trace("acquireTokenSilent called", correlationId);
11165
11316
  enforceResourceParameter(this.config.auth.isMcp, request);
11166
11317
  if (this.nativeBrokerPlugin) {
11167
- const brokerRequest = {
11318
+ const nativeBrokerPlugin = this.nativeBrokerPlugin;
11319
+ const brokerRequest = snapshotNativeRequest({
11168
11320
  ...request,
11169
11321
  clientId: this.config.auth.clientId,
11170
11322
  scopes: request.scopes || OIDC_DEFAULT_SCOPES,
@@ -11178,8 +11330,12 @@ class PublicClientApplication extends ClientApplication {
11178
11330
  },
11179
11331
  accountId: request.account.nativeAccountId,
11180
11332
  forceRefresh: request.forceRefresh || false,
11181
- };
11182
- return this.nativeBrokerPlugin.acquireTokenSilent(brokerRequest);
11333
+ });
11334
+ const silentRequestKey = getSilentRequestKey({
11335
+ requestType: "native",
11336
+ request: brokerRequest,
11337
+ });
11338
+ return acquireTokenSilentDeduped(this, this.logger, silentRequestKey, correlationId, () => nativeBrokerPlugin.acquireTokenSilent(brokerRequest));
11183
11339
  }
11184
11340
  if (request.redirectUri) {
11185
11341
  // If it's not a broker fallback scenario, we throw an error