@azure/msal-browser 5.29.1 → 5.30.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 (319) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  4. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  5. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
  8. package/dist/cache/AccountManager.mjs +1 -1
  9. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  10. package/dist/cache/BrowserCacheManager.mjs +2 -3
  11. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  12. package/dist/cache/CacheHelpers.mjs +1 -1
  13. package/dist/cache/CacheKeys.mjs +1 -1
  14. package/dist/cache/CookieStorage.mjs +1 -1
  15. package/dist/cache/DatabaseStorage.mjs +1 -1
  16. package/dist/cache/EncryptedData.mjs +1 -1
  17. package/dist/cache/LocalStorage.mjs +1 -1
  18. package/dist/cache/MemoryStorage.mjs +1 -1
  19. package/dist/cache/SessionStorage.mjs +1 -1
  20. package/dist/cache/TokenCache.mjs +1 -1
  21. package/dist/config/Configuration.mjs +11 -2
  22. package/dist/config/Configuration.mjs.map +1 -1
  23. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  24. package/dist/controllers/StandardController.mjs +1 -1
  25. package/dist/crypto/BrowserCrypto.mjs +185 -3
  26. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  27. package/dist/crypto/CryptoOps.mjs +1 -1
  28. package/dist/crypto/PkceGenerator.mjs +1 -1
  29. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  30. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  31. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  32. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  33. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  34. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  35. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  36. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  37. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  38. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  39. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  51. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -1
  52. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -1
  53. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +1 -1
  54. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +1 -1
  55. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +1 -1
  56. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +1 -1
  57. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +1 -1
  58. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
  59. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +1 -1
  60. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +1 -1
  61. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -1
  62. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +1 -1
  63. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +1 -1
  64. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  65. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  66. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  67. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  68. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  69. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  70. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  71. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  72. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  73. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  74. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  75. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  76. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  77. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  78. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  79. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  80. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  81. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  82. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  83. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  84. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  85. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  86. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +1 -1
  87. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +1 -1
  88. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +1 -1
  89. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  90. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  91. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  92. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  93. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  94. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  95. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  96. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  97. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  98. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -1
  99. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
  100. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +1 -1
  101. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
  102. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
  103. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +1 -1
  104. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
  105. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
  106. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -1
  107. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  108. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  109. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +1 -1
  110. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  111. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  112. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  113. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  114. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  115. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  116. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  117. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  118. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  119. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  120. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  121. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  122. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  123. package/dist/custom_auth/index.mjs +1 -1
  124. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  125. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  126. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  127. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  128. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  129. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  130. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  131. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  132. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  133. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  134. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  135. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +1 -1
  136. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +1 -1
  137. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  138. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  139. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  140. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  141. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  142. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  143. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  144. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  145. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  146. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  147. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  148. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  149. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  150. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -1
  151. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +1 -1
  152. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  153. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  154. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  155. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  156. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  157. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  158. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  159. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  160. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  161. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  162. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  163. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  164. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  165. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  166. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -1
  167. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +1 -1
  168. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +1 -1
  169. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +1 -1
  170. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +1 -1
  171. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  172. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  173. package/dist/encode/Base64Decode.mjs +1 -1
  174. package/dist/encode/Base64Encode.mjs +1 -1
  175. package/dist/error/BrowserAuthError.mjs +1 -1
  176. package/dist/error/BrowserAuthErrorCodes.mjs +3 -2
  177. package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
  178. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  179. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  180. package/dist/error/NativeAuthError.mjs +1 -1
  181. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  182. package/dist/error/NestedAppAuthError.mjs +1 -1
  183. package/dist/event/EventHandler.mjs +1 -1
  184. package/dist/event/EventMessage.mjs +1 -1
  185. package/dist/event/EventType.mjs +1 -1
  186. package/dist/index.mjs +1 -1
  187. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  188. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  189. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  190. package/dist/interaction_client/PopupClient.mjs +27 -21
  191. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  192. package/dist/interaction_client/RedirectClient.mjs +8 -10
  193. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  194. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  195. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  196. package/dist/interaction_client/SilentIframeClient.mjs +5 -8
  197. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  198. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  199. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  200. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  201. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  202. package/dist/log-strings-mapping.json +701 -697
  203. package/dist/naa/BridgeError.mjs +1 -1
  204. package/dist/naa/BridgeProxy.mjs +1 -1
  205. package/dist/naa/BridgeStatusCode.mjs +1 -1
  206. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  207. package/dist/navigation/NavigationClient.mjs +1 -1
  208. package/dist/network/FetchClient.mjs +1 -1
  209. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  210. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  211. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  212. package/dist/packageMetadata.mjs +2 -2
  213. package/dist/popup_relay/constants.mjs +24 -6
  214. package/dist/popup_relay/constants.mjs.map +1 -1
  215. package/dist/popup_relay/index.mjs +142 -44
  216. package/dist/popup_relay/index.mjs.map +1 -1
  217. package/dist/popup_relay/relayClient.mjs +66 -23
  218. package/dist/popup_relay/relayClient.mjs.map +1 -1
  219. package/dist/protocol/Authorize.mjs +70 -13
  220. package/dist/protocol/Authorize.mjs.map +1 -1
  221. package/dist/redirect_bridge/index.mjs +1 -1
  222. package/dist/request/RequestHelpers.mjs +1 -1
  223. package/dist/request/SilentRequestHelpers.mjs +2 -1
  224. package/dist/request/SilentRequestHelpers.mjs.map +1 -1
  225. package/dist/response/ResponseHandler.mjs +1 -1
  226. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  227. package/dist/telemetry/BrowserPerformanceEvents.mjs +9 -2
  228. package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
  229. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  230. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  231. package/dist/utils/BrowserConstants.mjs +1 -1
  232. package/dist/utils/BrowserDetection.mjs +1 -1
  233. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  234. package/dist/utils/BrowserUtils.mjs +1 -1
  235. package/dist/utils/Helpers.mjs +1 -1
  236. package/dist/utils/IframeMonitor.mjs +1 -1
  237. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  238. package/dist/utils/PopupMonitor.mjs +1 -1
  239. package/dist/utils/PopupOriginCheck.mjs +1 -1
  240. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  241. package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
  242. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  243. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  244. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  245. package/dist/webBrokerBridge/index.mjs +1 -1
  246. package/lib/custom-auth-path/log-strings-mapping.json +13 -9
  247. package/lib/custom-auth-path/msal-custom-auth.cjs +449 -133
  248. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  249. package/lib/custom-auth-path/msal-custom-auth.js +449 -133
  250. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  251. package/lib/log-strings-mapping.json +13 -9
  252. package/lib/msal-browser.cjs +453 -135
  253. package/lib/msal-browser.cjs.map +1 -1
  254. package/lib/msal-browser.js +453 -135
  255. package/lib/msal-browser.js.map +1 -1
  256. package/lib/msal-browser.min.js +2 -2
  257. package/lib/popup-relay/msal-popup-relay.cjs +231 -60
  258. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  259. package/lib/popup-relay/msal-popup-relay.js +231 -60
  260. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  261. package/lib/popup-relay/msal-popup-relay.min.js +2 -2
  262. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  263. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  264. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  265. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  266. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  267. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
  268. package/package.json +2 -2
  269. package/src/cache/BrowserCacheManager.ts +1 -5
  270. package/src/config/Configuration.ts +35 -0
  271. package/src/crypto/BrowserCrypto.ts +363 -0
  272. package/src/error/AsymmetricEarSubErrors.ts +18 -0
  273. package/src/error/BrowserAuthErrorCodes.ts +1 -0
  274. package/src/interaction_client/PopupClient.ts +59 -29
  275. package/src/interaction_client/RedirectClient.ts +10 -13
  276. package/src/interaction_client/SilentIframeClient.ts +9 -13
  277. package/src/packageMetadata.ts +1 -1
  278. package/src/popup_relay/constants.ts +34 -3
  279. package/src/popup_relay/index.ts +200 -45
  280. package/src/popup_relay/relayClient.ts +108 -24
  281. package/src/protocol/Authorize.ts +118 -11
  282. package/src/request/PopupRequest.ts +1 -0
  283. package/src/request/RedirectRequest.ts +1 -0
  284. package/src/request/SilentRequestHelpers.ts +1 -0
  285. package/src/request/SsoSilentRequest.ts +1 -0
  286. package/src/telemetry/BrowserPerformanceEvents.ts +7 -0
  287. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  288. package/types/config/Configuration.d.ts +14 -0
  289. package/types/config/Configuration.d.ts.map +1 -1
  290. package/types/crypto/BrowserCrypto.d.ts +34 -0
  291. package/types/crypto/BrowserCrypto.d.ts.map +1 -1
  292. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  293. package/types/error/AsymmetricEarSubErrors.d.ts +14 -0
  294. package/types/error/AsymmetricEarSubErrors.d.ts.map +1 -0
  295. package/types/error/BrowserAuthErrorCodes.d.ts +1 -0
  296. package/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
  297. package/types/interaction_client/PopupClient.d.ts +3 -1
  298. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  299. package/types/interaction_client/RedirectClient.d.ts +0 -1
  300. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  301. package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  302. package/types/packageMetadata.d.ts +1 -1
  303. package/types/popup_relay/constants.d.ts +10 -3
  304. package/types/popup_relay/constants.d.ts.map +1 -1
  305. package/types/popup_relay/index.d.ts +27 -11
  306. package/types/popup_relay/index.d.ts.map +1 -1
  307. package/types/popup_relay/relayClient.d.ts +9 -11
  308. package/types/popup_relay/relayClient.d.ts.map +1 -1
  309. package/types/protocol/Authorize.d.ts +5 -0
  310. package/types/protocol/Authorize.d.ts.map +1 -1
  311. package/types/request/PopupRequest.d.ts +1 -1
  312. package/types/request/PopupRequest.d.ts.map +1 -1
  313. package/types/request/RedirectRequest.d.ts +1 -1
  314. package/types/request/RedirectRequest.d.ts.map +1 -1
  315. package/types/request/SilentRequestHelpers.d.ts.map +1 -1
  316. package/types/request/SsoSilentRequest.d.ts +1 -1
  317. package/types/request/SsoSilentRequest.d.ts.map +1 -1
  318. package/types/telemetry/BrowserPerformanceEvents.d.ts +7 -0
  319. package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-browser v5.29.1 2026-11-12 */
