@azure/msal-browser 5.25.1 → 5.27.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 (516) hide show
  1. package/README.md +2 -0
  2. package/dist/app/IPublicClientApplication.mjs +1 -1
  3. package/dist/app/PublicClientApplication.mjs +54 -14
  4. package/dist/app/PublicClientApplication.mjs.map +1 -1
  5. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  8. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  9. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
  10. package/dist/cache/AccountManager.mjs +1 -1
  11. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  12. package/dist/cache/BrowserCacheManager.mjs +1 -1
  13. package/dist/cache/CacheHelpers.mjs +1 -1
  14. package/dist/cache/CacheKeys.mjs +1 -1
  15. package/dist/cache/CookieStorage.mjs +1 -1
  16. package/dist/cache/DatabaseStorage.mjs +1 -1
  17. package/dist/cache/EncryptedData.mjs +1 -1
  18. package/dist/cache/LocalStorage.mjs +1 -1
  19. package/dist/cache/MemoryStorage.mjs +1 -1
  20. package/dist/cache/SessionStorage.mjs +1 -1
  21. package/dist/cache/TokenCache.mjs +1 -1
  22. package/dist/config/Configuration.mjs +32 -4
  23. package/dist/config/Configuration.mjs.map +1 -1
  24. package/dist/controllers/NestedAppAuthController.mjs +7 -2
  25. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  26. package/dist/controllers/StandardController.mjs +36 -5
  27. package/dist/controllers/StandardController.mjs.map +1 -1
  28. package/dist/crypto/BrowserCrypto.mjs +1 -1
  29. package/dist/crypto/CryptoOps.mjs +1 -1
  30. package/dist/crypto/PkceGenerator.mjs +1 -1
  31. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  32. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  33. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  34. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  35. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +49 -19
  36. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  37. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  38. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  39. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  51. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  52. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  53. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  54. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -1
  55. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +8 -7
  56. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
  57. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +4 -3
  58. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -1
  59. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +174 -0
  60. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -0
  61. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +67 -17
  62. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
  63. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +3 -4
  64. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -1
  65. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +7 -15
  66. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
  67. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +1 -1
  68. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -1
  69. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +1 -5
  70. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
  71. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +3 -2
  72. package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +1 -1
  73. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  74. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  75. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  76. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  77. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  78. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  79. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  80. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  81. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  82. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  83. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  84. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  85. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  86. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  87. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  88. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  89. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  90. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  91. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  92. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  93. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  94. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +61 -52
  95. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
  96. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +6 -3
  97. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
  98. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +1 -1
  99. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  100. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  101. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  102. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  103. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  104. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  105. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  106. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  107. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  108. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -2
  109. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -1
  110. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +12 -10
  111. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -1
  112. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +1 -1
  113. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +3 -3
  114. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs.map +1 -1
  115. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
  116. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +3 -7
  117. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -1
  118. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +2 -1
  119. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs.map +1 -1
  120. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
  121. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -1
  122. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  123. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  124. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +1 -1
  125. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  126. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +8 -2
  127. package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
  128. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  129. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  130. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  131. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  132. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  133. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  134. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  135. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  136. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  137. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  138. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  139. package/dist/custom_auth/index.mjs +2 -11
  140. package/dist/custom_auth/index.mjs.map +1 -1
  141. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  142. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  143. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  144. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  145. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  146. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  147. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  148. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  149. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  150. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  151. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  152. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +1 -3
  153. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
  154. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  155. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  156. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  157. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  158. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  159. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  160. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  161. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  162. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  163. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  164. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  165. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  166. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  167. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +5 -5
  168. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -1
  169. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +5 -16
  170. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
  171. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +35 -0
  172. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -0
  173. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  174. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  175. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  176. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  177. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  178. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  179. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  180. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  181. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  182. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  183. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  184. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  185. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  186. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  187. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -3
  188. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
  189. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +1 -1
  190. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +1 -3
  191. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +1 -1
  192. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +1 -1
  193. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  194. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  195. package/dist/encode/Base64Decode.mjs +1 -1
  196. package/dist/encode/Base64Encode.mjs +1 -1
  197. package/dist/error/BrowserAuthError.mjs +1 -1
  198. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  199. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  200. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  201. package/dist/error/NativeAuthError.mjs +1 -1
  202. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  203. package/dist/error/NestedAppAuthError.mjs +1 -1
  204. package/dist/event/EventHandler.mjs +1 -1
  205. package/dist/event/EventMessage.mjs +1 -1
  206. package/dist/event/EventType.mjs +1 -1
  207. package/dist/index.mjs +1 -1
  208. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  209. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  210. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  211. package/dist/interaction_client/PopupClient.mjs +31 -3
  212. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  213. package/dist/interaction_client/RedirectClient.mjs +5 -5
  214. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  215. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  216. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  217. package/dist/interaction_client/SilentIframeClient.mjs +4 -3
  218. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  219. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  220. package/dist/interaction_client/StandardInteractionClient.mjs +7 -1
  221. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  222. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  223. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  224. package/dist/log-strings-mapping.json +27 -7
  225. package/dist/naa/BridgeError.mjs +1 -1
  226. package/dist/naa/BridgeProxy.mjs +1 -1
  227. package/dist/naa/BridgeStatusCode.mjs +1 -1
  228. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  229. package/dist/navigation/NavigationClient.mjs +1 -1
  230. package/dist/network/FetchClient.mjs +1 -1
  231. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  232. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  233. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  234. package/dist/packageMetadata.mjs +2 -2
  235. package/dist/popup_relay/constants.mjs +1 -1
  236. package/dist/popup_relay/index.mjs +1 -1
  237. package/dist/popup_relay/relayClient.mjs +1 -1
  238. package/dist/protocol/Authorize.mjs +23 -13
  239. package/dist/protocol/Authorize.mjs.map +1 -1
  240. package/dist/redirect_bridge/index.mjs +1 -1
  241. package/dist/request/RequestHelpers.mjs +1 -1
  242. package/dist/request/SilentRequestHelpers.mjs +9 -3
  243. package/dist/request/SilentRequestHelpers.mjs.map +1 -1
  244. package/dist/response/ResponseHandler.mjs +1 -1
  245. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  246. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  247. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  248. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  249. package/dist/utils/BrowserConstants.mjs +1 -1
  250. package/dist/utils/BrowserDetection.mjs +53 -0
  251. package/dist/utils/BrowserDetection.mjs.map +1 -0
  252. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  253. package/dist/utils/BrowserUtils.mjs +7 -2
  254. package/dist/utils/BrowserUtils.mjs.map +1 -1
  255. package/dist/utils/Helpers.mjs +1 -1
  256. package/dist/utils/IframeMonitor.mjs +81 -0
  257. package/dist/utils/IframeMonitor.mjs.map +1 -0
  258. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  259. package/dist/utils/PopupMonitor.mjs +119 -0
  260. package/dist/utils/PopupMonitor.mjs.map +1 -0
  261. package/dist/utils/PopupOriginCheck.mjs +88 -0
  262. package/dist/utils/PopupOriginCheck.mjs.map +1 -0
  263. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  264. package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
  265. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  266. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  267. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  268. package/dist/webBrokerBridge/index.mjs +1 -1
  269. package/lib/custom-auth-path/log-strings-mapping.json +27 -7
  270. package/lib/custom-auth-path/msal-custom-auth.cjs +1157 -718
  271. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  272. package/lib/custom-auth-path/msal-custom-auth.js +1157 -718
  273. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  274. package/lib/log-strings-mapping.json +27 -3
  275. package/lib/msal-browser.cjs +678 -134
  276. package/lib/msal-browser.cjs.map +1 -1
  277. package/lib/msal-browser.js +678 -134
  278. package/lib/msal-browser.js.map +1 -1
  279. package/lib/msal-browser.min.js +2 -2
  280. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  281. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  282. package/lib/popup-relay/msal-popup-relay.js +2 -2
  283. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  284. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  285. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  286. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  287. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  288. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  289. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  290. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
  291. package/package.json +2 -2
  292. package/src/app/PublicClientApplication.ts +108 -8
  293. package/src/config/Configuration.ts +63 -6
  294. package/src/controllers/NestedAppAuthController.ts +6 -1
  295. package/src/controllers/StandardController.ts +46 -3
  296. package/src/custom_auth/CustomAuthActionInputs.ts +16 -6
  297. package/src/custom_auth/controller/CustomAuthStandardController.ts +78 -17
  298. package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +18 -30
  299. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +1 -0
  300. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +239 -0
  301. package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +2 -5
  302. package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +0 -2
  303. package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +13 -10
  304. package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +19 -0
  305. package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +3 -6
  306. package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +4 -6
  307. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +114 -17
  308. package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +6 -3
  309. package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +17 -19
  310. package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +5 -5
  311. package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +0 -4
  312. package/src/custom_auth/core/error/CustomAuthApiError.ts +2 -1
  313. package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +3 -4
  314. package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +75 -68
  315. package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +6 -3
  316. package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +2 -4
  317. package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +0 -1
  318. package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +17 -15
  319. package/src/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.ts +1 -1
  320. package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +3 -11
  321. package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +2 -3
  322. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.ts +1 -0
  323. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +2 -0
  324. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +1 -1
  325. package/src/custom_auth/core/utils/ArgumentValidator.ts +13 -0
  326. package/src/custom_auth/index.ts +4 -14
  327. package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +6 -10
  328. package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +0 -2
  329. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +3 -6
  330. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +2 -4
  331. package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +2 -4
  332. package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +5 -4
  333. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +4 -23
  334. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +56 -0
  335. package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +1 -5
  336. package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +2 -5
  337. package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +0 -2
  338. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -2
  339. package/src/interaction_client/PopupClient.ts +45 -1
  340. package/src/interaction_client/RedirectClient.ts +9 -5
  341. package/src/interaction_client/SilentIframeClient.ts +9 -2
  342. package/src/interaction_client/StandardInteractionClient.ts +6 -0
  343. package/src/packageMetadata.ts +1 -1
  344. package/src/protocol/Authorize.ts +34 -28
  345. package/src/request/SilentRequestHelpers.ts +11 -2
  346. package/src/utils/BrowserDetection.ts +85 -0
  347. package/src/utils/BrowserUtils.ts +8 -1
  348. package/src/utils/IframeMonitor.ts +98 -0
  349. package/src/utils/PopupMonitor.ts +158 -0
  350. package/src/utils/PopupOriginCheck.ts +94 -0
  351. package/types/app/PublicClientApplication.d.ts +6 -4
  352. package/types/app/PublicClientApplication.d.ts.map +1 -1
  353. package/types/config/Configuration.d.ts +16 -0
  354. package/types/config/Configuration.d.ts.map +1 -1
  355. package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  356. package/types/controllers/StandardController.d.ts.map +1 -1
  357. package/types/custom_auth/CustomAuthActionInputs.d.ts +16 -5
  358. package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
  359. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  360. package/types/custom_auth/controller/CustomAuthStandardController.d.ts +1 -0
  361. package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
  362. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +9 -11
  363. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
  364. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +1 -0
  365. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -1
  366. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +90 -0
  367. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -0
  368. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +1 -2
  369. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +1 -1
  370. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +1 -2
  371. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
  372. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +8 -7
  373. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
  374. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts +13 -0
  375. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +1 -0
  376. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +2 -3
  377. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
  378. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +5 -6
  379. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
  380. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +9 -6
  381. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
  382. package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -1
  383. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +2 -2
  384. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
  385. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +5 -3
  386. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
  387. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
  388. package/types/custom_auth/core/error/CustomAuthApiError.d.ts +2 -1
  389. package/types/custom_auth/core/error/CustomAuthApiError.d.ts.map +1 -1
  390. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +1 -3
  391. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
  392. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +2 -2
  393. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
  394. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +2 -2
  395. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -1
  396. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +2 -4
  397. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
  398. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +0 -1
  399. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -1
  400. package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts +2 -2
  401. package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -1
  402. package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts +1 -1
  403. package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts.map +1 -1
  404. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -1
  405. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +1 -2
  406. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
  407. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts +2 -0
  408. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -1
  409. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +1 -1
  410. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
  411. package/types/custom_auth/core/utils/ArgumentValidator.d.ts +1 -0
  412. package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
  413. package/types/custom_auth/index.d.ts +3 -12
  414. package/types/custom_auth/index.d.ts.map +1 -1
  415. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +5 -7
  416. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
  417. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
  418. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -6
  419. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
  420. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +3 -4
  421. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
  422. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +3 -4
  423. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
  424. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -1
  425. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +4 -9
  426. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
  427. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts +9 -0
  428. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -0
  429. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +1 -2
  430. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
  431. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +1 -2
  432. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
  433. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
  434. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +1 -1
  435. package/types/interaction_client/PopupClient.d.ts +12 -0
  436. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  437. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  438. package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  439. package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  440. package/types/packageMetadata.d.ts +1 -1
  441. package/types/protocol/Authorize.d.ts.map +1 -1
  442. package/types/request/SilentRequestHelpers.d.ts +1 -1
  443. package/types/request/SilentRequestHelpers.d.ts.map +1 -1
  444. package/types/utils/BrowserDetection.d.ts +17 -0
  445. package/types/utils/BrowserDetection.d.ts.map +1 -0
  446. package/types/utils/BrowserUtils.d.ts +2 -1
  447. package/types/utils/BrowserUtils.d.ts.map +1 -1
  448. package/types/utils/IframeMonitor.d.ts +17 -0
  449. package/types/utils/IframeMonitor.d.ts.map +1 -0
  450. package/types/utils/PopupMonitor.d.ts +37 -0
  451. package/types/utils/PopupMonitor.d.ts.map +1 -0
  452. package/types/utils/PopupOriginCheck.d.ts +27 -0
  453. package/types/utils/PopupOriginCheck.d.ts.map +1 -0
  454. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs +0 -102
  455. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs.map +0 -1
  456. package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs +0 -20
  457. package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs.map +0 -1
  458. package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs +0 -36
  459. package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs.map +0 -1
  460. package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs +0 -29
  461. package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs.map +0 -1
  462. package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs +0 -36
  463. package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs.map +0 -1
  464. package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs +0 -61
  465. package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs.map +0 -1
  466. package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs +0 -29
  467. package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs.map +0 -1
  468. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs +0 -18
  469. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs.map +0 -1
  470. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs +0 -37
  471. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs.map +0 -1
  472. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs +0 -23
  473. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs.map +0 -1
  474. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs +0 -25
  475. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs.map +0 -1
  476. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs +0 -33
  477. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs.map +0 -1
  478. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.ts +0 -146
  479. package/src/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.ts +0 -15
  480. package/src/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.ts +0 -33
  481. package/src/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.ts +0 -25
  482. package/src/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.ts +0 -18
  483. package/src/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.ts +0 -59
  484. package/src/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.ts +0 -76
  485. package/src/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.ts +0 -25
  486. package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.ts +0 -13
  487. package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.ts +0 -35
  488. package/src/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.ts +0 -19
  489. package/src/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.ts +0 -21
  490. package/src/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.ts +0 -32
  491. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts +0 -40
  492. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts.map +0 -1
  493. package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts +0 -11
  494. package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts.map +0 -1
  495. package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts +0 -23
  496. package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts.map +0 -1
  497. package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts +0 -18
  498. package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts.map +0 -1
  499. package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts +0 -7
  500. package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts.map +0 -1
  501. package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts +0 -17
  502. package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts.map +0 -1
  503. package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts +0 -18
  504. package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts.map +0 -1
  505. package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts +0 -18
  506. package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts.map +0 -1
  507. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts +0 -9
  508. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts.map +0 -1
  509. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts +0 -22
  510. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts.map +0 -1
  511. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts +0 -12
  512. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts.map +0 -1
  513. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts +0 -14
  514. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts.map +0 -1
  515. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts +0 -20
  516. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-browser v5.25.1 2026-10-13 */