1
+ /*! @azure/msal-browser v5.30.0 2026-11-18 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6
6
  /*
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
8
8
  * Licensed under the MIT License.
@@ -62,7 +62,7 @@ const ATTRIBUTE_TOKENS = "attribute_tokens";
62
62
  */
63
63
  const POPUP_ORIGIN_CHECK_DONE = "pocd";
64
64
 
65
- /*! @azure/msal-common v16.16.2 2026-11-12 */
65
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
66
66
  /*
67
67
  * Copyright (c) Microsoft Corporation. All rights reserved.
68
68
  * Licensed under the MIT License.
@@ -296,7 +296,7 @@ const JsonWebTokenTypes = {
296
296
  // Token renewal offset default in seconds
297
297
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
298
298
 
299
- /*! @azure/msal-common v16.16.2 2026-11-12 */
299
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
300
300
  /*
301
301
  * Copyright (c) Microsoft Corporation. All rights reserved.
302
302
  * Licensed under the MIT License.
@@ -325,7 +325,7 @@ function createAuthError(code, correlationId, additionalMessage) {
325
325
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
326
326
  }
327
327
 
328
- /*! @azure/msal-common v16.16.2 2026-11-12 */
328
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
329
329
 
330
330
  /*
331
331
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -348,7 +348,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
348
348
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
349
349
  }
350
350
 
351
- /*! @azure/msal-common v16.16.2 2026-11-12 */
351
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
352
352
  /*
353
353
  * Copyright (c) Microsoft Corporation. All rights reserved.
354
354
  * Licensed under the MIT License.
@@ -386,7 +386,7 @@ const methodNotImplemented = "method_not_implemented";
386
386
  const resourceParameterRequired = "resource_parameter_required";
387
387
  const misplacedResourceParam = "misplaced_resource_parameter";
388
388
 
389
- /*! @azure/msal-common v16.16.2 2026-11-12 */
389
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
390
390
 
391
391
  /*
392
392
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -424,7 +424,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
424
424
  };
425
425
  }
426
426
 
427
- /*! @azure/msal-common v16.16.2 2026-11-12 */
427
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
428
428
 
429
429
  /*
430
430
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -490,7 +490,7 @@ function getJWSPayload(authToken, correlationId) {
490
490
  return matches[2];
491
491
  }
492
492
 
493
- /*! @azure/msal-common v16.16.2 2026-11-12 */
493
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
494
494
 
495
495
  /*
496
496
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -578,7 +578,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
578
578
  return updatedAccountInfo;
579
579
  }
580
580
 
581
- /*! @azure/msal-common v16.16.2 2026-11-12 */
581
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
582
582
  /*
583
583
  * Copyright (c) Microsoft Corporation. All rights reserved.
584
584
  * Licensed under the MIT License.
@@ -592,7 +592,7 @@ const AuthorityType = {
592
592
  Ciam: 3,
593
593
  };
594
594
 
595
- /*! @azure/msal-common v16.16.2 2026-11-12 */
595
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
596
596
  /*
597
597
  * Copyright (c) Microsoft Corporation. All rights reserved.
598
598
  * Licensed under the MIT License.
@@ -614,7 +614,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
614
614
  return null;
615
615
  }
616
616
 
617
- /*! @azure/msal-common v16.16.2 2026-11-12 */
617
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
618
618
  /*
619
619
  * Copyright (c) Microsoft Corporation. All rights reserved.
620
620
  * Licensed under the MIT License.
@@ -638,7 +638,7 @@ const ProtocolMode = {
638
638
  EAR: "EAR",
639
639
  };
640
640
 
641
- /*! @azure/msal-common v16.16.2 2026-11-12 */
641
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
642
642
  /**
643
643
  * Returns the AccountInfo interface for this account.
644
644
  * @internal
@@ -827,7 +827,7 @@ function isAccountEntity(entity) {
827
827
  entity.hasOwnProperty("authorityType"));
828
828
  }
829
829
 
830
- /*! @azure/msal-common v16.16.2 2026-11-12 */
830
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
831
831
  /*
832
832
  * Copyright (c) Microsoft Corporation. All rights reserved.
833
833
  * Licensed under the MIT License.
@@ -837,7 +837,7 @@ function isAccountEntity(entity) {
837
837
  */
838
838
  const unexpectedError = "unexpected_error";
839
839
 
840
- /*! @azure/msal-common v16.16.2 2026-11-12 */
840
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
841
841
 
842
842
  /*
843
843
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -857,7 +857,7 @@ function createClientConfigurationError(errorCode, correlationId) {
857
857
  return new ClientConfigurationError(errorCode, correlationId);
858
858
  }
859
859
 
860
- /*! @azure/msal-common v16.16.2 2026-11-12 */
860
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
861
861
  /*
862
862
  * Copyright (c) Microsoft Corporation. All rights reserved.
863
863
  * Licensed under the MIT License.
@@ -897,7 +897,7 @@ function getResponseHeader(headers, name) {
897
897
  return headerName === undefined ? undefined : headers[headerName];
898
898
  }
899
899
 
900
- /*! @azure/msal-common v16.16.2 2026-11-12 */
900
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
901
901
  /*
902
902
  * Copyright (c) Microsoft Corporation. All rights reserved.
903
903
  * Licensed under the MIT License.
@@ -928,7 +928,7 @@ const invalidDpopHtu = "invalid_dpop_htu";
928
928
  const invalidDpopNonce = "invalid_dpop_nonce";
929
929
  const dpopMissingResourceContext = "dpop_missing_resource_context";
930
930
 
931
- /*! @azure/msal-common v16.16.2 2026-11-12 */
931
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
932
932
  /*
933
933
  * Copyright (c) Microsoft Corporation. All rights reserved.
934
934
  * Licensed under the MIT License.
@@ -940,7 +940,7 @@ function isOpenIdConfigResponse(response) {
940
940
  response.hasOwnProperty("jwks_uri"));
941
941
  }
942
942
 
943
- /*! @azure/msal-common v16.16.2 2026-11-12 */
943
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
944
944
  /*
945
945
  * Copyright (c) Microsoft Corporation. All rights reserved.
946
946
  * Licensed under the MIT License.
@@ -1020,7 +1020,7 @@ class StringUtils {
1020
1020
  }
1021
1021
  }
1022
1022
 
1023
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1023
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1024
1024
 
1025
1025
  /*
1026
1026
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1207,7 +1207,7 @@ class UrlString {
1207
1207
  }
1208
1208
  }
1209
1209
 
1210
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1210
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1211
1211
 
1212
1212
  /*
1213
1213
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1361,7 +1361,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
1361
1361
  return null;
1362
1362
  }
1363
1363
 
1364
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1364
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1365
1365
  /*
1366
1366
  * Copyright (c) Microsoft Corporation. All rights reserved.
1367
1367
  * Licensed under the MIT License.
@@ -1370,7 +1370,7 @@ const AzureCloudInstance = {
1370
1370
  // AzureCloudInstance is not specified.
1371
1371
  None: "none"};
1372
1372
 
1373
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1373
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1374
1374
  /*
1375
1375
  * Copyright (c) Microsoft Corporation. All rights reserved.
1376
1376
  * Licensed under the MIT License.
@@ -1380,7 +1380,7 @@ function isCloudInstanceDiscoveryResponse(response) {
1380
1380
  response.hasOwnProperty("metadata"));
1381
1381
  }
1382
1382
 
1383
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1383
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1384
1384
  /*
1385
1385
  * Copyright (c) Microsoft Corporation. All rights reserved.
1386
1386
  * Licensed under the MIT License.
@@ -1390,7 +1390,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
1390
1390
  response.hasOwnProperty("error_description"));
1391
1391
  }
1392
1392
 
1393
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1393
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1394
1394
  /*
1395
1395
  * Copyright (c) Microsoft Corporation. All rights reserved.
1396
1396
  * Licensed under the MIT License.
@@ -1461,7 +1461,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
1461
1461
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1462
1462
  const SetUserData = "setUserData";
1463
1463
 
1464
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1464
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1465
1465
  /*
1466
1466
  * Copyright (c) Microsoft Corporation. All rights reserved.
1467
1467
  * Licensed under the MIT License.
@@ -1555,7 +1555,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
1555
1555
  };
1556
1556
  };
1557
1557
 
1558
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1558
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1559
1559
 
1560
1560
  /*
1561
1561
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1684,7 +1684,7 @@ RegionDiscovery.IMDS_OPTIONS = {
1684
1684
  },
1685
1685
  };
1686
1686
 
1687
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1687
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1688
1688
  /*
1689
1689
  * Copyright (c) Microsoft Corporation. All rights reserved.
1690
1690
  * Licensed under the MIT License.
@@ -1749,7 +1749,7 @@ function wasClockTurnedBack(cachedAt) {
1749
1749
  return cachedAtSec > nowSeconds();
1750
1750
  }
1751
1751
 
1752
- /*! @azure/msal-common v16.16.2 2026-11-12 */
1752
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
1753
1753
 
1754
1754
  /*
1755
1755
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2036,7 +2036,7 @@ function serializeAttributeTokens(attributeTokens) {
2036
2036
  return [...attributeTokens].sort().join(" ");
2037
2037
  }
2038
2038
 
2039
- /*! @azure/msal-common v16.16.2 2026-11-12 */
2039
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
2040
2040
 
2041
2041
  /*
2042
2042
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3007,7 +3007,7 @@ function buildStaticAuthorityOptions(authOptions) {
3007
3007
  };
3008
3008
  }
3009
3009
 
3010
- /*! @azure/msal-common v16.16.2 2026-11-12 */
3010
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
3011
3011
 
3012
3012
  /*
3013
3013
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3041,7 +3041,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
3041
3041
  }
3042
3042
  }
3043
3043
 
3044
- /*! @azure/msal-common v16.16.2 2026-11-12 */
3044
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
3045
3045
 
3046
3046
  /*
3047
3047
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3237,7 +3237,7 @@ class ScopeSet {
3237
3237
  }
3238
3238
  }
3239
3239
 
3240
- /*! @azure/msal-common v16.16.2 2026-11-12 */
3240
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
3241
3241
 
3242
3242
  /*
3243
3243
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3705,12 +3705,13 @@ function addBrokerParameters(parameters, brokerClientId, brokerRedirectUri) {
3705
3705
  * Add EAR (Encrypted Authorize Response) request parameters
3706
3706
  * @param parameters
3707
3707
  * @param jwk
3708
+ * @param jweCrypto - Base64-encoded encryption metadata; defaults to symmetric EAR.
3708
3709
  */