1
+ /*! @azure/msal-browser v5.27.0 2026-10-27 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6
6
  /*
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
8
8
  * Licensed under the MIT License.
@@ -54,9 +54,15 @@ const EAR_JWK = "ear_jwk";
54
54
  const EAR_JWE_CRYPTO = "ear_jwe_crypto";
55
55
  const RESOURCE = "resource";
56
56
  const CLI_DATA = "clidata";
57
- const ATTRIBUTE_TOKENS = "attribute_tokens";
57
+ const ATTRIBUTE_TOKENS = "attribute_tokens";
58
+ /**
59
+ * Popup-origin-check-done. Signals to the STS that the client verified the
60
+ * popup cannot be reached by an untrusted window, so the
61
+ * Cross-Origin-Opener-Policy response header may be omitted.
62
+ */
63
+ const POPUP_ORIGIN_CHECK_DONE = "pocd";
58
64
 
59
- /*! @azure/msal-common v16.14.2 2026-10-13 */
65
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
60
66
  /*
61
67
  * Copyright (c) Microsoft Corporation. All rights reserved.
62
68
  * Licensed under the MIT License.
@@ -295,7 +301,7 @@ const JsonWebTokenTypes$1 = {
295
301
  // Token renewal offset default in seconds
296
302
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
297
303
 
298
- /*! @azure/msal-common v16.14.2 2026-10-13 */
304
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
299
305
  /*
300
306
  * Copyright (c) Microsoft Corporation. All rights reserved.
301
307
  * Licensed under the MIT License.
@@ -324,7 +330,7 @@ function createAuthError(code, correlationId, additionalMessage) {
324
330
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
325
331
  }
326
332
 
327
- /*! @azure/msal-common v16.14.2 2026-10-13 */
333
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
328
334
 
329
335
  /*
330
336
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -347,7 +353,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
347
353
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
348
354
  }
349
355
 
350
- /*! @azure/msal-common v16.14.2 2026-10-13 */
356
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
351
357
  /*
352
358
  * Copyright (c) Microsoft Corporation. All rights reserved.
353
359
  * Licensed under the MIT License.
@@ -433,7 +439,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
433
439
  userCanceled: userCanceled
434
440
  });
435
441
 
436
- /*! @azure/msal-common v16.14.2 2026-10-13 */
442
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
437
443
 
438
444
  /*
439
445
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -471,7 +477,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
471
477
  };
472
478
  }
473
479
 
474
- /*! @azure/msal-common v16.14.2 2026-10-13 */
480
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
475
481
 
476
482
  /*
477
483
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -537,7 +543,7 @@ function getJWSPayload(authToken, correlationId) {
537
543
  return matches[2];
538
544
  }
539
545
 
540
- /*! @azure/msal-common v16.14.2 2026-10-13 */
546
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
541
547
 
542
548
  /*
543
549
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -625,7 +631,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
625
631
  return updatedAccountInfo;
626
632
  }
627
633
 
628
- /*! @azure/msal-common v16.14.2 2026-10-13 */
634
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
629
635
  /*
630
636
  * Copyright (c) Microsoft Corporation. All rights reserved.
631
637
  * Licensed under the MIT License.
@@ -639,7 +645,7 @@ const AuthorityType = {
639
645
  Ciam: 3,
640
646
  };
641
647
 
642
- /*! @azure/msal-common v16.14.2 2026-10-13 */
648
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
643
649
  /*
644
650
  * Copyright (c) Microsoft Corporation. All rights reserved.
645
651
  * Licensed under the MIT License.
@@ -661,7 +667,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
661
667
  return null;
662
668
  }
663
669
 
664
- /*! @azure/msal-common v16.14.2 2026-10-13 */
670
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
665
671
  /*
666
672
  * Copyright (c) Microsoft Corporation. All rights reserved.
667
673
  * Licensed under the MIT License.
@@ -685,7 +691,7 @@ const ProtocolMode = {
685
691
  EAR: "EAR",
686
692
  };
687
693
 
688
- /*! @azure/msal-common v16.14.2 2026-10-13 */
694
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
689
695
  /**
690
696
  * Returns the AccountInfo interface for this account.
691
697
  * @internal
@@ -874,7 +880,7 @@ function isAccountEntity(entity) {
874
880
  entity.hasOwnProperty("authorityType"));
875
881
  }
876
882
 
877
- /*! @azure/msal-common v16.14.2 2026-10-13 */
883
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
878
884
  /*
879
885
  * Copyright (c) Microsoft Corporation. All rights reserved.
880
886
  * Licensed under the MIT License.
@@ -891,7 +897,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
891
897
  unexpectedError: unexpectedError
892
898
  });
893
899
 
894
- /*! @azure/msal-common v16.14.2 2026-10-13 */
900
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
895
901
 