3709
- function addEARParameters(parameters, jwk) {
3710
+ function addEARParameters(parameters, jwk, jweCrypto) {
3710
3711
  parameters.set(EAR_JWK, encodeURIComponent(jwk));
3711
- // ear_jwe_crypto will always have value: {"alg":"dir","enc":"A256GCM"} so we can hardcode this
3712
+ // Default symmetric EAR metadata; asymmetric requests supply their APV.
3712
3713
  const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
3713
- parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
3714
+ parameters.set(EAR_JWE_CRYPTO, jweCrypto ?? jweCryptoB64Encoded);
3714
3715
  }
3715
3716
  function addResource(parameters, resource) {
3716
3717
  if (resource) {
@@ -3737,7 +3738,7 @@ function addAttributeTokens(parameters, attributeTokens) {
3737
3738
  }
3738
3739
  }
3739
3740
 
3740
- /*! @azure/msal-common v16.16.2 2026-11-12 */
3741
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
3741
3742
 
3742
3743
  /*
3743
3744
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3868,7 +3869,7 @@ function validateUrl(url, logger, correlationId) {
3868
3869
  }
3869
3870
  }
3870
3871
 
3871
- /*! @azure/msal-common v16.16.2 2026-11-12 */
3872
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
3872
3873
 
3873
3874
  /*
3874
3875
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3916,7 +3917,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
3916
3917
  },
3917
3918
  };
3918
3919
 
3919
- /*! @azure/msal-common v16.16.2 2026-11-12 */
3920
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
3920
3921
 
3921
3922
  /*
3922
3923
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3939,7 +3940,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
3939
3940
  },
3940
3941
  };
3941
3942
 
3942
- /*! @azure/msal-common v16.16.2 2026-11-12 */
3943
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
3943
3944
  /*
3944
3945
  * Copyright (c) Microsoft Corporation. All rights reserved.
3945
3946
  * Licensed under the MIT License.
@@ -4214,12 +4215,12 @@ class Logger {
4214
4215
  }
4215
4216
  }
4216
4217
 
4217
- /*! @azure/msal-common v16.16.2 2026-11-12 */
4218
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
4218
4219
  /* eslint-disable header/header */
4219
4220
  const name$1 = "@azure/msal-common";
4220
- const version$1 = "16.16.2";
4221
+ const version$1 = "16.17.0";
4221
4222
 
4222
- /*! @azure/msal-common v16.16.2 2026-11-12 */
4223
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
4223
4224
  /*
4224
4225
  * Copyright (c) Microsoft Corporation. All rights reserved.
4225
4226
  * Licensed under the MIT License.
@@ -4227,7 +4228,7 @@ const version$1 = "16.16.2";
4227
4228
  const cacheQuotaExceeded = "cache_quota_exceeded";
4228
4229
  const cacheErrorUnknown = "cache_error_unknown";
4229
4230
 
4230
- /*! @azure/msal-common v16.16.2 2026-11-12 */
4231
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
4231
4232
 
4232
4233
  /*
4233
4234
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4265,7 +4266,7 @@ function createCacheError(e) {
4265
4266
  }
4266
4267
  }
4267
4268
 
4268
- /*! @azure/msal-common v16.16.2 2026-11-12 */
4269
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
4269
4270
 
4270
4271
  /*
4271
4272
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5492,7 +5493,7 @@ class DefaultStorageClass extends CacheManager {
5492
5493
  }
5493
5494
  }
5494
5495
 
5495
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5496
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5496
5497
  /*
5497
5498
  * Copyright (c) Microsoft Corporation. All rights reserved.
5498
5499
  * Licensed under the MIT License.
@@ -5506,7 +5507,7 @@ class DefaultStorageClass extends CacheManager {
5506
5507
  const PerformanceEventStatus = {
5507
5508
  InProgress: 1};
5508
5509
 
5509
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5510
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5510
5511
 
5511
5512
  /*
5512
5513
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5564,7 +5565,7 @@ class StubPerformanceClient {
5564
5565
  }
5565
5566
  }
5566
5567
 
5567
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5568
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5568
5569
 
5569
5570
  /*
5570
5571
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5662,7 +5663,7 @@ function isOidcProtocolMode(config) {
5662
5663
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5663
5664
  }
5664
5665
 
5665
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5666
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5666
5667
  /*
5667
5668
  * Copyright (c) Microsoft Corporation. All rights reserved.
5668
5669
  * Licensed under the MIT License.
@@ -5689,7 +5690,7 @@ function isOidcProtocolMode(config) {
5689
5690
  }
5690
5691
  }
5691
5692
 
5692
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5693
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5693
5694
 
5694
5695
  /*
5695
5696
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5710,7 +5711,7 @@ function createJoseHeaderError(code, correlationId) {
5710
5711
  return new JoseHeaderError(code, correlationId);
5711
5712
  }
5712
5713
 
5713
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5714
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5714
5715
  /*
5715
5716
  * Copyright (c) Microsoft Corporation. All rights reserved.
5716
5717
  * Licensed under the MIT License.
@@ -5735,7 +5736,7 @@ function isPlainObject(value) {
5735
5736
  return Object.getPrototypeOf(value) === proto;
5736
5737
  }
5737
5738
 
5738
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5739
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5739
5740
  /*
5740
5741
  * Copyright (c) Microsoft Corporation. All rights reserved.
5741
5742
  * Licensed under the MIT License.
@@ -5745,7 +5746,7 @@ const missingAlgError = "missing_alg_error";
5745
5746
  const missingJwkError = "missing_jwk_error";
5746
5747
  const invalidJwkError = "invalid_jwk_error";
5747
5748
 
5748
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5749
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5749
5750
 
5750
5751
  /*
5751
5752
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5811,7 +5812,7 @@ class JoseHeader {
5811
5812
  }
5812
5813
  }
5813
5814
 
5814
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5815
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5815
5816
 
5816
5817
  /*
5817
5818
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5912,7 +5913,7 @@ class PopTokenGenerator {
5912
5913
  }
5913
5914
  }
5914
5915
 
5915
- /*! @azure/msal-common v16.16.2 2026-11-12 */
5916
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
5916
5917
 
5917
5918
  /*
5918
5919
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6067,7 +6068,7 @@ class DpopProofGenerator {
6067
6068
  }
6068
6069
  }
6069
6070
 
6070
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6071
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6071
6072
  /*
6072
6073
  * Copyright (c) Microsoft Corporation. All rights reserved.
6073
6074
  * Licensed under the MIT License.
@@ -6118,7 +6119,7 @@ const badToken = "bad_token";
6118
6119
  */
6119
6120
  const interruptedUser = "interrupted_user";
6120
6121
 
6121
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6122
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6122
6123
 
6123
6124
  /*
6124
6125
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6185,7 +6186,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
6185
6186
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
6186
6187
  }
6187
6188
 
6188
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6189
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6189
6190
 
6190
6191
  /*
6191
6192
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6204,7 +6205,7 @@ class ServerError extends AuthError {
6204
6205
  }
6205
6206
  }
6206
6207
 
6207
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6208
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6208
6209
 
6209
6210
  /*
6210
6211
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6275,7 +6276,7 @@ function parseRequestState(base64Decode, state, correlationId) {
6275
6276
  }
6276
6277
  }
6277
6278
 
6278
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6279
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6279
6280
 
6280
6281
  /*
6281
6282
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6703,7 +6704,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
6703
6704
  return baseAccount;
6704
6705
  }
6705
6706
 
6706
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6707
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6707
6708
  /*
6708
6709
  * Copyright (c) Microsoft Corporation. All rights reserved.
6709
6710
  * Licensed under the MIT License.
@@ -6713,7 +6714,7 @@ const CcsCredentialType = {
6713
6714
  UPN: "UPN",
6714
6715
  };
6715
6716
 
6716
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6717
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6717
6718
  /*
6718
6719
  * Copyright (c) Microsoft Corporation. All rights reserved.
6719
6720
  * Licensed under the MIT License.
@@ -6732,7 +6733,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
6732
6733
  }
6733
6734
  }
6734
6735
 
6735
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6736
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6736
6737
 
6737
6738
  /*
6738
6739
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6756,7 +6757,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
6756
6757
  };
6757
6758
  }
6758
6759
 
6759
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6760
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6760
6761
 
6761
6762
  /*
6762
6763
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6846,7 +6847,7 @@ function getRetryAfterHeader(response) {
6846
6847
  return undefined;
6847
6848
  }
6848
6849
 
6849
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6850
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6850
6851
 
6851
6852
  /*
6852
6853
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6877,7 +6878,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
6877
6878
  return new NetworkError(error, httpStatus, responseHeaders);
6878
6879
  }
6879
6880
 
6880
- /*! @azure/msal-common v16.16.2 2026-11-12 */
6881
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
6881
6882
 
6882
6883
  /*
6883
6884
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7011,7 +7012,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
7011
7012
  return response;
7012
7013
  }
7013
7014
 
7014
- /*! @azure/msal-common v16.16.2 2026-11-12 */
7015
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
7015
7016
 
7016
7017
  /*
7017
7018
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7279,7 +7280,7 @@ class AuthorizationCodeClient {
7279
7280
  }
7280
7281
  }
7281
7282
 
7282
- /*! @azure/msal-common v16.16.2 2026-11-12 */
7283
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
7283
7284
 
7284
7285
  /*
7285
7286
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7509,7 +7510,7 @@ function extractLoginHint(account) {
7509
7510
  return account.loginHint || account.idTokenClaims?.login_hint || null;
7510
7511
  }
7511
7512
 
7512
- /*! @azure/msal-common v16.16.2 2026-11-12 */
7513
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
7513
7514
 
7514
7515
  /*
7515
7516
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7744,7 +7745,7 @@ class RefreshTokenClient {
7744
7745
  }
7745
7746
  }
7746
7747
 
7747
- /*! @azure/msal-common v16.16.2 2026-11-12 */
7748
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
7748
7749
 
7749
7750
  /*
7750
7751
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8037,7 +8038,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
8037
8038
  clearNativeBrokerErrorCode() { }
8038
8039
  }
8039
8040
 
8040
- /*! @azure/msal-common v16.16.2 2026-11-12 */
8041
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
8041
8042
 
8042
8043
  /*
8043
8044
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8164,7 +8165,7 @@ class SilentFlowClient {
8164
8165
  }
8165
8166
  }
8166
8167
 
8167
- /*! @azure/msal-common v16.16.2 2026-11-12 */
8168
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
8168
8169
 
8169
8170
  /*
8170
8171
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8180,7 +8181,7 @@ const StubbedNetworkModule = {
8180
8181
  },
8181
8182
  };
8182
8183
 
8183
- /*! @azure/msal-common v16.16.2 2026-11-12 */
8184
+ /*! @azure/msal-common v16.17.0 2026-11-18 */
8184
8185
 
8185
8186
  /*
8186
8187
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8632,7 +8633,7 @@ function filterReservedSignUpAttributesV2(attributes, logger, correlationId) {
8632
8633
 
8633
8634
  /* eslint-disable header/header */
8634
8635
  const name = "@azure/msal-browser";
8635
- const version = "5.29.1";
8636
+ const version = "5.30.0";
8636
8637
 
8637
8638
  /*
8638
8639
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9276,6 +9277,13 @@ const UrlEncodeArr = "urlEncodeArr";
9276
9277
  const Encrypt = "encrypt";
9277
9278
  const Decrypt = "decrypt";
9278
9279
  const GenerateEarKey = "generateEarKey";
9280
+ const GenerateAsymmetricEarKey = "generateAsymmetricEarKey";
9281
+ const ImportAsymmetricEarKey = "importAsymmetricEarKey";
9282
+ const ImportAsymmetricEarPublicKey = "importAsymmetricEarPublicKey";
9283
+ const DeriveAsymmetricEarSecret = "deriveAsymmetricEarSecret";
9284
+ const AsymmetricEarConcatKdf = "asymmetricEarConcatKdf";
9285
+ const ImportAsymmetricEarContentKey = "importAsymmetricEarContentKey";
9286
+ const DecryptAsymmetricEarResponse = "decryptAsymmetricEarResponse";
9279
9287
  const DecryptEarResponse = "decryptEarResponse";
9280
9288
  /**
9281
9289
  * Background telemetry measurement that tracks whether a late bridge response
@@ -9336,6 +9344,7 @@ const tokenBindingKeyJwkThumbprintMismatch = "token_binding_key_jwk_thumbprint_m
9336
9344
  const failedToBuildHeaders = "failed_to_build_headers";
9337
9345
  const failedToParseHeaders = "failed_to_parse_headers";
9338
9346
  const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
9347
+ const asymmetricEarKeyError = "asymmetric_ear_key_error";
9339
9348
  const timedOut = "timed_out";
9340
9349
  const emptyResponse = "empty_response";
9341
9350
 
@@ -9644,6 +9653,10 @@ const HKDF = "HKDF";
9644
9653
  const S256_HASH_ALG = "SHA-256";
9645
9654
  // JWK values used by browser-internal WebCrypto helpers.
9646
9655
  const JSON_WEB_KEY_CURVE_P256 = "P-256";
9656
+ const ECDH_P384_ALGORITHM = {
9657
+ name: "ECDH",
9658
+ namedCurve: "P-384",
9659
+ };
9647
9660
  const JSON_WEB_KEY_TYPE_EC = "EC";
9648
9661
  const JSON_WEB_KEY_TYPE_RSA = "RSA";
9649
9662
  const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
@@ -9781,6 +9794,16 @@ async function generateKeyPair(extractable, usages, algorithm) {
9781
9794
  async function exportJwk(key) {
9782
9795
  return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
9783
9796
  }
9797
+ /**
9798
+ * Imports key as Json Web Key (JWK), can set extractable and usages.
9799
+ * @param key
9800
+ * @param extractable
9801
+ * @param usages
9802
+ * @param algorithm
9803
+ */
9804
+ async function importJwk(key, extractable, usages, algorithm) {
9805
+ return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
9806
+ }
9784
9807
  /**
9785
9808
  * Signs given data with given key.
9786
9809
  * @param key
@@ -9803,6 +9826,172 @@ async function generateEarKey() {
9803
9826
  };
9804
9827
  return base64Encode(JSON.stringify(jwk));
9805
9828
  }
9829
+ /**
9830
+ * Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
9831
+ * @internal
9832
+ */
9833
+ async function generateAsymmetricEarKey() {
9834
+ const keyPair = await generateKeyPair(true, ["deriveBits"], ECDH_P384_ALGORITHM);
9835
+ const publicJwk = await exportJwk(keyPair.publicKey);
9836
+ const privateJwk = await exportJwk(keyPair.privateKey);
9837
+ return {
9838
+ privateJwk,
9839
+ publicJwk,
9840
+ };
9841
+ }
9842
+ /**
9843
+ * Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
9844
+ * @internal
9845
+ */
9846
+ async function importAsymmetricEarKey(privateJwk, correlationId = "") {
9847
+ if (privateJwk?.kty !== "EC" ||
9848
+ privateJwk.crv !== "P-384" ||
9849
+ !privateJwk.d) {
9850
+ throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "invalid_private_key" /* AsymmetricEarSubErrors.InvalidPrivateKey */);
9851
+ }
9852
+ try {
9853
+ return await importJwk(privateJwk, false, ["deriveBits"], ECDH_P384_ALGORITHM);
9854
+ }
9855
+ catch {
9856
+ throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "private_key_import_failed" /* AsymmetricEarSubErrors.PrivateKeyImportFailed */);
9857
+ }
9858
+ }
9859
+ /**
9860
+ * Encodes the EAR client party information with a fresh 192-bit nonce.
9861
+ * @internal
9862
+ */
9863
+ function generateAsymmetricEarApv(publicJwk) {
9864
+ const point = new Uint8Array(concatEarBytes(new Uint8Array([4]), decodeEarBase64Url(publicJwk.x || ""), decodeEarBase64Url(publicJwk.y || "")));
9865
+ if (point.length !== 97) {
9866
+ throw createBrowserAuthError(asymmetricEarKeyError, "", "invalid_public_key_coordinates" /* AsymmetricEarSubErrors.InvalidPublicKeyCoordinates */);
9867
+ }
9868
+ const nonce = new Uint8Array(24);
9869
+ window.crypto.getRandomValues(nonce);
9870
+ return urlEncodeArr(new Uint8Array(concatEarBytes(lengthPrefixEarBytes(new TextEncoder().encode("EarClient")), lengthPrefixEarBytes(point), lengthPrefixEarBytes(nonce))));
9871
+ }
9872
+ /**
9873
+ * Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
9874
+ * Party information is used byte-for-byte; the service need not echo the request APV.
9875
+ * @internal
9876
+ */
9877
+ async function decryptAsymmetricEarResponse(privateJwk, apv, earJwe, requestApv = apv, telemetry) {
9878
+ const correlationId = telemetry?.correlationId || "";
9879
+ const measure = (eventName, operation) => telemetry
9880
+ ? invokeAsync(operation, eventName, telemetry.logger, telemetry.performanceClient, correlationId)()
9881
+ : operation();
9882
+ if (apv !== requestApv) {
9883
+ throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "request_apv_mismatch" /* AsymmetricEarSubErrors.RequestApvMismatch */);
9884
+ }
9885
+ const parts = earJwe.split(".");
9886
+ if (parts.length !== 5 || parts[1] !== "") {
9887
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
9888
+ }
9889
+ let header;
9890
+ try {
9891
+ header = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decodeEarBase64Url(parts[0], correlationId)));
9892
+ }
9893
+ catch {
9894
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
9895
+ }
9896
+ if (!header ||
9897
+ header.alg !== "ECDH-ES" ||
9898
+ header.enc !== "A256GCM" ||
9899
+ header.crit !== undefined ||
9900
+ header.zip !== undefined ||
9901
+ header.epk?.kty !== "EC" ||
9902
+ header.epk.crv !== "P-384" ||
9903
+ header.epk.d !== undefined ||
9904
+ (header.apv !== undefined && header.apv !== apv)) {
9905
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
9906
+ }
9907
+ const x = decodeEarBase64Url(header.epk.x, correlationId);
9908
+ const y = decodeEarBase64Url(header.epk.y, correlationId);
9909
+ const apuBytes = decodeEarBase64Url(header.apu, correlationId);
9910
+ const apvBytes = decodeEarBase64Url(apv, correlationId);
9911
+ const iv = decodeEarBase64Url(parts[2], correlationId);
9912
+ const ciphertext = decodeEarBase64Url(parts[3], correlationId);
9913
+ const tag = decodeEarBase64Url(parts[4], correlationId);
9914
+ if (x.length !== 48 ||
9915
+ y.length !== 48 ||
9916
+ iv.length !== 12 ||
9917
+ tag.length !== 16) {
9918
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
9919
+ }
9920
+ let key;
9921
+ try {
9922
+ const privateKey = await measure(ImportAsymmetricEarKey, () => importAsymmetricEarKey(privateJwk, correlationId));
9923
+ const publicKey = await measure(ImportAsymmetricEarPublicKey, () => importJwk({
9924
+ kty: "EC",
9925
+ crv: "P-384",
9926
+ x: header.epk.x,
9927
+ y: header.epk.y,
9928
+ }, false, [], ECDH_P384_ALGORITHM));
9929
+ const secret = new Uint8Array(await measure(DeriveAsymmetricEarSecret, () => window.crypto.subtle.deriveBits({ name: "ECDH", public: publicKey }, privateKey, 384)));
9930
+ // RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
9931
+ const input = new Uint8Array(concatEarBytes(earUint32(1), secret, lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")), lengthPrefixEarBytes(apuBytes), lengthPrefixEarBytes(apvBytes), earUint32(256)));
9932
+ let derivedKey;
9933
+ try {
9934
+ derivedKey = await measure(AsymmetricEarConcatKdf, () => window.crypto.subtle.digest(S256_HASH_ALG, input));
9935
+ }
9936
+ finally {
9937
+ secret.fill(0);
9938
+ input.fill(0);
9939
+ }
9940
+ try {
9941
+ key = await measure(ImportAsymmetricEarContentKey, () => window.crypto.subtle.importKey(RAW, derivedKey, AES_GCM, false, [DECRYPT]));
9942
+ }
9943
+ finally {
9944
+ new Uint8Array(derivedKey).fill(0);
9945
+ }
9946
+ }
9947
+ catch (error) {
9948
+ if (error instanceof AuthError) {
9949
+ throw error;
9950
+ }
9951
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "content_encryption_key_derivation_failed" /* AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed */);
9952
+ }
9953
+ try {
9954
+ const plaintext = await measure(DecryptAsymmetricEarResponse, () => window.crypto.subtle.decrypt({
9955
+ name: AES_GCM,
9956
+ iv,
9957
+ tagLength: 128,
9958
+ additionalData: new TextEncoder().encode(parts[0]),
9959
+ }, key, concatEarBytes(ciphertext, tag)));
9960
+ return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
9961
+ }
9962
+ catch {
9963
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "jwe_decryption_failed" /* AsymmetricEarSubErrors.JweDecryptionFailed */);
9964
+ }
9965
+ }
9966
+ /** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
9967
+ function decodeEarBase64Url(value, correlationId = "") {
9968
+ // Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
9969
+ if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
9970
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
9971
+ }
9972
+ const bytes = new Uint8Array(base64DecToArr(value));
9973
+ if (urlEncodeArr(bytes) !== value) {
9974
+ throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
9975
+ }
9976
+ return bytes;
9977
+ }
9978
+ function earUint32(value) {
9979
+ const bytes = new Uint8Array(4);
9980
+ new DataView(bytes.buffer).setUint32(0, value);
9981
+ return bytes;
9982
+ }
9983
+ function concatEarBytes(...parts) {
9984
+ const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
9985
+ let offset = 0;
9986
+ for (const part of parts) {
9987
+ bytes.set(part, offset);
9988
+ offset += part.length;
9989
+ }
9990
+ return bytes.buffer;
9991
+ }
9992
+ function lengthPrefixEarBytes(bytes) {
9993
+ return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
9994
+ }
9806
9995
  /**
9807
9996
  * Parses earJwk for encryption key and returns CryptoKey object
9808
9997
  * @param earJwk
@@ -20747,8 +20936,7 @@ class BrowserCacheManager extends CacheManager {
20747
20936
  }
20748
20937
  }
20749
20938
  catch (e) {
20750
- this.logger.errorPii(`0ewsey ${encodedTokenRequest}`, correlationId);
20751
- this.logger.error(`0tvdic ${e}`, correlationId);
20939
+ this.logger.error("023ixj", correlationId);
20752
20940
  throw createBrowserAuthError(unableToParseTokenRequestCacheError, "");
20753
20941
  }
20754
20942
  return [parsedRequest, verifier];
@@ -21223,30 +21411,42 @@ function shouldUseEar(protocolMode, logger, performanceClient, correlationId, us
21223
21411
  * page (see `runPopupRelay`) back to the embedded frame that opened it. See
21224
21412
  * {@link BrowserAuthOptions.popupRelayUri}.
21225
21413
  *
21226
- * Kept dependency-free so both the relay-page entry (`./index.js`) and the
21227
- * client-side helpers (`./relayClient.js`) can import it without either bundle
21228
- * pulling in the other's dependencies.
21414
+ * Shared by the relay-page entry and client helpers without importing either
21415
+ * implementation into the other bundle.
21229
21416
  *
21230
21417
  * @internal
21231
21418
  */
21232
- const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
21419
+ const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
21420
+ /** @internal Response bound to an authenticated v2 relay document. */
21421
+ const POPUP_RELAY_V2_RESPONSE_TYPE = "msal:popup-relay-response:v2";
21422
+ /** @internal Ready signal for the authenticated popup-relay request handoff. */
21423
+ const POPUP_RELAY_READY_TYPE = "msal:popup-relay-ready:v2";
21424
+ /** @internal Request delivered only to the same-origin relay window. */
21425
+ const POPUP_RELAY_REQUEST_TYPE = "msal:popup-relay-request:v2";
21426
+ /** @internal Resolve the compatibility default without downgrading invalid versions. */
21427
+ function getPopupRelayProtocolVersion(version, correlationId = "") {
21428
+ if (version === undefined) {
21429
+ return 1;
21430
+ }
21431
+ if (version !== 1 && version !== 2) {
21432
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_invalid_protocol");
21433
+ }
21434
+ return version;
21435
+ }
21233
21436
 
21234
21437
  /*
21235
21438
  * Copyright (c) Microsoft Corporation. All rights reserved.
21236
21439
  * Licensed under the MIT License.
21237
21440
  */
21238
21441
  /**
21239
- * Builds the URL of the popup-relay page to open. The action the relay page
21240
- * must perform (GET navigation or POST form) is carried in the page's hash
21241
- * (client-side only, never sent to a server), keyed by the per-request
21242
- * library-state `id` so the relay page can listen on the right BroadcastChannel
21243
- * and echo the id back. The relay URI is resolved against the app origin, so it
21244
- * must be same-origin as the embedded frame. See `runPopupRelay`.
21442
+ * Builds the same-origin relay URL. V1 preserves the fragment descriptor;
21443
+ * explicitly selected v2 carries only the id and retains the navigation for
21444
+ * the authenticated handoff.
21245
21445
  *
21246
21446
  * @internal
21247
21447
  */