896
902
  /*
897
903
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -911,7 +917,47 @@ function createClientConfigurationError(errorCode, correlationId) {
911
917
  return new ClientConfigurationError(errorCode, correlationId);
912
918
  }
913
919
 
914
- /*! @azure/msal-common v16.14.2 2026-10-13 */
920
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
921
+ /*
922
+ * Copyright (c) Microsoft Corporation. All rights reserved.
923
+ * Licensed under the MIT License.
924
+ */
925
+ // Track only our normalized copies, never caller-owned mutable inputs.
926
+ const normalizedHeaderRecords = new WeakSet();
927
+ /**
928
+ * Creates a lowercase-keyed snapshot without changing header values or the input.
929
+ * Reuses snapshots produced by this function to avoid repeated normalization.
930
+ * @internal
931
+ */
932
+ function normalizeResponseHeaders(headers) {
933
+ if (normalizedHeaderRecords.has(headers)) {
934
+ return headers;
935
+ }
936
+ const normalized = Object.fromEntries(Object.entries(headers).map(([name, value]) => [
937
+ name.toLowerCase(),
938
+ value,
939
+ ]));
940
+ normalizedHeaderRecords.add(normalized);
941
+ return normalized;
942
+ }
943
+ /**
944
+ * Reads a response header case-insensitively.
945
+ * Normalized snapshots are never scanned, even when a header is missing.
946
+ * @internal
947
+ */
948
+ function getResponseHeader(headers, name) {
949
+ const key = name.toLowerCase();
950
+ if (Object.prototype.hasOwnProperty.call(headers, key)) {
951
+ return headers[key];
952
+ }
953
+ if (normalizedHeaderRecords.has(headers)) {
954
+ return undefined;
955
+ }
956
+ const headerName = Object.keys(headers).find((header) => header.toLowerCase() === key);
957
+ return headerName === undefined ? undefined : headers[headerName];
958
+ }
959
+
960
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
915
961
  /*
916
962
  * Copyright (c) Microsoft Corporation. All rights reserved.
917
963
  * Licensed under the MIT License.
@@ -981,7 +1027,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
981
1027
  urlParseError: urlParseError
982
1028
  });
983
1029
 
984
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1030
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
985
1031
 
986
1032
  /*
987
1033
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -992,8 +1038,9 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
992
1038
  * header challenge values that can be used outside the basic authorization flows.
993
1039
  */
994
1040
  class AuthenticationHeaderParser {
1041
+ /** Captures a case-insensitive snapshot of the response headers. */
995
1042
  constructor(headers) {
996
- this.headers = headers;
1043
+ this.headers = normalizeResponseHeaders(headers);
997
1044
  }
998
1045
  /**
999
1046
  * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.
@@ -1001,7 +1048,7 @@ class AuthenticationHeaderParser {
1001
1048
  */
1002
1049
  getShrNonce() {
1003
1050
  // Attempt to parse nonce from Authentiacation-Info
1004
- const authenticationInfo = this.headers[HeaderNames.AuthenticationInfo];
1051
+ const authenticationInfo = getResponseHeader(this.headers, HeaderNames.AuthenticationInfo);
1005
1052
  if (authenticationInfo) {
1006
1053
  const authenticationInfoChallenges = this.parseChallenges(authenticationInfo);
1007
1054
  if (authenticationInfoChallenges.nextnonce) {
@@ -1010,7 +1057,7 @@ class AuthenticationHeaderParser {
1010
1057
  throw createClientConfigurationError(invalidAuthenticationHeader, "");
1011
1058
  }
1012
1059
  // Attempt to parse nonce from WWW-Authenticate
1013
- const wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate];
1060
+ const wwwAuthenticate = getResponseHeader(this.headers, HeaderNames.WWWAuthenticate);
1014
1061
  if (wwwAuthenticate) {
1015
1062
  const wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate);
1016
1063
  if (wwwAuthenticateChallenges.nonce) {
@@ -1039,7 +1086,7 @@ class AuthenticationHeaderParser {
1039
1086
  }
1040
1087
  }
1041
1088
 
1042
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1089
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1043
1090
  /*
1044
1091
  * Copyright (c) Microsoft Corporation. All rights reserved.
1045
1092
  * Licensed under the MIT License.
@@ -1051,7 +1098,7 @@ function isOpenIdConfigResponse(response) {
1051
1098
  response.hasOwnProperty("jwks_uri"));
1052
1099
  }
1053
1100
 
1054
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1101
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1055
1102
  /*
1056
1103
  * Copyright (c) Microsoft Corporation. All rights reserved.
1057
1104
  * Licensed under the MIT License.
@@ -1131,7 +1178,7 @@ class StringUtils {
1131
1178
  }
1132
1179
  }
1133
1180
 
1134
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1181
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1135
1182
 
1136
1183
  /*
1137
1184
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1289,7 +1336,7 @@ class UrlString {
1289
1336
  }
1290
1337
  }
1291
1338
 
1292
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1339
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1293
1340
 
1294
1341
  /*
1295
1342
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1443,7 +1490,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
1443
1490
  return null;
1444
1491
  }
1445
1492
 
1446
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1493
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1447
1494
  /*
1448
1495
  * Copyright (c) Microsoft Corporation. All rights reserved.
1449
1496
  * Licensed under the MIT License.
@@ -1461,7 +1508,7 @@ const AzureCloudInstance = {
1461
1508
  AzureUsGovernment: "https://login.microsoftonline.us",
1462
1509
  };
1463
1510
 
1464
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1511
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1465
1512
  /*
1466
1513
  * Copyright (c) Microsoft Corporation. All rights reserved.
1467
1514
  * Licensed under the MIT License.
@@ -1471,7 +1518,7 @@ function isCloudInstanceDiscoveryResponse(response) {
1471
1518
  response.hasOwnProperty("metadata"));
1472
1519
  }
1473
1520
 
1474
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1521
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1475
1522
  /*
1476
1523
  * Copyright (c) Microsoft Corporation. All rights reserved.
1477
1524
  * Licensed under the MIT License.
@@ -1481,7 +1528,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
1481
1528
  response.hasOwnProperty("error_description"));
1482
1529
  }
1483
1530
 
1484
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1531
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1485
1532
  /*
1486
1533
  * Copyright (c) Microsoft Corporation. All rights reserved.
1487
1534
  * Licensed under the MIT License.
@@ -1552,7 +1599,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
1552
1599
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1553
1600
  const SetUserData = "setUserData";
1554
1601
 
1555
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1602
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1556
1603
  /*
1557
1604
  * Copyright (c) Microsoft Corporation. All rights reserved.
1558
1605
  * Licensed under the MIT License.
@@ -1645,7 +1692,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
1645
1692
  };
1646
1693
  };
1647
1694
 
1648
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1695
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1649
1696
 
1650
1697
  /*
1651
1698
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1756,7 +1803,7 @@ RegionDiscovery.IMDS_OPTIONS = {
1756
1803
  },
1757
1804
  };
1758
1805
 
1759
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1806
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1760
1807
  /*
1761
1808
  * Copyright (c) Microsoft Corporation. All rights reserved.
1762
1809
  * Licensed under the MIT License.
@@ -1821,7 +1868,7 @@ function wasClockTurnedBack(cachedAt) {
1821
1868
  return cachedAtSec > nowSeconds();
1822
1869
  }
1823
1870
 
1824
- /*! @azure/msal-common v16.14.2 2026-10-13 */
1871
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1825
1872
 
1826
1873
  /*
1827
1874
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2108,7 +2155,7 @@ function serializeAttributeTokens(attributeTokens) {
2108
2155
  return [...attributeTokens].sort().join(" ");
2109
2156
  }
2110
2157
 
2111
- /*! @azure/msal-common v16.14.2 2026-10-13 */
2158
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
2112
2159
 
2113
2160
  /*
2114
2161
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3076,7 +3123,7 @@ function buildStaticAuthorityOptions(authOptions) {
3076
3123
  };
3077
3124
  }
3078
3125
 
3079
- /*! @azure/msal-common v16.14.2 2026-10-13 */
3126
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3080
3127
 
3081
3128
  /*
3082
3129
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3110,7 +3157,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
3110
3157
  }
3111
3158
  }
3112
3159
 
3113
- /*! @azure/msal-common v16.14.2 2026-10-13 */
3160
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3114
3161
 
3115
3162
  /*
3116
3163
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3306,7 +3353,7 @@ class ScopeSet {
3306
3353
  }
3307
3354
  }
3308
3355
 
3309
- /*! @azure/msal-common v16.14.2 2026-10-13 */
3356
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3310
3357
 
3311
3358
  /*
3312
3359
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3587,6 +3634,20 @@ function addInstanceAware(parameters) {
3587
3634
  parameters.set(INSTANCE_AWARE, "true");
3588
3635
  }
3589
3636
  }
3637
+ /**
3638
+ * Adds `pocd=1`, telling the STS that the client verified the popup driving
3639
+ * this request cannot be reached by an untrusted window, so the
3640
+ * Cross-Origin-Opener-Policy response header may be omitted.
3641
+ *
3642
+ * Only ever added when the check passed — a negative result is signalled by
3643
+ * omitting the parameter, which keeps the STS default (apply COOP) and stays
3644
+ * compatible with library versions that never send it.
3645
+ */
3646
+ function addPopupOriginCheckDone(parameters) {
3647
+ if (!parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
3648
+ parameters.set(POPUP_ORIGIN_CHECK_DONE, "1");
3649
+ }
3650
+ }
3590
3651
  /**
3591
3652
  * Add extraParameters
3592
3653
  * @param extraParams - String dictionary containing extra parameters to be added.
@@ -3792,7 +3853,7 @@ function addAttributeTokens(parameters, attributeTokens) {
3792
3853
  }
3793
3854
  }
3794
3855
 
3795
- /*! @azure/msal-common v16.14.2 2026-10-13 */
3856
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3796
3857
 
3797
3858
  /*
3798
3859
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3813,7 +3874,8 @@ function stripLeadingHashOrQuery(responseString) {
3813
3874
  return responseString;
3814
3875
  }
3815
3876
  /**
3816
- * Returns URL hash as server auth code response object.
3877
+ * Returns flat fragment or query parameters as an authorization response.
3878
+ * Application routes and unrecognized responses return null.
3817
3879
  */
3818
3880
  function getDeserializedResponse(responseString) {
3819
3881
  // Check if given hash is empty
@@ -3823,7 +3885,15 @@ function getDeserializedResponse(responseString) {
3823
3885
  try {
3824
3886
  // Strip the # or ? symbol if present
3825
3887
  const normalizedResponse = stripLeadingHashOrQuery(responseString);
3826
- // If # symbol was not present, above will return empty string, so give original hash value
3888
+ /*
3889
+ * Require a flat parameter name, not an application route.
3890
+ * Reject routes like #/dashboard?tab=orders&code=... and
3891
+ * #/dashboard/orders&state=..., where ?, /, or # appears before
3892
+ * the first = or &. These characters are allowed in parameter values.
3893
+ */
3894
+ if (!/^[^=&?#/]+(?:=|&|$)/.test(normalizedResponse)) {
3895
+ return null;
3896
+ }
3827
3897
  const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse));
3828
3898
  // Check for known response properties
3829
3899
  if (deserializedHash.code ||
@@ -3914,7 +3984,7 @@ function validateUrl(url, logger, correlationId) {
3914
3984
  }
3915
3985
  }
3916
3986
 
3917
- /*! @azure/msal-common v16.14.2 2026-10-13 */
3987
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3918
3988
 
3919
3989
  /*
3920
3990
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3962,7 +4032,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
3962
4032
  },
3963
4033
  };
3964
4034
 
3965
- /*! @azure/msal-common v16.14.2 2026-10-13 */
4035
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3966
4036
 
3967
4037
  /*
3968
4038
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3985,7 +4055,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
3985
4055
  },
3986
4056
  };
3987
4057
 
3988
- /*! @azure/msal-common v16.14.2 2026-10-13 */
4058
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3989
4059
  /*
3990
4060
  * Copyright (c) Microsoft Corporation. All rights reserved.
3991
4061
  * Licensed under the MIT License.
@@ -4274,12 +4344,12 @@ class Logger {
4274
4344
  }
4275
4345
  }
4276
4346
 
4277
- /*! @azure/msal-common v16.14.2 2026-10-13 */
4347
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4278
4348
  /* eslint-disable header/header */
4279
4349
  const name$1 = "@azure/msal-common";
4280
- const version$1 = "16.14.2";
4350
+ const version$1 = "16.15.0";
4281
4351
 
4282
- /*! @azure/msal-common v16.14.2 2026-10-13 */
4352
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4283
4353
  /*
4284
4354
  * Copyright (c) Microsoft Corporation. All rights reserved.
4285
4355
  * Licensed under the MIT License.
@@ -4287,7 +4357,7 @@ const version$1 = "16.14.2";
4287
4357
  const cacheQuotaExceeded = "cache_quota_exceeded";
4288
4358
  const cacheErrorUnknown = "cache_error_unknown";
4289
4359
 
4290
- /*! @azure/msal-common v16.14.2 2026-10-13 */
4360
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4291
4361
 
4292
4362
  /*
4293
4363
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4325,7 +4395,7 @@ function createCacheError(e) {
4325
4395
  }
4326
4396
  }
4327
4397
 
4328
- /*! @azure/msal-common v16.14.2 2026-10-13 */
4398
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4329
4399
 
4330
4400
  /*
4331
4401
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5513,7 +5583,7 @@ class DefaultStorageClass extends CacheManager {
5513
5583
  }
5514
5584
  }
5515
5585
 
5516
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5586
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5517
5587
  /*
5518
5588
  * Copyright (c) Microsoft Corporation. All rights reserved.
5519
5589
  * Licensed under the MIT License.
@@ -5578,7 +5648,7 @@ const IntFields = new Set([
5578
5648
  "fetchRetryCount",
5579
5649
  ]);
5580
5650
 
5581
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5651
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5582
5652
 
5583
5653
  /*
5584
5654
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5636,7 +5706,7 @@ class StubPerformanceClient {
5636
5706
  }
5637
5707
  }
5638
5708
 
5639
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5709
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5640
5710
 
5641
5711
  /*
5642
5712
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5734,7 +5804,7 @@ function isOidcProtocolMode(config) {
5734
5804
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5735
5805
  }
5736
5806
 
5737
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5807
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5738
5808
  /*
5739
5809
  * Copyright (c) Microsoft Corporation. All rights reserved.
5740
5810
  * Licensed under the MIT License.
@@ -5761,7 +5831,7 @@ function isOidcProtocolMode(config) {
5761
5831
  }
5762
5832
  }
5763
5833
 
5764
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5834
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5765
5835
 
5766
5836
  /*
5767
5837
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5782,7 +5852,7 @@ function createJoseHeaderError(code, correlationId) {
5782
5852
  return new JoseHeaderError(code, correlationId);
5783
5853
  }
5784
5854
 
5785
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5855
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5786
5856
  /*
5787
5857
  * Copyright (c) Microsoft Corporation. All rights reserved.
5788
5858
  * Licensed under the MIT License.
@@ -5807,7 +5877,7 @@ function isPlainObject(value) {
5807
5877
  return Object.getPrototypeOf(value) === proto;
5808
5878
  }
5809
5879
 
5810
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5880
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5811
5881
  /*
5812
5882
  * Copyright (c) Microsoft Corporation. All rights reserved.
5813
5883
  * Licensed under the MIT License.
@@ -5817,7 +5887,7 @@ const missingAlgError = "missing_alg_error";
5817
5887
  const missingJwkError = "missing_jwk_error";
5818
5888
  const invalidJwkError = "invalid_jwk_error";
5819
5889
 
5820
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5890
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5821
5891
 
5822
5892
  /*
5823
5893
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5883,7 +5953,7 @@ class JoseHeader {
5883
5953
  }
5884
5954
  }
5885
5955
 
5886
- /*! @azure/msal-common v16.14.2 2026-10-13 */
5956
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5887
5957
 
5888
5958
  /*
5889
5959
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5984,7 +6054,7 @@ class PopTokenGenerator {
5984
6054
  }
5985
6055
  }
5986
6056
 
5987
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6057
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5988
6058
 
5989
6059
  /*
5990
6060
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6129,7 +6199,7 @@ class DpopProofGenerator {
6129
6199
  }
6130
6200
  }
6131
6201
 
6132
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6202
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6133
6203
  /*
6134
6204
  * Copyright (c) Microsoft Corporation. All rights reserved.
6135
6205
  * Licensed under the MIT License.
@@ -6193,7 +6263,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
6193
6263
  uiNotAllowed: uiNotAllowed
6194
6264
  });
6195
6265
 
6196
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6266
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6197
6267
 
6198
6268
  /*
6199
6269
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6260,7 +6330,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
6260
6330
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
6261
6331
  }
6262
6332
 
6263
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6333
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6264
6334
 
6265
6335
  /*
6266
6336
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6279,7 +6349,7 @@ class ServerError extends AuthError {
6279
6349
  }
6280
6350
  }
6281
6351
 
6282
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6352
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6283
6353
 
6284
6354
  /*
6285
6355
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6350,7 +6420,7 @@ function parseRequestState(base64Decode, state, correlationId) {
6350
6420
  }
6351
6421
  }
6352
6422
 
6353
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6423
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6354
6424
 
6355
6425
  /*
6356
6426
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6778,7 +6848,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
6778
6848
  return baseAccount;
6779
6849
  }
6780
6850
 
6781
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6851
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6782
6852
  /*
6783
6853
  * Copyright (c) Microsoft Corporation. All rights reserved.
6784
6854
  * Licensed under the MIT License.
@@ -6788,7 +6858,7 @@ const CcsCredentialType = {
6788
6858
  UPN: "UPN",
6789
6859
  };
6790
6860
 
6791
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6861
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6792
6862
  /*
6793
6863
  * Copyright (c) Microsoft Corporation. All rights reserved.
6794
6864
  * Licensed under the MIT License.
@@ -6807,7 +6877,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
6807
6877
  }
6808
6878
  }
6809
6879
 
6810
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6880
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6811
6881
 
6812
6882
  /*
6813
6883
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6831,7 +6901,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
6831
6901
  };
6832
6902
  }
6833
6903
 
6834
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6904
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6835
6905
 
6836
6906
  /*
6837
6907
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6866,13 +6936,14 @@ class ThrottlingUtils {
6866
6936
  * Performs necessary throttling checks after a network request.
6867
6937
  * @param cacheManager
6868
6938
  * @param thumbprint
6869
- * @param response
6939
+ * @param response - Token response with case-insensitive header names.
6870
6940
  */
6871
6941
  static postProcess(cacheManager, thumbprint, response, correlationId) {
6942
+ const retryAfter = getRetryAfterHeader(response);
6872
6943
  if (ThrottlingUtils.checkResponseStatus(response) ||
6873
- ThrottlingUtils.checkResponseForRetryAfter(response)) {
6944
+ retryAfter !== undefined) {
6874
6945
  const thumbprintValue = {
6875
- throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])),
6946
+ throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(retryAfter || "")),
6876
6947
  error: response.body.error,
6877
6948
  errorCodes: response.body.error_codes,
6878
6949
  errorMessage: response.body.error_description,
@@ -6891,14 +6962,10 @@ class ThrottlingUtils {
6891
6962
  }
6892
6963
  /**
6893
6964
  * Checks a NetworkResponse object's RetryAfter header
6894
- * @param response
6965
+ * @param response - Token response with case-insensitive header names.
6895
6966
  */
6896
6967
  static checkResponseForRetryAfter(response) {
6897
- if (response.headers) {
6898
- return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) &&
6899
- (response.status < 200 || response.status >= 300));
6900
- }
6901
- return false;
6968
+ return getRetryAfterHeader(response) !== undefined;
6902
6969
  }
6903
6970
  /**
6904
6971
  * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.
@@ -6915,9 +6982,16 @@ class ThrottlingUtils {
6915
6982
  const key = this.generateThrottlingStorageKey(thumbprint);
6916
6983
  cacheManager.removeItem(key, request.correlationId);
6917
6984
  }
6985
+ }
6986
+ /** Reads Retry-After only for non-success responses. */
6987
+ function getRetryAfterHeader(response) {
6988
+ if ((response.status < 200 || response.status >= 300) && response.headers) {
6989
+ return getResponseHeader(response.headers, HeaderNames.RETRY_AFTER);
6990
+ }
6991
+ return undefined;
6918
6992
  }
6919
6993
 
6920
- /*! @azure/msal-common v16.14.2 2026-10-13 */
6994
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6921
6995
 
6922
6996
  /*
6923
6997
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6948,7 +7022,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
6948
7022
  return new NetworkError(error, httpStatus, responseHeaders);
6949
7023
  }
6950
7024
 
6951
- /*! @azure/msal-common v16.14.2 2026-10-13 */
7025
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6952
7026
 
6953
7027
  /*
6954
7028
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7046,7 +7120,8 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
7046
7120
  let response;
7047
7121
  try {
7048
7122
  response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
7049
- const responseHeaders = response.headers || {};
7123
+ const responseHeaders = normalizeResponseHeaders(response.headers || {});
7124
+ response = { ...response, headers: responseHeaders };
7050
7125
  performanceClient?.addFields({
7051
7126
  refreshTokenSize: response.body.refresh_token?.length || 0,
7052
7127
  httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "",
@@ -7055,16 +7130,16 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
7055
7130
  }
7056
7131
  catch (e) {
7057
7132
  if (e instanceof NetworkError) {
7058
- const responseHeaders = e.responseHeaders;
7133
+ const responseHeaders = e.responseHeaders
7134
+ ? normalizeResponseHeaders(e.responseHeaders)
7135
+ : undefined;
7059
7136
  if (responseHeaders) {
7060
7137
  performanceClient?.addFields({
7061
7138
  httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] ||
7062
7139
  "",
7063
7140
  requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "",
7064
- contentTypeHeader: responseHeaders[HeaderNames.CONTENT_TYPE] ||
7065
- undefined,
7066
- contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] ||
7067
- undefined,
7141
+ contentTypeHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_TYPE) || undefined,
7142
+ contentLengthHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_LENGTH) || undefined,
7068
7143
  httpStatus: e.httpStatus,
7069
7144
  }, correlationId);
7070
7145
  }
@@ -7081,7 +7156,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
7081
7156
  return response;
7082
7157
  }
7083
7158
 
7084
- /*! @azure/msal-common v16.14.2 2026-10-13 */
7159
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
7085
7160
 
7086
7161
  /*
7087
7162
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7325,6 +7400,9 @@ class AuthorizationCodeClient {
7325
7400
  if (request.logoutHint) {
7326
7401
  addLogoutHint(parameters, request.logoutHint);
7327
7402
  }
7403
+ if (request.popupOriginCheckDone) {
7404
+ addPopupOriginCheckDone(parameters);
7405
+ }
7328
7406
  if (request.extraQueryParameters) {
7329
7407
  addExtraParameters(parameters, request.extraQueryParameters);
7330
7408
  }
@@ -7345,7 +7423,7 @@ class AuthorizationCodeClient {
7345
7423
  }
7346
7424
  }
7347
7425
 
7348
- /*! @azure/msal-common v16.14.2 2026-10-13 */
7426
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
7349
7427
 
7350
7428
  /*
7351
7429
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7480,6 +7558,9 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
7480
7558
  !Object.keys(request.extraQueryParameters).includes(INSTANCE_AWARE))) {
7481
7559
  addInstanceAware(parameters);
7482
7560
  }
7561
+ if (request.popupOriginCheckDone) {
7562
+ addPopupOriginCheckDone(parameters);
7563
+ }
7483
7564
  return parameters;
7484
7565
  }
7485
7566
  /**
@@ -7572,7 +7653,7 @@ function extractLoginHint(account) {
7572
7653
  return account.loginHint || account.idTokenClaims?.login_hint || null;
7573
7654
  }
7574
7655
 
7575
- /*! @azure/msal-common v16.14.2 2026-10-13 */
7656
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
7576
7657
 
7577
7658
  /*
7578
7659
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8121,7 +8202,7 @@ class PerformanceClient {
8121
8202
  }
8122
8203
  }
8123
8204
 
8124
- /*! @azure/msal-common v16.14.2 2026-10-13 */
8205
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8125
8206
 
8126
8207
  /*
8127
8208
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8356,7 +8437,7 @@ class RefreshTokenClient {
8356
8437
  }
8357
8438
  }
8358
8439
 
8359
- /*! @azure/msal-common v16.14.2 2026-10-13 */
8440
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8360
8441
 
8361
8442
  /*
8362
8443
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8649,7 +8730,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
8649
8730
  clearNativeBrokerErrorCode() { }
8650
8731
  }
8651
8732
 
8652
- /*! @azure/msal-common v16.14.2 2026-10-13 */
8733
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8653
8734
 
8654
8735
  /*
8655
8736
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8776,7 +8857,7 @@ class SilentFlowClient {
8776
8857
  }
8777
8858
  }
8778
8859
 
8779
- /*! @azure/msal-common v16.14.2 2026-10-13 */
8860
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8780
8861
 
8781
8862
  /*
8782
8863
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8792,7 +8873,7 @@ const StubbedNetworkModule = {
8792
8873
  },
8793
8874
  };
8794
8875
 
8795
- /*! @azure/msal-common v16.14.2 2026-10-13 */
8876
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8796
8877
 
8797
8878
  /*
8798
8879
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9870,9 +9951,14 @@ function parseAuthResponseFromUrl() {
9870
9951
  };
9871
9952
  }
9872
9953
  /**
9873
- * Clears hash from window url.
9954
+ * Clears a recognized authentication response fragment, preserving the query string.
9955
+ * Assigns an empty hash, then removes the trailing # when history updates are available.
9874
9956
  */
9875
9957
  function clearHash(contentWindow) {
9958
+ const serverParams = getDeserializedResponse(contentWindow.location.hash);
9959
+ if (!serverParams) {
9960
+ return;
9961
+ }
9876
9962
  // Office.js sets history.replaceState to null
9877
9963
  contentWindow.location.hash = "";
9878
9964
  if (typeof contentWindow.history.replaceState === "function") {
@@ -11495,7 +11581,7 @@ const EventType = {
11495
11581
 
11496
11582
  /* eslint-disable header/header */
11497
11583
  const name = "@azure/msal-browser";
11498
- const version = "5.25.1";
11584
+ const version = "5.27.0";
11499
11585
 
11500
11586
  /*
11501
11587
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -13003,6 +13089,116 @@ function getActiveAccount(browserStorage, correlationId) {
13003
13089
  return browserStorage.getActiveAccount(correlationId);
13004
13090
  }
13005
13091
 
13092
+ /*
13093
+ * Copyright (c) Microsoft Corporation. All rights reserved.
13094
+ * Licensed under the MIT License.
13095
+ */
13096
+ const POPUP_POLL_INTERVAL_MS = 30;
13097
+ let activePopupPoller;
13098
+ /**
13099
+ * Cancels legacy popup polling when an interaction is superseded.
13100
+ *
13101
+ * @internal
13102
+ * @param logger Logger for the interaction.
13103
+ */
13104
+ function cancelPendingPopupPollingResponse(logger) {
13105
+ if (activePopupPoller) {
13106
+ logger.verbose("0g9n3p", activePopupPoller.correlationId);
13107
+ activePopupPoller.cancel();
13108
+ }
13109
+ }
13110
+ /**
13111
+ * Monitors a popup window for a URL change to the same origin as the parent application.
13112
+ * Polls the popup at a specified interval until it is redirected back to the application,
13113
+ * closed by the user, or a navigation to a same-origin URL is detected. Once a same-origin
13114
+ * URL is detected, extracts the response string (query or hash) and resolves the promise.
13115
+ *
13116
+ * @param popupWindow - The popup window to monitor for navigation.
13117
+ * @param popupWindowParent - The parent window that opened the popup.
13118
+ * @param responseMode - Response mode (`"query"` | `"fragment"`) determines whether
13119
+ * to read `location.search` or `location.hash` from the popup once on the same
13120
+ * origin. Any value other than `"query"` is treated as fragment.
13121
+ * @param logger - Logger instance.
13122
+ * @param unloadWindow - Event handler to remove from the parent window on cleanup.
13123
+ * @param correlationId
13124
+ */
13125
+ async function monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadWindow, correlationId) {
13126
+ let poller;
13127
+ return new Promise((resolve, reject) => {
13128
+ logger.verbose("0cp91u", correlationId);
13129
+ const intervalId = window.setInterval(() => {
13130
+ if (popupWindow.closed) {
13131
+ logger.error("0n69wb", correlationId);
13132
+ window.clearInterval(intervalId);
13133
+ reject(new BrowserAuthError(userCancelled, correlationId));
13134
+ return;
13135
+ }
13136
+ let href = "";
13137
+ try {
13138
+ /*
13139
+ * Will throw if cross origin,
13140
+ * which should be caught and ignored
13141
+ * since we need the interval to keep running while on STS UI.
13142
+ */
13143
+ href = popupWindow.location.href;
13144
+ }
13145
+ catch (e) { }
13146
+ // Don't process blank pages or cross domain
13147
+ if (!href || href === "about:blank") {
13148
+ return;
13149
+ }
13150
+ window.clearInterval(intervalId);
13151
+ let responseString;
13152
+ if (responseMode === ResponseMode$1.QUERY) {
13153
+ responseString = popupWindow.location.search;
13154
+ }
13155
+ else {
13156
+ responseString = popupWindow.location.hash;
13157
+ }
13158
+ logger.verbose("0po9er", correlationId);
13159
+ resolve(responseString);
13160
+ }, POPUP_POLL_INTERVAL_MS);
13161
+ poller = {
13162
+ correlationId,
13163
+ cancel: () => {
13164
+ window.clearInterval(intervalId);
13165
+ if (activePopupPoller === poller) {
13166
+ activePopupPoller = undefined;
13167
+ }
13168
+ reject(new BrowserAuthError(interactionInProgressCancelled, correlationId));
13169
+ },
13170
+ };
13171
+ activePopupPoller = poller;
13172
+ }).finally(() => {
13173
+ if (poller && activePopupPoller === poller) {
13174
+ activePopupPoller = undefined;
13175
+ }
13176
+ cleanPopup(popupWindow, popupWindowParent, unloadWindow);
13177
+ });
13178
+ }
13179
+ /**
13180
+ * Performs cleanup operations after popup authentication.
13181
+ * Strips auth-response params (code/state) from the popup URL while it is still
13182
+ * open, closes the popup window, and removes the 'beforeunload' event listener
13183
+ * from the parent window.
13184
+ *
13185
+ * @param popupWindow - The popup window to be closed.
13186
+ * @param popupWindowParent - The parent window from which the event listener will be removed.
13187
+ * @param unloadWindow - The event handler function to remove.
13188
+ */
13189
+ function cleanPopup(popupWindow, popupWindowParent, unloadWindow) {
13190
+ if (!popupWindow.closed) {
13191
+ try {
13192
+ clearAuthResponseFromUrl(popupWindow);
13193
+ }
13194
+ catch {
13195
+ // Popup may have become cross-origin or otherwise inaccessible; ignore.
13196
+ }
13197
+ }
13198
+ popupWindow.close();
13199
+ popupWindowParent.removeEventListener("beforeunload", unloadWindow);
13200
+ }
13201
+
13006
13202
  /*
13007
13203
  * Copyright (c) Microsoft Corporation. All rights reserved.
13008
13204
  * Licensed under the MIT License.
@@ -13382,6 +13578,90 @@ function validateRequestMethod(interactionRequest, protocolMode) {
13382
13578
  return httpMethod;
13383
13579
  }
13384
13580
 
13581
+ /*
13582
+ * Copyright (c) Microsoft Corporation. All rights reserved.
13583
+ * Licensed under the MIT License.
13584
+ */
13585
+ /**
13586
+ * `window.origin` of a document with an opaque origin, e.g. one sandboxed
13587
+ * without `allow-same-origin`. Read from `window.origin`, not
13588
+ * `location.origin`, which reports the real host even when sandboxed.
13589
+ */
13590
+ const OPAQUE_ORIGIN = "null";
13591
+ /**
13592
+ * Returns `true` when every ancestor browsing context is same-origin with
13593
+ * `win`. A top-level document has no ancestors, so it always passes.
13594
+ */
13595
+ function allAncestorsSameOrigin(win) {
13596
+ try {
13597
+ // Sandboxed: no origin to compare ancestors against.
13598
+ if (win.origin === OPAQUE_ORIGIN) {
13599
+ return false;
13600
+ }
13601
+ let current = win;
13602
+ // `window.parent` is self-referential at the top level, never falsy.
13603
+ while (current !== current.parent) {
13604
+ current = current.parent;
13605
+ // Throws SecurityError if this ancestor is cross-origin.
13606
+ void current.location.href;
13607
+ }
13608
+ return true;
13609
+ }
13610
+ catch {
13611
+ return false;
13612
+ }
13613
+ }
13614
+ /**
13615
+ * Returns `true` when the top-level window has no opener, or one that is
13616
+ * same-origin with it.
13617
+ *
13618
+ * Reads the opener from `win.top`, not `win`: a framed document always reports
13619
+ * `window.opener === null` and would pass while the top window's untrusted
13620
+ * opener still holds a handle on it.
13621
+ */
13622
+ function topOpenerIsSameOriginOrAbsent(win) {
13623
+ try {
13624
+ const top = win.top;
13625
+ if (!top) {
13626
+ // Detached from its browsing context; treat as unsafe.
13627
+ return false;
13628
+ }
13629
+ const opener = top.opener;
13630
+ if (!opener || opener === top) {
13631
+ return true;
13632
+ }
13633
+ // Throws SecurityError if the opener is cross-origin.
13634
+ void opener.location.href;
13635
+ return true;
13636
+ }
13637
+ catch {
13638
+ return false;
13639
+ }
13640
+ }
13641
+ /**
13642
+ * Computes the `pocd` ("popup origin check done") authorize parameter value.
13643
+ *
13644
+ * `1` means no untrusted window can reach the popup, which is what lets Entra
13645
+ * omit the `Cross-Origin-Opener-Policy` response header for the request.
13646
+ *
13647
+ * @param config Resolved browser configuration.
13648
+ * @param win Window whose hosting environment is being checked. Defaults to the app window.
13649
+ * @returns `1` when the check passes, otherwise `0`.
13650
+ */
13651
+ function computePocd(config, win = typeof window !== "undefined" ? window : undefined) {
13652
+ /*
13653
+ * Only an explicit false opts out; anything else computes the check, so an
13654
+ * unresolved config fails closed rather than asserting pocd=1.
13655
+ */
13656
+ if (config.auth.originCheck === false) {
13657
+ return 1;
13658
+ }
13659
+ if (!win || !allAncestorsSameOrigin(win)) {
13660
+ return 0;
13661
+ }
13662
+ return topOpenerIsSameOriginOrAbsent(win) ? 1 : 0;
13663
+ }
13664
+
13385
13665
  /*
13386
13666
  * Copyright (c) Microsoft Corporation. All rights reserved.
13387
13667
  * Licensed under the MIT License.
@@ -13399,6 +13679,11 @@ class StandardInteractionClient extends BaseInteractionClient {
13399
13679
  const validLogoutRequest = {
13400
13680
  correlationId: this.correlationId,
13401
13681
  ...logoutRequest,
13682
+ /*
13683
+ * Computed here rather than per flow so every end-session request
13684
+ * carries it, matching the authorize path.
13685
+ */
13686
+ popupOriginCheckDone: computePocd(this.config) === 1,
13402
13687
  };
13403
13688
  /**
13404
13689
  * Set logout_hint to be login_hint from ID Token Claims if present
@@ -13587,6 +13872,53 @@ async function initializeAuthorizationRequest(request, interactionType, config,
13587
13872
  return validatedRequest;
13588
13873
  }
13589
13874
 
13875
+ /*
13876
+ * Copyright (c) Microsoft Corporation. All rights reserved.
13877
+ * Licensed under the MIT License.
13878
+ */
13879
+ /**
13880
+ * Returns true when the supplied user agent is using Safari
13881
+ *
13882
+ * @internal
13883
+ */
13884
+ function isSafari(userAgent = typeof navigator !== "undefined"
13885
+ ? navigator.userAgent
13886
+ : "") {
13887
+ if (/OPR\/|OPiOS|PhantomJS|SamsungBrowser|Edge|EdgiOS|EdgA/.test(userAgent)) {
13888
+ return false;
13889
+ }
13890
+ const browserNavigator = typeof navigator !== "undefined"
13891
+ ? navigator
13892
+ : undefined;
13893
+ if (/Edg/.test(userAgent) ||
13894
+ browserNavigator?.userAgentData?.brands?.some((brand) => brand?.brand === "Microsoft Edge")) {
13895
+ return false;
13896
+ }
13897
+ if (/Electron|CriOS|Chrome|Trident|FxiOS|Firefox/.test(userAgent)) {
13898
+ return false;
13899
+ }
13900
+ return /Safari/.test(userAgent) || /AppleWebKit/.test(userAgent);
13901
+ }
13902
+ /**
13903
+ * Returns true when EAR should be used for the current request.
13904
+ *
13905
+ * Safari cannot complete EAR's cross-origin form POST, so requests configured
13906
+ * for EAR transparently use authorization code flow instead.
13907
+ *
13908
+ * @internal
13909
+ */
13910
+ function shouldUseEar(protocolMode, logger, performanceClient, correlationId, userAgent) {
13911
+ if (protocolMode !== ProtocolMode.EAR) {
13912
+ return false;
13913
+ }
13914
+ if (!isSafari(userAgent)) {
13915
+ return true;
13916
+ }
13917
+ logger.verbose("0wirye", correlationId);
13918
+ performanceClient.addFields({ "ext.earFallbackReason": "safari" }, correlationId);
13919
+ return false;
13920
+ }
13921
+
13590
13922
  /*
13591
13923
  * Copyright (c) Microsoft Corporation. All rights reserved.
13592
13924
  * Licensed under the MIT License.
@@ -14829,7 +15161,16 @@ function instrumentClientData(response, correlationId, performanceClient) {
14829
15161
  * @returns
14830
15162
  */
14831
15163
  async function getStandardParameters(config, authority, request, logger, performanceClient) {
14832
- const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority }, request, logger, performanceClient);
15164
+ const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority }, {
15165
+ ...request,
15166
+ /*
15167
+ * Computed here rather than per flow so every authorize request
15168
+ * carries it — GET, POST and EAR, interactive and silent alike.
15169
+ * A request may assert it instead when the topology, rather than
15170
+ * the current window, is what makes the popup unreachable.
15171
+ */
15172
+ popupOriginCheckDone: request.popupOriginCheckDone ?? computePocd(config) === 1,
15173
+ }, logger, performanceClient);
14833
15174
  addLibraryInfo(parameters, {
14834
15175
  sku: BrowserConstants.MSAL_SKU,
14835
15176
  version: version,
@@ -14883,6 +15224,15 @@ async function getAuthCodeRequestUrl(config, authority, request, logger, perform
14883
15224
  });
14884
15225
  return getAuthorizeUrl(authority, parameters);
14885
15226
  }