21248
- function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
21249
- const req = { id, ...action };
21448
+ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId, protocolVersion) {
21449
+ const version = getPopupRelayProtocolVersion(protocolVersion, correlationId);
21250
21450
  const target = new URL(popupRelayUri, window.location.origin);
21251
21451
  /*
21252
21452
  * The relay page must be same-origin as the embedded frame: the response is
@@ -21259,7 +21459,12 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
21259
21459
  throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_cross_origin");
21260
21460
  }
21261
21461
  const hashParams = new URLSearchParams();
21262
- hashParams.set("req", JSON.stringify(req));
21462
+ if (version === 1) {
21463
+ hashParams.set("req", JSON.stringify({ id, ...action }));
21464
+ }
21465
+ else {
21466
+ hashParams.set("id", id);
21467
+ }
21263
21468
  target.hash = hashParams.toString();
21264
21469
  return target.toString();
21265
21470
  }
@@ -21270,21 +21475,30 @@ function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
21270
21475
  * partitioning blocks the BroadcastChannel the redirect bridge uses from
21271
21476
  * reaching the embedded frame.
21272
21477
  *
21273
- * The response is accepted only from the popup window we opened, on our own
21274
- * origin (the relay page is same-origin as the embedded frame), and only when
21275
- * it carries the matching per-request library-state id.
21478
+ * In v2, the retained navigation is sent once, after a ready signal from the popup
21479
+ * window we opened on our own origin with the matching library-state id.
21480
+ * Successful responses must also carry that handoff's relay-document nonce.
21481
+ * Setup failures can reject the request before the handoff completes.
21276
21482
  *
21277
21483
  * @internal
21278
21484
  */
21279
- async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient) {
21485
+ async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient, action, protocolVersion) {
21486
+ const version = getPopupRelayProtocolVersion(protocolVersion, request.correlationId);
21487
+ if (version === 2 && !action) {
21488
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, request.correlationId, "popup_relay_bad_request");
21489
+ }
21280
21490
  return new Promise((resolve, reject) => {
21281
21491
  const correlationId = request.correlationId;
21282
21492
  logger.verbose("1d05g9", correlationId);
21283
- performanceClient.addFields({ redirectBridgeTimeoutMs: timeoutMs }, correlationId);
21493
+ performanceClient.addFields({
21494
+ redirectBridgeTimeoutMs: timeoutMs,
21495
+ popupRelayProtocolVersion: version,
21496
+ }, correlationId);
21284
21497
  const { libraryState } = parseRequestState(base64Decode, request.state || "", correlationId);
21285
21498
  const expectedId = libraryState.id;
21286
21499
  const expectedOrigin = window.location.origin;
21287
21500
  let settled = false;
21501
+ let handoffNonce = "";
21288
21502
  const cleanup = () => {
21289
21503
  window.removeEventListener("message", onMessage);
21290
21504
  clearTimeout(timeoutId);
@@ -21296,20 +21510,52 @@ async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow
21296
21510
  return;
21297
21511
  }
21298
21512
  const data = event.data;
21299
- if (!data ||
21300
- data.type !== POPUP_RELAY_RESPONSE_TYPE ||
21301
- data.id !== expectedId) {
21513
+ if (!data || data.id !== expectedId) {
21302
21514
  return;
21303
21515
  }
21304
21516
  if (settled) {
21305
21517
  return;
21306
21518
  }
21519
+ if (version === 2 && data.type === POPUP_RELAY_READY_TYPE) {
21520
+ if (handoffNonce ||
21521
+ typeof data.nonce !== "string" ||
21522
+ !data.nonce) {
21523
+ return;
21524
+ }
21525
+ handoffNonce = data.nonce;
21526
+ try {
21527
+ popupWindow.postMessage({
21528
+ type: POPUP_RELAY_REQUEST_TYPE,
21529
+ id: expectedId,
21530
+ nonce: handoffNonce,
21531
+ request: { id: expectedId, ...action },
21532
+ }, expectedOrigin);
21533
+ performanceClient.addFields({ "ext.popupRelayRequestSent": true }, correlationId);
21534
+ }
21535
+ catch {
21536
+ settled = true;
21537
+ cleanup();
21538
+ logger.error("0sx3jz", correlationId);
21539
+ reject(createBrowserAuthError(popupWindowError, correlationId, "popup_relay_handoff_failed"));
21540
+ }
21541
+ return;
21542
+ }
21543
+ const hasError = typeof data.error === "string" && data.error.length > 0;
21544
+ const responseType = version === 1
21545
+ ? POPUP_RELAY_RESPONSE_TYPE
21546
+ : POPUP_RELAY_V2_RESPONSE_TYPE;
21547
+ if (data.type !== responseType ||
21548
+ (version === 2 &&
21549
+ ((!handoffNonce && !hasError) ||
21550
+ (handoffNonce && data.nonce !== handoffNonce)))) {
21551
+ return;
21552
+ }
21307
21553
  settled = true;
21308
21554
  cleanup();
21309
- if (data.error) {
21310
- reject(createBrowserAuthError(data.error, correlationId));
21555
+ if (hasError) {
21556
+ reject(createBrowserAuthError(data.error, correlationId, data.subError));
21311
21557
  }
21312
- else if (data.payload) {
21558
+ else if (typeof data.payload === "string" && data.payload) {
21313
21559
  resolve(data.payload);
21314
21560
  }
21315
21561
  else {
@@ -22977,6 +23223,36 @@ function getAuthorizeFormAction(authority, request, parameters) {
22977
23223
  addCorrelationId(queryParams, request.correlationId);
22978
23224
  return getAuthorizeUrl(authority, queryParams);
22979
23225
  }
23226
+ /**
23227
+ * Prepares the selected EAR construction.
23228
+ * @internal
23229
+ */
23230
+ async function initializeEarRequest(config, request, logger, performanceClient) {
23231
+ if (!config.experimental.enableAsymmetricEar) {
23232
+ const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, logger, performanceClient, request.correlationId)();
23233
+ return {
23234
+ ...request,
23235
+ earJwk,
23236
+ asymmetricEar: undefined,
23237
+ };
23238
+ }
23239
+ try {
23240
+ const { privateJwk, publicJwk } = await invokeAsync(generateAsymmetricEarKey, GenerateAsymmetricEarKey, logger, performanceClient, request.correlationId)();
23241
+ const apv = generateAsymmetricEarApv(publicJwk);
23242
+ const earJwk = base64Encode(JSON.stringify(publicJwk));
23243
+ return {
23244
+ ...request,
23245
+ earJwk,
23246
+ asymmetricEar: { privateJwk, apv },
23247
+ };
23248
+ }
23249
+ catch (error) {
23250
+ if (error instanceof AuthError) {
23251
+ throw error;
23252
+ }
23253
+ throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_initialization_failed" /* AsymmetricEarSubErrors.RequestInitializationFailed */);
23254
+ }
23255
+ }
22980
23256
  /**
22981
23257
  * Builds the action URL + POST-body fields for the EAR /authorize form.
22982
23258
  */
@@ -22986,7 +23262,18 @@ async function getEARFormData(config, authority, request, logger, performanceCli
22986
23262
  }
22987
23263
  const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
22988
23264
  addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
22989
- addEARParameters(parameters, request.earJwk);
23265
+ try {
23266
+ addEARParameters(parameters, request.earJwk, request.asymmetricEar
23267
+ ? base64Encode(JSON.stringify({
23268
+ alg: "ECDH-ES",
23269
+ enc: "A256GCM",
23270
+ apv: request.asymmetricEar.apv,
23271
+ }))
23272
+ : undefined);
23273
+ }
23274
+ catch {
23275
+ throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_encoding_failed" /* AsymmetricEarSubErrors.RequestEncodingFailed */);
23276
+ }
22990
23277
  // Also add codeChallenge as backup in case EAR is not supported
22991
23278
  addCodeChallengeParams(parameters, request.codeChallenge, S256_CODE_CHALLENGE_METHOD);
22992
23279
  addExtraParameters(parameters, {
@@ -23070,12 +23357,14 @@ async function handleResponsePlatformBroker(request, accountId, apiId, config, b
23070
23357
  const browserCrypto = new CryptoOps(logger, performanceClient);
23071
23358
  const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
23072
23359
  const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
23360
+ const brokerRequest = {
23361
+ ...request,
23362
+ state: userRequestState,
23363
+ prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
23364
+ };
23365
+ delete brokerRequest.asymmetricEar;
23073
23366
  try {
23074
- return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)({
23075
- ...request,
23076
- state: userRequestState,
23077
- prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
23078
- });
23367
+ return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(brokerRequest);
23079
23368
  }
23080
23369
  catch (e) {
23081
23370
  await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
@@ -23140,7 +23429,20 @@ async function handleResponseEAR(request, response, apiId, config, authority, br
23140
23429
  if (!request.earJwk) {
23141
23430
  throw createBrowserAuthError(earJwkEmpty, request.correlationId);
23142
23431
  }
23143
- const decryptedData = JSON.parse(await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe));
23432
+ let plaintext;
23433
+ if (request.asymmetricEar) {
23434
+ plaintext = await invokeAsync(decryptAsymmetricEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.asymmetricEar.privateJwk, request.asymmetricEar.apv, response.ear_jwe, request.asymmetricEar.apv, { logger, performanceClient, correlationId: request.correlationId });
23435
+ }
23436
+ else {
23437
+ plaintext = await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe);
23438
+ }
23439
+ let decryptedData;
23440
+ try {
23441
+ decryptedData = JSON.parse(plaintext);
23442
+ }
23443
+ catch {
23444
+ throw createBrowserAuthError(failedToDecryptEarResponse, request.correlationId, "invalid_decrypted_response_payload" /* AsymmetricEarSubErrors.InvalidDecryptedResponsePayload */);
23445
+ }
23144
23446
  if (decryptedData.accountId) {
23145
23447
  return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
23146
23448
  }
@@ -23431,6 +23733,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
23431
23733
  : "",
23432
23734
  postLogoutRedirectUri: "",
23433
23735
  popupRelayUri: "",
23736
+ popupRelayProtocolVersion: 1,
23434
23737
  clientCapabilities: [],
23435
23738
  OIDCOptions: {
23436
23739
  responseMode: ResponseMode.FRAGMENT,
@@ -23497,6 +23800,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
23497
23800
  client: new StubPerformanceClient(),
23498
23801
  };
23499
23802
  const DEFAULT_EXPERIMENTAL_OPTIONS = {
23803
+ enableAsymmetricEar: false,
23500
23804
  iframeTimeoutTelemetry: false,
23501
23805
  allowPlatformBrokerWithDOM: false,
23502
23806
  };
@@ -23550,9 +23854,16 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
23550
23854
  experimental: {
23551
23855
  ...DEFAULT_EXPERIMENTAL_OPTIONS,
23552
23856
  ...userInputExperimental,
23857
+ enableAsymmetricEar: userInputExperimental?.enableAsymmetricEar ?? false,
23553
23858
  },
23554
23859
  telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry },
23555
23860
  };
23861
+ if (overlayedConfig.experimental.enableAsymmetricEar &&
23862
+ overlayedConfig.system.protocolMode !== ProtocolMode.EAR) {
23863
+ const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
23864
+ logger.warning("07xxx7", "");
23865
+ overlayedConfig.experimental.enableAsymmetricEar = false;
23866
+ }
23556
23867
  return overlayedConfig;
23557
23868
  }
23558
23869
 
@@ -24440,19 +24751,21 @@ class PopupClient extends StandardInteractionClient {
24440
24751
  /*
24441
24752
  * When a popup-relay page is configured, open it top-level
24442
24753
  * (same first-party origin) instead of navigating the popup
24443
- * straight to the IdP, and carry the /authorize URL in its hash.
24754
+ * straight to the IdP. V1 carries the action in the hash; v2
24755
+ * retains it for the authenticated handoff.
24444
24756
  * The relay page opens the IdP child popup and relays the
24445
24757
  * response back via postMessage (see waitForPopupResponse).
24446
24758
  */
24447
24759
  const popupRelayUri = this.config.auth.popupRelayUri;
24760
+ popupParams.relayAction = { method: "GET", url: navigateUrl };
24448
24761
  const popupNavigateUrl = popupRelayUri
24449
- ? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), { method: "GET", url: navigateUrl }, correlationId)
24762
+ ? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion)
24450
24763
  : navigateUrl;
24451
24764
  // Show the UI once the url has been created. Get the window handle for the popup.
24452
24765
  const popupWindow = this.initiateAuthRequest(popupNavigateUrl, popupParams);
24453
24766
  this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, InteractionType.Popup, { popupWindow }, null);
24454
24767
  // Wait for the redirect bridge response
24455
- const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
24768
+ const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
24456
24769
  const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
24457
24770
  return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
24458
24771
  }