15227
+ function getAuthorizeFormAction(authority, request, parameters) {
15228
+ const queryParams = new Map();
15229
+ addExtraParameters(queryParams, request.extraQueryParameters || {});
15230
+ if (parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
15231
+ queryParams.delete(POPUP_ORIGIN_CHECK_DONE);
15232
+ }
15233
+ addCorrelationId(queryParams, request.correlationId);
15234
+ return getAuthorizeUrl(authority, queryParams);
15235
+ }
14886
15236
  /**
14887
15237
  * Builds the action URL + POST-body fields for the EAR /authorize form.
14888
15238
  */
@@ -14898,11 +15248,7 @@ async function getEARFormData(config, authority, request, logger, performanceCli
14898
15248
  addExtraParameters(parameters, {
14899
15249
  ...request.extraParameters,
14900
15250
  });
14901
- const queryParams = new Map();
14902
- addExtraParameters(queryParams, request.extraQueryParameters || {});
14903
- // Add correlationId to query params so gateway can propagate it to IDPs
14904
- addCorrelationId(queryParams, request.correlationId);
14905
- const action = getAuthorizeUrl(authority, queryParams);
15251
+ const action = getAuthorizeFormAction(authority, request, parameters);
14906
15252
  return { action, fields: Object.fromEntries(parameters) };
14907
15253
  }