@@ -24476,21 +24789,20 @@ class PopupClient extends StandardInteractionClient {
24476
24789
  const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
24477
24790
  // Get the frame handle for the silent request
24478
24791
  const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
24479
- const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
24480
24792
  const pkce = pkceCodes ||
24481
24793
  (await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
24482
24794
  const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
24483
- const popupRequest = {
24795
+ let popupRequest = {
24484
24796
  ...request,
24485
- earJwk: earJwk,
24486
24797
  codeChallenge: pkce.challenge,
24487
24798
  ...tokenBindingParams,
24488
24799
  popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
24489
24800
  };
24490
24801
  try {
24802
+ popupRequest = await initializeEarRequest(this.config, popupRequest, this.logger, this.performanceClient);
24491
24803
  const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
24492
24804
  // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
24493
- const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
24805
+ const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
24494
24806
  const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
24495
24807
  if (!serverParams.ear_jwe && serverParams.code) {
24496
24808
  const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
@@ -24518,7 +24830,7 @@ class PopupClient extends StandardInteractionClient {
24518
24830
  const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger);
24519
24831
  const popupWindow = await this.openPostFormPopup(request, discoveredAuthority, popupParams, correlationId, false);
24520
24832
  // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
24521
- const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
24833
+ const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
24522
24834
  const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
24523
24835
  return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
24524
24836
  }
@@ -24574,21 +24886,22 @@ class PopupClient extends StandardInteractionClient {
24574
24886
  this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, InteractionType.Popup, validRequest);
24575
24887
  /*
24576
24888
  * When a popup-relay page is configured, open it top-level (same
24577
- * first-party origin) and carry the end-session URL in its hash,
24578
- * exactly like the login flow. The relay page opens the IdP child
24889
+ * first-party origin), using the configured wire protocol for the
24890
+ * end-session URL. The relay page opens the IdP child
24579
24891
  * popup and the post-logout redirect page (running the redirect
24580
24892
  * bridge) relays completion back via postMessage — so logout works
24581
24893
  * from an embedded, cross-origin iframe where a direct popup to the
24582
24894
  * IdP cannot. See runPopupRelay / waitForPopupResponse.
24583
24895
  */
24584
24896
  const popupRelayUri = this.config.auth.popupRelayUri;
24897
+ popupParams.relayAction = { method: "GET", url: logoutUri };
24585
24898
  const popupNavigateUrl = popupRelayUri
24586
- ? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), { method: "GET", url: logoutUri }, this.correlationId)
24899
+ ? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), popupParams.relayAction, this.correlationId, this.config.auth.popupRelayProtocolVersion)
24587
24900
  : logoutUri;
24588
24901
  // Open the popup window to requestUrl.
24589
24902
  const popupWindow = this.openPopup(popupNavigateUrl, popupParams);
24590
24903
  this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, InteractionType.Popup, { popupWindow }, null);
24591
- await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent).catch(() => {
24904
+ await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction).catch(() => {
24592
24905
  // Swallow any errors related to monitoring the window. Server logout is best effort
24593
24906
  });
24594
24907
  if (mainWindowRedirectUri) {
@@ -24800,11 +25113,12 @@ class PopupClient extends StandardInteractionClient {
24800
25113
  ? getEARFormData
24801
25114
  : getCodeFormData;
24802
25115
  const formData = await getFormData(this.config, discoveredAuthority, request, this.logger, this.performanceClient);
24803
- const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), {
25116
+ popupParams.relayAction = {
24804
25117
  method: "POST",
24805
25118
  action: formData.action,
24806
25119
  fields: formData.fields,
24807
- }, correlationId);
25120
+ };
25121
+ const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion);
24808
25122
  return this.initiateAuthRequest(relayUrl, popupParams);
24809
25123
  }
24810
25124
  const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
@@ -24813,7 +25127,7 @@ class PopupClient extends StandardInteractionClient {
24813
25127
  form.submit();
24814
25128
  return popupWindow;
24815
25129
  }
24816
- async waitForPopupResponse(request, popupWindow, popupWindowParent) {
25130
+ async waitForPopupResponse(request, popupWindow, popupWindowParent, relayAction) {
24817
25131
  /*
24818
25132
  * When a popup-relay page is configured the response is relayed back to
24819
25133
  * this frame by the relay page via postMessage, and the relay popup's
@@ -24823,7 +25137,11 @@ class PopupClient extends StandardInteractionClient {
24823
25137
  * frame and which does not track the relay popup.
24824
25138
  */
24825
25139
  if (this.config.auth.popupRelayUri) {
24826
- return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient);
25140
+ if (this.config.auth.popupRelayProtocolVersion === 2 &&
25141
+ !relayAction) {
25142
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, this.correlationId, "popup_relay_bad_request");
25143
+ }
25144
+ return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient, relayAction, this.config.auth.popupRelayProtocolVersion);
24827
25145
  }
24828
25146
  if (this.waitForPopupResponseHook) {
24829
25147
  return this.waitForPopupResponseHook(request, popupWindow, popupWindowParent);
@@ -24948,16 +25266,15 @@ class RedirectClient extends StandardInteractionClient {
24948
25266
  const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
24949
25267
  // Get the frame handle for the silent request
24950
25268
  const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
24951
- const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
24952
25269
  const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
24953
25270
  const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
24954
- const redirectRequest = {
25271
+ let redirectRequest = {
24955
25272
  ...request,
24956
- earJwk: earJwk,
24957
25273
  codeChallenge: pkceCodes.challenge,
24958
25274
  ...tokenBindingParams,
24959
25275
  };
24960
25276
  try {
25277
+ redirectRequest = await initializeEarRequest(this.config, redirectRequest, this.logger, this.performanceClient);
24961
25278
  if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
24962
25279
  throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
24963
25280
  }
@@ -24970,9 +25287,10 @@ class RedirectClient extends StandardInteractionClient {
24970
25287
  }, this.config.system.redirectNavigationTimeout);
24971
25288
  });
24972
25289
  }
24973
- catch (e) {
25290
+ catch (error) {
25291
+ this.browserStorage.resetRequestCache(correlationId);
24974
25292
  await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
24975
- throw e;
25293
+ throw error;
24976
25294
  }
24977
25295
  }
24978
25296
  /**
@@ -25161,7 +25479,6 @@ class RedirectClient extends StandardInteractionClient {
25161
25479
  /**
25162
25480
  * Redirects window to given URL.
25163
25481
  * @param urlNavigate
25164
- * @param onRedirectNavigateRequest - onRedirectNavigate callback provided on the request
25165
25482
  */
25166
25483
  async initiateAuthRequest(requestUrl) {
25167
25484
  this.logger.verbose("0yaw2e", this.correlationId);
@@ -25449,13 +25766,11 @@ class SilentIframeClient extends StandardInteractionClient {
25449
25766
  async executeEarFlow(request) {
25450
25767
  const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
25451
25768
  const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
25452
- const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
25453
25769
  const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
25454
- const silentRequest = {
25770
+ const silentRequest = await initializeEarRequest(this.config, {
25455
25771
  ...request,
25456
- earJwk: earJwk,
25457
25772
  codeChallenge: pkceCodes.challenge,
25458
- };
25773
+ }, this.logger, this.performanceClient);
25459
25774
  // Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
25460
25775
  const iframe = createHiddenIframe();
25461
25776
  const responseType = this.config.auth.OIDCOptions.responseMode;
@@ -25805,6 +26120,7 @@ function prepareWebSilentRequest({ request, account, correlationId, config, }) {
25805
26120
  return {
25806
26121
  key: JSON.stringify({
25807
26122
  ...thumbprint,
26123
+ accountTenantId: account.tenantId,
25808
26124
  forceRefresh: !!request.forceRefresh,
25809
26125
  cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
25810
26126
  extraParameters: canonicalizeStringDict(request.extraParameters),