14908
15254
  /**
@@ -14923,12 +15269,7 @@ async function getCodeFormData(config, authority, request, logger, performanceCl
14923
15269
  addExtraParameters(parameters, {
14924
15270
  ...request.extraParameters,
14925
15271
  });
14926
- // Add extraQueryParameters to be appended to request URL
14927
- const queryParams = new Map();
14928
- addExtraParameters(queryParams, request.extraQueryParameters || {});
14929
- // Add correlationId to query params so gateway can propagate it to IDPs
14930
- addCorrelationId(queryParams, request.correlationId);
14931
- const action = getAuthorizeUrl(authority, queryParams);
15272
+ const action = getAuthorizeFormAction(authority, request, parameters);
14932
15273
  return { action, fields: Object.fromEntries(parameters) };
14933
15274
  }
14934
15275
  /**
@@ -15315,7 +15656,7 @@ function getHeaderDict(headers) {
15315
15656
  */
15316
15657
  // Default timeout for popup windows and iframes in milliseconds
15317
15658
  const DEFAULT_POPUP_TIMEOUT_MS = 60000;
15318
- const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
15659
+ const DEFAULT_IFRAME_TIMEOUT_MS$1 = 10000;
15319
15660
  const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
15320
15661
  const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
15321
15662
  /**
@@ -15356,6 +15697,8 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
15356
15697
  instanceAware: false,
15357
15698
  isMcp: false,
15358
15699
  verifySSO: false,
15700
+ // Legacy polling needs COOP omitted, so it implies asserting pocd=1.
15701
+ originCheck: !userInputSystem?.enableLegacyPolling,
15359
15702
  };
15360
15703
  // Default cache options for browser
15361
15704
  const DEFAULT_CACHE_OPTIONS = {
@@ -15380,7 +15723,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
15380
15723
  : StubbedNetworkModule,
15381
15724
  navigationClient: new NavigationClient(),
15382
15725
  popupBridgeTimeout: userInputSystem?.popupBridgeTimeout || DEFAULT_POPUP_TIMEOUT_MS,
15383
- iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS,
15726
+ iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS$1,
15384
15727
  redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,
15385
15728
  allowRedirectInIframe: false,
15386
15729
  navigatePopups: true,
@@ -15389,6 +15732,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
15389
15732
  DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
15390
15733
  protocolMode: ProtocolMode.AAD,
15391
15734
  serverTelemetryEnabled: false,
15735
+ enableLegacyPolling: false,
15392
15736
  };
15393
15737
  const providedSystemOptions = {
15394
15738
  ...DEFAULT_BROWSER_SYSTEM_OPTIONS,
@@ -15406,11 +15750,17 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
15406
15750
  iframeTimeoutTelemetry: false,
15407
15751
  allowPlatformBrokerWithDOM: false,
15408
15752
  };
15753
+ let logger;
15754
+ const getLogger = () => {
15755
+ if (!logger) {
15756
+ logger = new Logger(providedSystemOptions.loggerOptions, name, version);
15757
+ }
15758
+ return logger;
15759
+ };
15409
15760
  // Throw an error if user has set OIDCOptions without being in OIDC protocol mode
15410
15761
  if (userInputSystem?.protocolMode !== ProtocolMode.OIDC &&
15411
15762
  userInputAuth?.OIDCOptions) {
15412
- const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
15413
- logger.warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
15763
+ getLogger().warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
15414
15764
  }
15415
15765
  // Throw an error if user has set allowPlatformBroker to true with OIDC protocol mode
15416
15766
  if (userInputSystem?.protocolMode &&
@@ -15418,6 +15768,24 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
15418
15768
  providedSystemOptions?.allowPlatformBroker) {
15419
15769
  throw createClientConfigurationError(cannotAllowPlatformBroker, "");
15420
15770
  }
15771
+ /*
15772
+ * The origin check computes 0 in the embedded contexts legacy polling
15773
+ * serves, so re-enabling it there breaks the flow. Honor it, but warn.
15774
+ */
15775
+ if (userInputSystem?.enableLegacyPolling &&
15776
+ userInputAuth?.originCheck === true) {
15777
+ getLogger().warning("buildConfiguration: system.enableLegacyPolling is true and auth.originCheck is explicitly true. Legacy polling requires pocd=1, which the origin check will not produce in an embedded context. Unset auth.originCheck to let legacy polling assert it.", "");
15778
+ }
15779
+ /*
15780
+ * Opting out is a deliberate risk transfer, not an error — but the app
15781
+ * cannot know at config time that the risky topology is actually present.
15782
+ */
15783
+ if ((userInputAuth?.originCheck ?? DEFAULT_AUTH_OPTIONS.originCheck) ===
15784
+ false &&
15785
+ typeof window !== "undefined" &&
15786
+ !topOpenerIsSameOriginOrAbsent(window)) {
15787
+ getLogger().warning("buildConfiguration: auth.originCheck is disabled and the top-level window has a cross-origin opener. MSAL will assert pocd=1, so the STS omits Cross-Origin-Opener-Policy and that opener can reach the auth popup. The application is responsible for this risk.", "");
15788
+ }
15421
15789
  const overlayedConfig = {
15422
15790
  auth: {
15423
15791
  ...DEFAULT_AUTH_OPTIONS,
@@ -16243,6 +16611,9 @@ class PopupClient extends StandardInteractionClient {
16243
16611
  popupWindowAttributes: logoutRequest?.popupWindowAttributes || {},
16244
16612
  popupWindowParent: logoutRequest?.popupWindowParent ?? window,
16245
16613
  };
16614
+ validLogoutRequest.popupOriginCheckDone =
16615
+ this.getPopupOriginCheckDone(popupParams.popupWindowParent) ??
16616
+ validLogoutRequest.popupOriginCheckDone;
16246
16617
  const authority = logoutRequest && logoutRequest.authority;
16247
16618
  const mainWindowRedirectUri = logoutRequest && logoutRequest.mainWindowRedirectUri;
16248
16619
  // navigatePopups flag set to false. Acquires token without first opening popup. Popup will be opened later asynchronously.
@@ -16283,7 +16654,7 @@ class PopupClient extends StandardInteractionClient {
16283
16654
  }
16284
16655
  const isPlatformBroker = isPlatformAuthAllowed(this.config, this.logger, this.correlationId, this.platformAuthProvider, request.authenticationScheme);
16285
16656
  validRequest.platformBroker = isPlatformBroker;
16286
- if (this.config.system.protocolMode === ProtocolMode.EAR) {
16657
+ if (shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)) {
16287
16658
  return this.executeEarFlow(validRequest, popupParams, pkceCodes);
16288
16659
  }
16289
16660
  else {
@@ -16307,6 +16678,7 @@ class PopupClient extends StandardInteractionClient {
16307
16678
  ...request,
16308
16679
  codeChallenge: pkce.challenge,
16309
16680
  ...tokenBindingParams,
16681
+ popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
16310
16682
  };
16311
16683
  try {
16312
16684
  // Initialize the client
@@ -16370,6 +16742,7 @@ class PopupClient extends StandardInteractionClient {
16370
16742
  earJwk: earJwk,
16371
16743
  codeChallenge: pkce.challenge,
16372
16744
  ...tokenBindingParams,
16745
+ popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
16373
16746
  };
16374
16747
  const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
16375
16748
  // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
@@ -16642,6 +17015,27 @@ class PopupClient extends StandardInteractionClient {
16642
17015
  getRelayStateId(state, correlationId) {
16643
17016
  return parseRequestState(base64Decode, state, correlationId).libraryState.id;
16644
17017
  }
17018
+ /**
17019
+ * Asserts `pocd=1` for the relay flow. Direct popups also require the
17020
+ * environment of a delegated opening window to pass the origin check.
17021
+ *
17022
+ * With a relay the IdP window is a grandchild popup, which an untrusted
17023
+ * ancestor cannot reach by name — so the topology satisfies the check by
17024
+ * construction. The current window is framed and would otherwise compute
17025
+ * `0`. Without a delegated parent, the standard app check remains unchanged.
17026
+ *
17027
+ * @param popupWindowParent Window that opens the popup.
17028
+ */
17029
+ getPopupOriginCheckDone(popupWindowParent) {
17030
+ if (this.config.auth.popupRelayUri) {
17031
+ return true;
17032
+ }
17033
+ if (popupWindowParent !== window) {
17034
+ return (computePocd(this.config) === 1 &&
17035
+ computePocd(this.config, popupWindowParent) === 1);
17036
+ }
17037
+ return undefined;
17038
+ }
16645
17039
  /**
16646
17040
  * Opens the interactive popup for a POST-form /authorize request. Shared by
16647
17041
  * the auth-code POST and EAR flows, which are identical apart from the form
@@ -16737,7 +17131,7 @@ class RedirectClient extends StandardInteractionClient {
16737
17131
  // Clear temporary cache if the back button is clicked during the redirect flow.
16738
17132
  window.addEventListener("pageshow", handleBackButton);
16739
17133
  try {
16740
- const redirectOperation = this.config.system.protocolMode === ProtocolMode.EAR
17134
+ const redirectOperation = shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)
16741
17135
  ? this.executeEarFlow(validRequest)
16742
17136
  : this.executeCodeFlow(validRequest);
16743
17137
  await Promise.race([redirectOperation, backButtonCancellation]);
@@ -16964,7 +17358,6 @@ class RedirectClient extends StandardInteractionClient {
16964
17358
  }
16965
17359
  return [null, ""];
16966
17360
  }
16967
- clearHash(window);
16968
17361
  this.logger.verbose("00uvho", this.correlationId);
16969
17362
  return [response, responseString];
16970
17363
  }
@@ -17239,7 +17632,7 @@ class SilentIframeClient extends StandardInteractionClient {
17239
17632
  const silentRequest = await invokeAsync(initializeAuthorizationRequest, StandardInteractionClientInitializeAuthorizationRequest, this.logger, this.performanceClient, this.correlationId)(inputRequest, exports.InteractionType.Silent, this.config, this.browserCrypto, this.browserStorage, this.logger, this.performanceClient, this.correlationId);
17240
17633
  silentRequest.platformBroker = isPlatformAuthAllowed(this.config, this.logger, this.correlationId, this.platformAuthProvider, silentRequest.authenticationScheme);
17241
17634
  preconnect(silentRequest.authority);
17242
- if (this.config.system.protocolMode === ProtocolMode.EAR) {
17635
+ if (shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)) {
17243
17636
  return this.executeEarFlow(silentRequest);
17244
17637
  }
17245
17638
  else {
@@ -17635,14 +18028,20 @@ function resolveSilentRequestPreparation(input, platformAuthProvider, logger, pe
17635
18028
  return prepareRequest(input);
17636
18029
  }
17637
18030
  /**
17638
- * Preserves the standard web thumbprint and caller-owned request references.
18031
+ * Extends the web thumbprint with silent-flow options while preserving caller-owned references.
17639
18032
  */
17640
18033
  function prepareWebSilentRequest({ request, account, correlationId, config, }) {
17641
18034
  const thumbprint = getRequestThumbprint(config.auth.clientId, {
17642
18035
  ...request,
17643
18036
  authority: request.authority || config.auth.authority}, account.homeAccountId);
17644
18037
  return {
17645
- key: JSON.stringify(thumbprint),
18038
+ key: JSON.stringify({
18039
+ ...thumbprint,
18040
+ forceRefresh: !!request.forceRefresh,
18041
+ cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
18042
+ extraParameters: canonicalizeStringDict(request.extraParameters),
18043
+ extraQueryParameters: canonicalizeStringDict(request.extraQueryParameters),
18044
+ }),
17646
18045
  request,
17647
18046
  account,
17648
18047
  };
@@ -17929,7 +18328,32 @@ class StandardController {
17929
18328
  * @returns
17930
18329
  */
17931
18330
  async handleRedirectPromiseInternal(options) {
17932
- if (!this.browserStorage.isInteractionInProgress(true)) {
18331
+ // Preserve the response for RedirectClient before removing it from the URL.
18332
+ const responseString = options?.hash ||
18333
+ (this.config.auth.OIDCOptions.responseMode ===
18334
+ ResponseMode$1.QUERY
18335
+ ? window.location.search
18336
+ : window.location.hash);
18337
+ const anyClientInteractionInProgress = this.browserStorage.isInteractionInProgress(false);
18338
+ const currentClientInteraction = this.browserStorage.isInteractionInProgress(true);
18339
+ const isBridgeCallback = isInPopup() ||
18340
+ (isInIframe() &&
18341
+ !this.config.system.allowRedirectInIframe);
18342
+ /*
18343
+ * Clear recognized response fragments for:
18344
+ * - Stale callbacks with no pending interaction.
18345
+ * - This client's login callback, even if request setup or response validation fails.
18346
+ * - This client's logout callback containing state, before the SIGNOUT early return.
18347
+ * Leave another client's callback untouched. clearHash preserves query strings
18348
+ * and application routes, and does nothing when no response fragment is present.
18349
+ * Skip popup and non-redirect iframe callbacks: legacy apps may call HRP
18350
+ * before their redirect bridge reads and broadcasts the response.
18351
+ */
18352
+ if (!isBridgeCallback &&
18353
+ (!anyClientInteractionInProgress || currentClientInteraction)) {
18354
+ clearHash(window);
18355
+ }
18356
+ if (!currentClientInteraction) {
17933
18357
  this.logger.info("0le6uv", "");
17934
18358
  return null;
17935
18359
  }
@@ -17937,7 +18361,7 @@ class StandardController {
17937
18361
  if (interactionType === INTERACTION_TYPE.SIGNOUT) {
17938
18362
  this.logger.verbose("1ywcv2", "");
17939
18363
  this.browserStorage.setInteractionInProgress(false);
17940
- return Promise.resolve(null);
18364
+ return null;
17941
18365
  }
17942
18366
  const loggedInAccounts = this.getAllAccounts();
17943
18367
  const platformBrokerRequest = this.browserStorage.getCachedNativeRequest();
@@ -17967,7 +18391,9 @@ class StandardController {
17967
18391
  rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
17968
18392
  this.logger.trace("0znzs5", correlationId);
17969
18393
  const redirectClient = this.createRedirectClient(correlationId);
17970
- redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options);
18394
+ redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options?.hash
18395
+ ? options
18396
+ : { ...options, hash: responseString });
17971
18397
  }
17972
18398
  }
17973
18399
  catch (e) {
@@ -18115,6 +18541,9 @@ class StandardController {
18115
18541
  this.logger.verbose("0ch87b", correlationId);
18116
18542
  preflightCheck(this.initialized, atPopupMeasurement, this.config, request);
18117
18543
  this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN, request.overrideInteractionInProgress, correlationId);
18544
+ if (request.overrideInteractionInProgress) {
18545
+ cancelPendingPopupPollingResponse(this.logger);
18546
+ }
18118
18547
  }
18119
18548
  catch (e) {
18120
18549
  // Since this function is syncronous we need to reject
@@ -19823,7 +20252,10 @@ class NestedAppAuthController {
19823
20252
  const correlationId = validRequest.correlationId || createNewGuid();
19824
20253
  this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Popup, validRequest);
19825
20254
  const atPopupMeasurement = this.performanceClient.startMeasurement(AcquireTokenPopup, correlationId);
19826
- atPopupMeasurement.add({ nestedAppAuthRequest: true });
20255
+ atPopupMeasurement.add({
20256
+ nestedAppAuthRequest: true,
20257
+ bridgeType: "NAA",
20258
+ });
19827
20259
  try {
19828
20260
  enforceResourceParameter(this.config.auth.isMcp, validRequest);
19829
20261
  const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(validRequest);
@@ -19890,6 +20322,7 @@ class NestedAppAuthController {
19890
20322
  });
19891
20323
  ssoSilentMeasurement.add({
19892
20324
  nestedAppAuthRequest: true,
20325
+ bridgeType: "NAA",
19893
20326
  });
19894
20327
  try {
19895
20328
  enforceResourceParameter(this.config.auth.isMcp, validRequest);
@@ -19944,6 +20377,7 @@ class NestedAppAuthController {
19944
20377
  const atsMeasurement = this.performanceClient.startMeasurement(AcquireTokenSilent, correlationId);
19945
20378
  atsMeasurement?.add({
19946
20379
  nestedAppAuthRequest: true,
20380
+ bridgeType: "NAA",
19947
20381
  });
19948
20382
  // if the request has claims, we cannot look up in the cache
19949
20383
  if (request.claims) {
@@ -20485,6 +20919,79 @@ NestedAppOperatingContext.MODULE_NAME = "";
20485
20919
  */
20486
20920
  NestedAppOperatingContext.ID = "NestedAppOperatingContext";
20487
20921
 
20922
+ /*
20923
+ * Copyright (c) Microsoft Corporation. All rights reserved.
20924
+ * Licensed under the MIT License.
20925
+ */
20926
+ const IFRAME_POLL_INTERVAL_MS = 50;
20927
+ const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
20928
+ /**
20929
+ * Monitors an iframe content window until it loads a URL with a known hash, or hits a specified timeout.
20930
+ *
20931
+ * @param iframe - The hidden iframe to monitor.
20932
+ * @param timeout - Maximum time (ms) to wait for navigation before rejecting with
20933
+ * `monitor_window_timeout`.
20934
+ * @param logger - Logger instance.
20935
+ * @param correlationId
20936
+ * @param responseMode - `"query"` or `"fragment"` — determines whether to read
20937
+ * `location.search` or `location.hash`. Any value other than `"query"` is
20938
+ * treated as fragment.
20939
+ */
20940
+ async function monitorIframeForHash(iframe, timeout, logger, correlationId, responseMode) {
20941
+ return new Promise((resolve, reject) => {
20942
+ if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {
20943
+ logger.warning(`137tec ${timeout} ${DEFAULT_IFRAME_TIMEOUT_MS}`, correlationId);
20944
+ }
20945
+ /*
20946
+ * Polling for iframes can be purely timing based,
20947
+ * since we don't need to account for interaction.
20948
+ */
20949
+ const timeoutId = window.setTimeout(() => {
20950
+ window.clearInterval(intervalId);
20951
+ reject(new AuthError(timedOut, correlationId, undefined, "monitor_window_timeout"));
20952
+ }, timeout);
20953
+ const intervalId = window.setInterval(() => {
20954
+ const contentWindow = iframe.contentWindow;
20955
+ if (!contentWindow) {
20956
+ return;
20957
+ }
20958
+ let href = "";
20959
+ try {
20960
+ /*
20961
+ * Will throw if cross origin,
20962
+ * which should be caught and ignored
20963
+ * since we need the interval to keep running while on STS UI.
20964
+ */
20965
+ href = contentWindow.location.href;
20966
+ }
20967
+ catch (e) { }
20968
+ if (!href || href === "about:blank") {
20969
+ return;
20970
+ }
20971
+ const responseString = responseMode === ResponseMode$1.QUERY
20972
+ ? contentWindow.location.search
20973
+ : contentWindow.location.hash;
20974
+ window.clearTimeout(timeoutId);
20975
+ window.clearInterval(intervalId);
20976
+ resolve(responseString);
20977
+ }, IFRAME_POLL_INTERVAL_MS);
20978
+ }).finally(() => {
20979
+ /*
20980
+ * Strip auth-response params from the iframe URL. The monitor owns the
20981
+ * iframe for the duration of the poll, mirroring cleanPopup in
20982
+ * PopupMonitor.
20983
+ */
20984
+ try {
20985
+ if (iframe.contentWindow) {
20986
+ clearAuthResponseFromUrl(iframe.contentWindow);
20987
+ }
20988
+ }
20989
+ catch {
20990
+ // Iframe may already be navigated away or cross-origin; ignore.
20991
+ }
20992
+ });
20993
+ }
20994
+
20488
20995
  /*
20489
20996
  * Copyright (c) Microsoft Corporation. All rights reserved.
20490
20997
  * Licensed under the MIT License.
@@ -20527,27 +21034,29 @@ class PublicClientApplication {
20527
21034
  /**
20528
21035
  * Waits for the auth response from a popup window opened by MSAL.
20529
21036
  *
20530
- * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge.
20531
- * Subclasses must return the raw response string (hash/query/fragment), or reject
20532
- * with an `AuthError` on failure.
21037
+ * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
21038
+ * or to the v4-style same-origin location poller when
21039
+ * `system.enableLegacyPolling` is set. Subclasses must return the raw response
21040
+ * string (hash/query/fragment), or reject with an `AuthError` on failure.
20533
21041
  *
20534
21042
  * @internal
20535
21043
  * @param request The in-flight authorization or end-session request.
20536
21044
  * @param popupWindow The popup window opened by MSAL.
20537
21045
  * @param popupWindowParent The parent window that opened the popup.
20538
21046
  */
20539
- async waitForPopupResponse(request,
20540
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
20541
- popupWindow,
20542
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
20543
- popupWindowParent) {
21047
+ async waitForPopupResponse(request, popupWindow, popupWindowParent) {
20544
21048
  const controller = this.controller;
20545
- return waitForBridgeResponse(controller.getConfiguration().system.popupBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient());
21049
+ const config = controller.getConfiguration();
21050
+ if (config.system.enableLegacyPolling) {
21051
+ return waitForPopupPollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), request, popupWindow, popupWindowParent);
21052
+ }
21053
+ return waitForBridgeResponse(config.system.popupBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient());
20546
21054
  }
20547
21055
  /**
20548
21056
  * Waits for the auth response from a hidden iframe used by MSAL silent flows.
20549
21057
  *
20550
- * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge.
21058
+ * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
21059
+ * or to the v4-style location poller when `system.enableLegacyPolling` is set.
20551
21060
  * Subclasses must return the raw response string (hash/query/fragment), or reject
20552
21061
  * with an `AuthError` on failure.
20553
21062
  *
@@ -20555,11 +21064,12 @@ class PublicClientApplication {
20555
21064
  * @param iframe The hidden iframe MSAL attached to the document.
20556
21065
  * @param request The in-flight authorization request.
20557
21066
  */
20558
- async waitForIframeResponse(
20559
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
20560
- iframe, request) {
21067
+ async waitForIframeResponse(iframe, request) {
20561
21068
  const controller = this.controller;
20562
21069
  const config = controller.getConfiguration();
21070
+ if (config.system.enableLegacyPolling) {
21071
+ return waitForIframePollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), iframe, request);
21072
+ }
20563
21073
  return waitForBridgeResponse(config.system.iframeBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient(), config.experimental);
20564
21074
  }
20565
21075
  /**
@@ -20828,6 +21338,40 @@ async function createStandardPublicClientApplication(configuration) {
20828
21338
  const pca = new PublicClientApplication(configuration);
20829
21339
  await pca.initialize();
20830
21340
  return pca;
21341
+ }
21342
+ /**
21343
+ * Collects a popup auth response using the v4-style same-origin location
21344
+ * poller instead of the `BroadcastChannel` redirect bridge.
21345
+ */
21346
+ async function waitForPopupPollingResponse(config, logger, performanceClient, request, popupWindow, popupWindowParent) {
21347
+ const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
21348
+ ? ResponseMode$1.QUERY
21349
+ : ResponseMode$1.FRAGMENT;
21350
+ performanceClient.addFields({ usesLegacyPolling: true }, request.correlationId);
21351
+ const unloadHandler = () => {
21352
+ try {
21353
+ if (popupWindow && !popupWindow.closed) {
21354
+ popupWindow.close();
21355
+ }
21356
+ }
21357
+ catch {
21358
+ /* ignore */
21359
+ }
21360
+ };
21361
+ popupWindowParent.addEventListener("beforeunload", unloadHandler);
21362
+ return monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadHandler, request.correlationId);
21363
+ }
21364
+ /**
21365
+ * Collects a silent-iframe auth response using the v4-style location poller
21366
+ * instead of the `BroadcastChannel` redirect bridge.
21367
+ */
21368
+ async function waitForIframePollingResponse(config, logger, performanceClient, iframe, request) {
21369
+ const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
21370
+ ? ResponseMode$1.QUERY
21371
+ : ResponseMode$1.FRAGMENT;
21372
+ const iframePollTimeout = config.system.iframeBridgeTimeout;
21373
+ performanceClient.addFields({ usesLegacyPolling: true, iframePollTimeout }, request.correlationId);
21374
+ return monitorIframeForHash(iframe, iframePollTimeout, logger, request.correlationId, responseMode);
20831
21375
  }
20832
21376
 
20833
21377
  /*
@@ -21461,7 +22005,7 @@ exports.ClientAuthError = ClientAuthError;
21461
22005
  exports.ClientAuthErrorCodes = ClientAuthErrorCodes;
21462
22006
  exports.ClientConfigurationError = ClientConfigurationError;
21463
22007
  exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
21464
- exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS;
22008
+ exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS$1;
21465
22009
  exports.EventHandler = EventHandler;
21466
22010
  exports.EventMessageUtils = EventMessageUtils;
21467
22011
  exports.EventType = EventType;