@azure/msal-browser 5.26.0 → 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 (295) 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 +1 -1
  25. package/dist/controllers/StandardController.mjs +36 -5
  26. package/dist/controllers/StandardController.mjs.map +1 -1
  27. package/dist/crypto/BrowserCrypto.mjs +1 -1
  28. package/dist/crypto/CryptoOps.mjs +1 -1
  29. package/dist/crypto/PkceGenerator.mjs +1 -1
  30. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  31. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  32. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  33. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  34. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  35. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  36. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  37. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  38. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  39. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  51. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  52. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -1
  53. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -1
  54. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +1 -1
  55. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +1 -1
  56. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +1 -1
  57. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
  58. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +1 -1
  59. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +1 -1
  60. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -1
  61. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +1 -1
  62. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  63. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  64. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  65. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  66. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  67. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  68. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  69. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  70. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  71. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  72. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  73. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  74. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  75. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  76. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  77. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  78. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  79. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  80. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  81. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  82. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  83. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  84. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +1 -1
  85. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +1 -1
  86. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +1 -1
  87. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  88. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  89. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  90. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  91. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  92. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  93. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  94. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  95. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  96. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -1
  97. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
  98. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +1 -1
  99. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
  100. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
  101. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +1 -1
  102. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
  103. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
  104. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -1
  105. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  106. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  107. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +1 -1
  108. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  109. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  110. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  111. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  112. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  113. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  114. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  115. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  116. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  117. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  118. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  119. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  120. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  121. package/dist/custom_auth/index.mjs +1 -1
  122. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  123. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  124. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  125. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  126. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  127. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  128. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  129. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  130. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  131. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  132. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  133. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +1 -1
  134. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  135. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  136. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  137. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  138. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  139. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  140. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  141. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  142. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  143. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  144. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  145. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  146. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  147. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +1 -1
  148. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -1
  149. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +1 -1
  150. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  151. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  152. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  153. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  154. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  155. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  156. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  157. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  158. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  159. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  160. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  161. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  162. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  163. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  164. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -1
  165. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +1 -1
  166. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +1 -1
  167. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +1 -1
  168. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  169. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  170. package/dist/encode/Base64Decode.mjs +1 -1
  171. package/dist/encode/Base64Encode.mjs +1 -1
  172. package/dist/error/BrowserAuthError.mjs +1 -1
  173. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  174. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  175. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  176. package/dist/error/NativeAuthError.mjs +1 -1
  177. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  178. package/dist/error/NestedAppAuthError.mjs +1 -1
  179. package/dist/event/EventHandler.mjs +1 -1
  180. package/dist/event/EventMessage.mjs +1 -1
  181. package/dist/event/EventType.mjs +1 -1
  182. package/dist/index.mjs +1 -1
  183. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  184. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  185. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  186. package/dist/interaction_client/PopupClient.mjs +28 -1
  187. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  188. package/dist/interaction_client/RedirectClient.mjs +2 -3
  189. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  190. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  191. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  192. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  193. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  194. package/dist/interaction_client/StandardInteractionClient.mjs +7 -1
  195. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  196. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  197. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  198. package/dist/log-strings-mapping.json +23 -3
  199. package/dist/naa/BridgeError.mjs +1 -1
  200. package/dist/naa/BridgeProxy.mjs +1 -1
  201. package/dist/naa/BridgeStatusCode.mjs +1 -1
  202. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  203. package/dist/navigation/NavigationClient.mjs +1 -1
  204. package/dist/network/FetchClient.mjs +1 -1
  205. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  206. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  207. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  208. package/dist/packageMetadata.mjs +2 -2
  209. package/dist/popup_relay/constants.mjs +1 -1
  210. package/dist/popup_relay/index.mjs +1 -1
  211. package/dist/popup_relay/relayClient.mjs +1 -1
  212. package/dist/protocol/Authorize.mjs +23 -13
  213. package/dist/protocol/Authorize.mjs.map +1 -1
  214. package/dist/redirect_bridge/index.mjs +1 -1
  215. package/dist/request/RequestHelpers.mjs +1 -1
  216. package/dist/request/SilentRequestHelpers.mjs +1 -1
  217. package/dist/response/ResponseHandler.mjs +1 -1
  218. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  219. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  220. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  221. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  222. package/dist/utils/BrowserConstants.mjs +1 -1
  223. package/dist/utils/BrowserDetection.mjs +1 -1
  224. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  225. package/dist/utils/BrowserUtils.mjs +7 -2
  226. package/dist/utils/BrowserUtils.mjs.map +1 -1
  227. package/dist/utils/Helpers.mjs +1 -1
  228. package/dist/utils/IframeMonitor.mjs +81 -0
  229. package/dist/utils/IframeMonitor.mjs.map +1 -0
  230. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  231. package/dist/utils/PopupMonitor.mjs +119 -0
  232. package/dist/utils/PopupMonitor.mjs.map +1 -0
  233. package/dist/utils/PopupOriginCheck.mjs +88 -0
  234. package/dist/utils/PopupOriginCheck.mjs.map +1 -0
  235. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  236. package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
  237. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  238. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  239. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  240. package/dist/webBrokerBridge/index.mjs +1 -1
  241. package/lib/custom-auth-path/log-strings-mapping.json +23 -3
  242. package/lib/custom-auth-path/msal-custom-auth.cjs +617 -122
  243. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  244. package/lib/custom-auth-path/msal-custom-auth.js +617 -122
  245. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  246. package/lib/log-strings-mapping.json +23 -3
  247. package/lib/msal-browser.cjs +614 -128
  248. package/lib/msal-browser.cjs.map +1 -1
  249. package/lib/msal-browser.js +614 -128
  250. package/lib/msal-browser.js.map +1 -1
  251. package/lib/msal-browser.min.js +2 -2
  252. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  253. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  254. package/lib/popup-relay/msal-popup-relay.js +2 -2
  255. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  256. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  257. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  258. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  259. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  260. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  261. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  262. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
  263. package/package.json +2 -2
  264. package/src/app/PublicClientApplication.ts +108 -8
  265. package/src/config/Configuration.ts +63 -6
  266. package/src/controllers/StandardController.ts +46 -3
  267. package/src/interaction_client/PopupClient.ts +36 -0
  268. package/src/interaction_client/RedirectClient.ts +0 -1
  269. package/src/interaction_client/StandardInteractionClient.ts +6 -0
  270. package/src/packageMetadata.ts +1 -1
  271. package/src/protocol/Authorize.ts +34 -28
  272. package/src/utils/BrowserUtils.ts +8 -1
  273. package/src/utils/IframeMonitor.ts +98 -0
  274. package/src/utils/PopupMonitor.ts +158 -0
  275. package/src/utils/PopupOriginCheck.ts +94 -0
  276. package/types/app/PublicClientApplication.d.ts +6 -4
  277. package/types/app/PublicClientApplication.d.ts.map +1 -1
  278. package/types/config/Configuration.d.ts +16 -0
  279. package/types/config/Configuration.d.ts.map +1 -1
  280. package/types/controllers/StandardController.d.ts.map +1 -1
  281. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  282. package/types/interaction_client/PopupClient.d.ts +12 -0
  283. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  284. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  285. package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  286. package/types/packageMetadata.d.ts +1 -1
  287. package/types/protocol/Authorize.d.ts.map +1 -1
  288. package/types/utils/BrowserUtils.d.ts +2 -1
  289. package/types/utils/BrowserUtils.d.ts.map +1 -1
  290. package/types/utils/IframeMonitor.d.ts +17 -0
  291. package/types/utils/IframeMonitor.d.ts.map +1 -0
  292. package/types/utils/PopupMonitor.d.ts +37 -0
  293. package/types/utils/PopupMonitor.d.ts.map +1 -0
  294. package/types/utils/PopupOriginCheck.d.ts +27 -0
  295. package/types/utils/PopupOriginCheck.d.ts.map +1 -0
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v5.26.0 2026-10-21 */
1
+ /*! @azure/msal-browser v5.27.0 2026-10-27 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -6,7 +6,7 @@
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
7
7
  })(this, (function (exports) { 'use strict';
8
8
 
9
- /*! @azure/msal-common v16.14.3 2026-10-21 */
9
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -58,9 +58,15 @@
58
58
  const EAR_JWE_CRYPTO = "ear_jwe_crypto";
59
59
  const RESOURCE = "resource";
60
60
  const CLI_DATA = "clidata";
61
- const ATTRIBUTE_TOKENS = "attribute_tokens";
61
+ const ATTRIBUTE_TOKENS = "attribute_tokens";
62
+ /**
63
+ * Popup-origin-check-done. Signals to the STS that the client verified the
64
+ * popup cannot be reached by an untrusted window, so the
65
+ * Cross-Origin-Opener-Policy response header may be omitted.
66
+ */
67
+ const POPUP_ORIGIN_CHECK_DONE = "pocd";
62
68
 
63
- /*! @azure/msal-common v16.14.3 2026-10-21 */
69
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
64
70
  /*
65
71
  * Copyright (c) Microsoft Corporation. All rights reserved.
66
72
  * Licensed under the MIT License.
@@ -299,7 +305,7 @@
299
305
  // Token renewal offset default in seconds
300
306
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
301
307
 
302
- /*! @azure/msal-common v16.14.3 2026-10-21 */
308
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
303
309
  /*
304
310
  * Copyright (c) Microsoft Corporation. All rights reserved.
305
311
  * Licensed under the MIT License.
@@ -328,7 +334,7 @@
328
334
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
329
335
  }
330
336
 
331
- /*! @azure/msal-common v16.14.3 2026-10-21 */
337
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
332
338
 
333
339
  /*
334
340
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -351,7 +357,7 @@
351
357
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
352
358
  }
353
359
 
354
- /*! @azure/msal-common v16.14.3 2026-10-21 */
360
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
355
361
  /*
356
362
  * Copyright (c) Microsoft Corporation. All rights reserved.
357
363
  * Licensed under the MIT License.
@@ -437,7 +443,7 @@
437
443
  userCanceled: userCanceled
438
444
  });
439
445
 
440
- /*! @azure/msal-common v16.14.3 2026-10-21 */
446
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
441
447
 
442
448
  /*
443
449
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -475,7 +481,7 @@
475
481
  };
476
482
  }
477
483
 
478
- /*! @azure/msal-common v16.14.3 2026-10-21 */
484
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
479
485
 
480
486
  /*
481
487
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -541,7 +547,7 @@
541
547
  return matches[2];
542
548
  }
543
549
 
544
- /*! @azure/msal-common v16.14.3 2026-10-21 */
550
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
545
551
 
546
552
  /*
547
553
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -629,7 +635,7 @@
629
635
  return updatedAccountInfo;
630
636
  }
631
637
 
632
- /*! @azure/msal-common v16.14.3 2026-10-21 */
638
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
633
639
  /*
634
640
  * Copyright (c) Microsoft Corporation. All rights reserved.
635
641
  * Licensed under the MIT License.
@@ -643,7 +649,7 @@
643
649
  Ciam: 3,
644
650
  };
645
651
 
646
- /*! @azure/msal-common v16.14.3 2026-10-21 */
652
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
647
653
  /*
648
654
  * Copyright (c) Microsoft Corporation. All rights reserved.
649
655
  * Licensed under the MIT License.
@@ -665,7 +671,7 @@
665
671
  return null;
666
672
  }
667
673
 
668
- /*! @azure/msal-common v16.14.3 2026-10-21 */
674
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
669
675
  /*
670
676
  * Copyright (c) Microsoft Corporation. All rights reserved.
671
677
  * Licensed under the MIT License.
@@ -689,7 +695,7 @@
689
695
  EAR: "EAR",
690
696
  };
691
697
 
692
- /*! @azure/msal-common v16.14.3 2026-10-21 */
698
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
693
699
  /**
694
700
  * Returns the AccountInfo interface for this account.
695
701
  * @internal
@@ -878,7 +884,7 @@
878
884
  entity.hasOwnProperty("authorityType"));
879
885
  }
880
886
 
881
- /*! @azure/msal-common v16.14.3 2026-10-21 */
887
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
882
888
  /*
883
889
  * Copyright (c) Microsoft Corporation. All rights reserved.
884
890
  * Licensed under the MIT License.
@@ -895,7 +901,7 @@
895
901
  unexpectedError: unexpectedError
896
902
  });
897
903
 
898
- /*! @azure/msal-common v16.14.3 2026-10-21 */
904
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
899
905
 
900
906
  /*
901
907
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -915,7 +921,47 @@
915
921
  return new ClientConfigurationError(errorCode, correlationId);
916
922
  }
917
923
 
918
- /*! @azure/msal-common v16.14.3 2026-10-21 */
924
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
925
+ /*
926
+ * Copyright (c) Microsoft Corporation. All rights reserved.
927
+ * Licensed under the MIT License.
928
+ */
929
+ // Track only our normalized copies, never caller-owned mutable inputs.
930
+ const normalizedHeaderRecords = new WeakSet();
931
+ /**
932
+ * Creates a lowercase-keyed snapshot without changing header values or the input.
933
+ * Reuses snapshots produced by this function to avoid repeated normalization.
934
+ * @internal
935
+ */
936
+ function normalizeResponseHeaders(headers) {
937
+ if (normalizedHeaderRecords.has(headers)) {
938
+ return headers;
939
+ }
940
+ const normalized = Object.fromEntries(Object.entries(headers).map(([name, value]) => [
941
+ name.toLowerCase(),
942
+ value,
943
+ ]));
944
+ normalizedHeaderRecords.add(normalized);
945
+ return normalized;
946
+ }
947
+ /**
948
+ * Reads a response header case-insensitively.
949
+ * Normalized snapshots are never scanned, even when a header is missing.
950
+ * @internal
951
+ */
952
+ function getResponseHeader(headers, name) {
953
+ const key = name.toLowerCase();
954
+ if (Object.prototype.hasOwnProperty.call(headers, key)) {
955
+ return headers[key];
956
+ }
957
+ if (normalizedHeaderRecords.has(headers)) {
958
+ return undefined;
959
+ }
960
+ const headerName = Object.keys(headers).find((header) => header.toLowerCase() === key);
961
+ return headerName === undefined ? undefined : headers[headerName];
962
+ }
963
+
964
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
919
965
  /*
920
966
  * Copyright (c) Microsoft Corporation. All rights reserved.
921
967
  * Licensed under the MIT License.
@@ -985,7 +1031,7 @@
985
1031
  urlParseError: urlParseError
986
1032
  });
987
1033
 
988
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1034
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
989
1035
 
990
1036
  /*
991
1037
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -996,8 +1042,9 @@
996
1042
  * header challenge values that can be used outside the basic authorization flows.
997
1043
  */
998
1044
  class AuthenticationHeaderParser {
1045
+ /** Captures a case-insensitive snapshot of the response headers. */
999
1046
  constructor(headers) {
1000
- this.headers = headers;
1047
+ this.headers = normalizeResponseHeaders(headers);
1001
1048
  }
1002
1049
  /**
1003
1050
  * This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.
@@ -1005,7 +1052,7 @@
1005
1052
  */
1006
1053
  getShrNonce() {
1007
1054
  // Attempt to parse nonce from Authentiacation-Info
1008
- const authenticationInfo = this.headers[HeaderNames.AuthenticationInfo];
1055
+ const authenticationInfo = getResponseHeader(this.headers, HeaderNames.AuthenticationInfo);
1009
1056
  if (authenticationInfo) {
1010
1057
  const authenticationInfoChallenges = this.parseChallenges(authenticationInfo);
1011
1058
  if (authenticationInfoChallenges.nextnonce) {
@@ -1014,7 +1061,7 @@
1014
1061
  throw createClientConfigurationError(invalidAuthenticationHeader, "");
1015
1062
  }
1016
1063
  // Attempt to parse nonce from WWW-Authenticate
1017
- const wwwAuthenticate = this.headers[HeaderNames.WWWAuthenticate];
1064
+ const wwwAuthenticate = getResponseHeader(this.headers, HeaderNames.WWWAuthenticate);
1018
1065
  if (wwwAuthenticate) {
1019
1066
  const wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate);
1020
1067
  if (wwwAuthenticateChallenges.nonce) {
@@ -1043,7 +1090,7 @@
1043
1090
  }
1044
1091
  }
1045
1092
 
1046
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1093
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1047
1094
  /*
1048
1095
  * Copyright (c) Microsoft Corporation. All rights reserved.
1049
1096
  * Licensed under the MIT License.
@@ -1055,7 +1102,7 @@
1055
1102
  response.hasOwnProperty("jwks_uri"));
1056
1103
  }
1057
1104
 
1058
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1105
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1059
1106
  /*
1060
1107
  * Copyright (c) Microsoft Corporation. All rights reserved.
1061
1108
  * Licensed under the MIT License.
@@ -1135,7 +1182,7 @@
1135
1182
  }
1136
1183
  }
1137
1184
 
1138
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1185
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1139
1186
 
1140
1187
  /*
1141
1188
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1293,7 +1340,7 @@
1293
1340
  }
1294
1341
  }
1295
1342
 
1296
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1343
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1297
1344
 
1298
1345
  /*
1299
1346
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1447,7 +1494,7 @@
1447
1494
  return null;
1448
1495
  }
1449
1496
 
1450
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1497
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1451
1498
  /*
1452
1499
  * Copyright (c) Microsoft Corporation. All rights reserved.
1453
1500
  * Licensed under the MIT License.
@@ -1465,7 +1512,7 @@
1465
1512
  AzureUsGovernment: "https://login.microsoftonline.us",
1466
1513
  };
1467
1514
 
1468
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1515
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1469
1516
  /*
1470
1517
  * Copyright (c) Microsoft Corporation. All rights reserved.
1471
1518
  * Licensed under the MIT License.
@@ -1475,7 +1522,7 @@
1475
1522
  response.hasOwnProperty("metadata"));
1476
1523
  }
1477
1524
 
1478
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1525
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1479
1526
  /*
1480
1527
  * Copyright (c) Microsoft Corporation. All rights reserved.
1481
1528
  * Licensed under the MIT License.
@@ -1485,7 +1532,7 @@
1485
1532
  response.hasOwnProperty("error_description"));
1486
1533
  }
1487
1534
 
1488
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1535
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1489
1536
  /*
1490
1537
  * Copyright (c) Microsoft Corporation. All rights reserved.
1491
1538
  * Licensed under the MIT License.
@@ -1556,7 +1603,7 @@
1556
1603
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1557
1604
  const SetUserData = "setUserData";
1558
1605
 
1559
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1606
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1560
1607
  /*
1561
1608
  * Copyright (c) Microsoft Corporation. All rights reserved.
1562
1609
  * Licensed under the MIT License.
@@ -1649,7 +1696,7 @@
1649
1696
  };
1650
1697
  };
1651
1698
 
1652
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1699
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1653
1700
 
1654
1701
  /*
1655
1702
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1760,7 +1807,7 @@
1760
1807
  },
1761
1808
  };
1762
1809
 
1763
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1810
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1764
1811
  /*
1765
1812
  * Copyright (c) Microsoft Corporation. All rights reserved.
1766
1813
  * Licensed under the MIT License.
@@ -1825,7 +1872,7 @@
1825
1872
  return cachedAtSec > nowSeconds();
1826
1873
  }
1827
1874
 
1828
- /*! @azure/msal-common v16.14.3 2026-10-21 */
1875
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
1829
1876
 
1830
1877
  /*
1831
1878
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2112,7 +2159,7 @@
2112
2159
  return [...attributeTokens].sort().join(" ");
2113
2160
  }
2114
2161
 
2115
- /*! @azure/msal-common v16.14.3 2026-10-21 */
2162
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
2116
2163
 
2117
2164
  /*
2118
2165
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3080,7 +3127,7 @@
3080
3127
  };
3081
3128
  }
3082
3129
 
3083
- /*! @azure/msal-common v16.14.3 2026-10-21 */
3130
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3084
3131
 
3085
3132
  /*
3086
3133
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3114,7 +3161,7 @@
3114
3161
  }
3115
3162
  }
3116
3163
 
3117
- /*! @azure/msal-common v16.14.3 2026-10-21 */
3164
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3118
3165
 
3119
3166
  /*
3120
3167
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3310,7 +3357,7 @@
3310
3357
  }
3311
3358
  }
3312
3359
 
3313
- /*! @azure/msal-common v16.14.3 2026-10-21 */
3360
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3314
3361
 
3315
3362
  /*
3316
3363
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3591,6 +3638,20 @@
3591
3638
  parameters.set(INSTANCE_AWARE, "true");
3592
3639
  }
3593
3640
  }
3641
+ /**
3642
+ * Adds `pocd=1`, telling the STS that the client verified the popup driving
3643
+ * this request cannot be reached by an untrusted window, so the
3644
+ * Cross-Origin-Opener-Policy response header may be omitted.
3645
+ *
3646
+ * Only ever added when the check passed — a negative result is signalled by
3647
+ * omitting the parameter, which keeps the STS default (apply COOP) and stays
3648
+ * compatible with library versions that never send it.
3649
+ */
3650
+ function addPopupOriginCheckDone(parameters) {
3651
+ if (!parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
3652
+ parameters.set(POPUP_ORIGIN_CHECK_DONE, "1");
3653
+ }
3654
+ }
3594
3655
  /**
3595
3656
  * Add extraParameters
3596
3657
  * @param extraParams - String dictionary containing extra parameters to be added.
@@ -3796,7 +3857,7 @@
3796
3857
  }
3797
3858
  }
3798
3859
 
3799
- /*! @azure/msal-common v16.14.3 2026-10-21 */
3860
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3800
3861
 
3801
3862
  /*
3802
3863
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3817,7 +3878,8 @@
3817
3878
  return responseString;
3818
3879
  }
3819
3880
  /**
3820
- * Returns URL hash as server auth code response object.
3881
+ * Returns flat fragment or query parameters as an authorization response.
3882
+ * Application routes and unrecognized responses return null.
3821
3883
  */
3822
3884
  function getDeserializedResponse(responseString) {
3823
3885
  // Check if given hash is empty
@@ -3827,7 +3889,15 @@
3827
3889
  try {
3828
3890
  // Strip the # or ? symbol if present
3829
3891
  const normalizedResponse = stripLeadingHashOrQuery(responseString);
3830
- // If # symbol was not present, above will return empty string, so give original hash value
3892
+ /*
3893
+ * Require a flat parameter name, not an application route.
3894
+ * Reject routes like #/dashboard?tab=orders&code=... and
3895
+ * #/dashboard/orders&state=..., where ?, /, or # appears before
3896
+ * the first = or &. These characters are allowed in parameter values.
3897
+ */
3898
+ if (!/^[^=&?#/]+(?:=|&|$)/.test(normalizedResponse)) {
3899
+ return null;
3900
+ }
3831
3901
  const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse));
3832
3902
  // Check for known response properties
3833
3903
  if (deserializedHash.code ||
@@ -3918,7 +3988,7 @@
3918
3988
  }
3919
3989
  }
3920
3990
 
3921
- /*! @azure/msal-common v16.14.3 2026-10-21 */
3991
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3922
3992
 
3923
3993
  /*
3924
3994
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3966,7 +4036,7 @@
3966
4036
  },
3967
4037
  };
3968
4038
 
3969
- /*! @azure/msal-common v16.14.3 2026-10-21 */
4039
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3970
4040
 
3971
4041
  /*
3972
4042
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3989,7 +4059,7 @@
3989
4059
  },
3990
4060
  };
3991
4061
 
3992
- /*! @azure/msal-common v16.14.3 2026-10-21 */
4062
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
3993
4063
  /*
3994
4064
  * Copyright (c) Microsoft Corporation. All rights reserved.
3995
4065
  * Licensed under the MIT License.
@@ -4278,12 +4348,12 @@
4278
4348
  }
4279
4349
  }
4280
4350
 
4281
- /*! @azure/msal-common v16.14.3 2026-10-21 */
4351
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4282
4352
  /* eslint-disable header/header */
4283
4353
  const name$1 = "@azure/msal-common";
4284
- const version$1 = "16.14.3";
4354
+ const version$1 = "16.15.0";
4285
4355
 
4286
- /*! @azure/msal-common v16.14.3 2026-10-21 */
4356
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4287
4357
  /*
4288
4358
  * Copyright (c) Microsoft Corporation. All rights reserved.
4289
4359
  * Licensed under the MIT License.
@@ -4291,7 +4361,7 @@
4291
4361
  const cacheQuotaExceeded = "cache_quota_exceeded";
4292
4362
  const cacheErrorUnknown = "cache_error_unknown";
4293
4363
 
4294
- /*! @azure/msal-common v16.14.3 2026-10-21 */
4364
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4295
4365
 
4296
4366
  /*
4297
4367
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4329,7 +4399,7 @@
4329
4399
  }
4330
4400
  }
4331
4401
 
4332
- /*! @azure/msal-common v16.14.3 2026-10-21 */
4402
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
4333
4403
 
4334
4404
  /*
4335
4405
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5517,7 +5587,7 @@
5517
5587
  }
5518
5588
  }
5519
5589
 
5520
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5590
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5521
5591
  /*
5522
5592
  * Copyright (c) Microsoft Corporation. All rights reserved.
5523
5593
  * Licensed under the MIT License.
@@ -5582,7 +5652,7 @@
5582
5652
  "fetchRetryCount",
5583
5653
  ]);
5584
5654
 
5585
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5655
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5586
5656
 
5587
5657
  /*
5588
5658
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5640,7 +5710,7 @@
5640
5710
  }
5641
5711
  }
5642
5712
 
5643
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5713
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5644
5714
 
5645
5715
  /*
5646
5716
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5738,7 +5808,7 @@
5738
5808
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5739
5809
  }
5740
5810
 
5741
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5811
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5742
5812
  /*
5743
5813
  * Copyright (c) Microsoft Corporation. All rights reserved.
5744
5814
  * Licensed under the MIT License.
@@ -5765,7 +5835,7 @@
5765
5835
  }
5766
5836
  }
5767
5837
 
5768
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5838
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5769
5839
 
5770
5840
  /*
5771
5841
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5786,7 +5856,7 @@
5786
5856
  return new JoseHeaderError(code, correlationId);
5787
5857
  }
5788
5858
 
5789
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5859
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5790
5860
  /*
5791
5861
  * Copyright (c) Microsoft Corporation. All rights reserved.
5792
5862
  * Licensed under the MIT License.
@@ -5811,7 +5881,7 @@
5811
5881
  return Object.getPrototypeOf(value) === proto;
5812
5882
  }
5813
5883
 
5814
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5884
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5815
5885
  /*
5816
5886
  * Copyright (c) Microsoft Corporation. All rights reserved.
5817
5887
  * Licensed under the MIT License.
@@ -5821,7 +5891,7 @@
5821
5891
  const missingJwkError = "missing_jwk_error";
5822
5892
  const invalidJwkError = "invalid_jwk_error";
5823
5893
 
5824
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5894
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5825
5895
 
5826
5896
  /*
5827
5897
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5887,7 +5957,7 @@
5887
5957
  }
5888
5958
  }
5889
5959
 
5890
- /*! @azure/msal-common v16.14.3 2026-10-21 */
5960
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5891
5961
 
5892
5962
  /*
5893
5963
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5988,7 +6058,7 @@
5988
6058
  }
5989
6059
  }
5990
6060
 
5991
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6061
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
5992
6062
 
5993
6063
  /*
5994
6064
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6133,7 +6203,7 @@
6133
6203
  }
6134
6204
  }
6135
6205
 
6136
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6206
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6137
6207
  /*
6138
6208
  * Copyright (c) Microsoft Corporation. All rights reserved.
6139
6209
  * Licensed under the MIT License.
@@ -6197,7 +6267,7 @@
6197
6267
  uiNotAllowed: uiNotAllowed
6198
6268
  });
6199
6269
 
6200
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6270
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6201
6271
 
6202
6272
  /*
6203
6273
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6264,7 +6334,7 @@
6264
6334
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
6265
6335
  }
6266
6336
 
6267
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6337
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6268
6338
 
6269
6339
  /*
6270
6340
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6283,7 +6353,7 @@
6283
6353
  }
6284
6354
  }
6285
6355
 
6286
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6356
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6287
6357
 
6288
6358
  /*
6289
6359
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6354,7 +6424,7 @@
6354
6424
  }
6355
6425
  }
6356
6426
 
6357
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6427
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6358
6428
 
6359
6429
  /*
6360
6430
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6782,7 +6852,7 @@
6782
6852
  return baseAccount;
6783
6853
  }
6784
6854
 
6785
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6855
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6786
6856
  /*
6787
6857
  * Copyright (c) Microsoft Corporation. All rights reserved.
6788
6858
  * Licensed under the MIT License.
@@ -6792,7 +6862,7 @@
6792
6862
  UPN: "UPN",
6793
6863
  };
6794
6864
 
6795
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6865
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6796
6866
  /*
6797
6867
  * Copyright (c) Microsoft Corporation. All rights reserved.
6798
6868
  * Licensed under the MIT License.
@@ -6811,7 +6881,7 @@
6811
6881
  }
6812
6882
  }
6813
6883
 
6814
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6884
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6815
6885
 
6816
6886
  /*
6817
6887
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6835,7 +6905,7 @@
6835
6905
  };
6836
6906
  }
6837
6907
 
6838
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6908
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6839
6909
 
6840
6910
  /*
6841
6911
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6870,13 +6940,14 @@
6870
6940
  * Performs necessary throttling checks after a network request.
6871
6941
  * @param cacheManager
6872
6942
  * @param thumbprint
6873
- * @param response
6943
+ * @param response - Token response with case-insensitive header names.
6874
6944
  */
6875
6945
  static postProcess(cacheManager, thumbprint, response, correlationId) {
6946
+ const retryAfter = getRetryAfterHeader(response);
6876
6947
  if (ThrottlingUtils.checkResponseStatus(response) ||
6877
- ThrottlingUtils.checkResponseForRetryAfter(response)) {
6948
+ retryAfter !== undefined) {
6878
6949
  const thumbprintValue = {
6879
- throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(response.headers[HeaderNames.RETRY_AFTER])),
6950
+ throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(retryAfter || "")),
6880
6951
  error: response.body.error,
6881
6952
  errorCodes: response.body.error_codes,
6882
6953
  errorMessage: response.body.error_description,
@@ -6895,14 +6966,10 @@
6895
6966
  }
6896
6967
  /**
6897
6968
  * Checks a NetworkResponse object's RetryAfter header
6898
- * @param response
6969
+ * @param response - Token response with case-insensitive header names.
6899
6970
  */
6900
6971
  static checkResponseForRetryAfter(response) {
6901
- if (response.headers) {
6902
- return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) &&
6903
- (response.status < 200 || response.status >= 300));
6904
- }
6905
- return false;
6972
+ return getRetryAfterHeader(response) !== undefined;
6906
6973
  }
6907
6974
  /**
6908
6975
  * Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.
@@ -6919,9 +6986,16 @@
6919
6986
  const key = this.generateThrottlingStorageKey(thumbprint);
6920
6987
  cacheManager.removeItem(key, request.correlationId);
6921
6988
  }
6989
+ }
6990
+ /** Reads Retry-After only for non-success responses. */
6991
+ function getRetryAfterHeader(response) {
6992
+ if ((response.status < 200 || response.status >= 300) && response.headers) {
6993
+ return getResponseHeader(response.headers, HeaderNames.RETRY_AFTER);
6994
+ }
6995
+ return undefined;
6922
6996
  }
6923
6997
 
6924
- /*! @azure/msal-common v16.14.3 2026-10-21 */
6998
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6925
6999
 
6926
7000
  /*
6927
7001
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6952,7 +7026,7 @@
6952
7026
  return new NetworkError(error, httpStatus, responseHeaders);
6953
7027
  }
6954
7028
 
6955
- /*! @azure/msal-common v16.14.3 2026-10-21 */
7029
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
6956
7030
 
6957
7031
  /*
6958
7032
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7050,7 +7124,8 @@
7050
7124
  let response;
7051
7125
  try {
7052
7126
  response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
7053
- const responseHeaders = response.headers || {};
7127
+ const responseHeaders = normalizeResponseHeaders(response.headers || {});
7128
+ response = { ...response, headers: responseHeaders };
7054
7129
  performanceClient?.addFields({
7055
7130
  refreshTokenSize: response.body.refresh_token?.length || 0,
7056
7131
  httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "",
@@ -7059,16 +7134,16 @@
7059
7134
  }
7060
7135
  catch (e) {
7061
7136
  if (e instanceof NetworkError) {
7062
- const responseHeaders = e.responseHeaders;
7137
+ const responseHeaders = e.responseHeaders
7138
+ ? normalizeResponseHeaders(e.responseHeaders)
7139
+ : undefined;
7063
7140
  if (responseHeaders) {
7064
7141
  performanceClient?.addFields({
7065
7142
  httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] ||
7066
7143
  "",
7067
7144
  requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "",
7068
- contentTypeHeader: responseHeaders[HeaderNames.CONTENT_TYPE] ||
7069
- undefined,
7070
- contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] ||
7071
- undefined,
7145
+ contentTypeHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_TYPE) || undefined,
7146
+ contentLengthHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_LENGTH) || undefined,
7072
7147
  httpStatus: e.httpStatus,
7073
7148
  }, correlationId);
7074
7149
  }
@@ -7085,7 +7160,7 @@
7085
7160
  return response;
7086
7161
  }
7087
7162
 
7088
- /*! @azure/msal-common v16.14.3 2026-10-21 */
7163
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
7089
7164
 
7090
7165
  /*
7091
7166
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7329,6 +7404,9 @@
7329
7404
  if (request.logoutHint) {
7330
7405
  addLogoutHint(parameters, request.logoutHint);
7331
7406
  }
7407
+ if (request.popupOriginCheckDone) {
7408
+ addPopupOriginCheckDone(parameters);
7409
+ }
7332
7410
  if (request.extraQueryParameters) {
7333
7411
  addExtraParameters(parameters, request.extraQueryParameters);
7334
7412
  }
@@ -7349,7 +7427,7 @@
7349
7427
  }
7350
7428
  }
7351
7429
 
7352
- /*! @azure/msal-common v16.14.3 2026-10-21 */
7430
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
7353
7431
 
7354
7432
  /*
7355
7433
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7484,6 +7562,9 @@
7484
7562
  !Object.keys(request.extraQueryParameters).includes(INSTANCE_AWARE))) {
7485
7563
  addInstanceAware(parameters);
7486
7564
  }
7565
+ if (request.popupOriginCheckDone) {
7566
+ addPopupOriginCheckDone(parameters);
7567
+ }
7487
7568
  return parameters;
7488
7569
  }
7489
7570
  /**
@@ -7576,7 +7657,7 @@
7576
7657
  return account.loginHint || account.idTokenClaims?.login_hint || null;
7577
7658
  }
7578
7659
 
7579
- /*! @azure/msal-common v16.14.3 2026-10-21 */
7660
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
7580
7661
 
7581
7662
  /*
7582
7663
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8125,7 +8206,7 @@
8125
8206
  }
8126
8207
  }
8127
8208
 
8128
- /*! @azure/msal-common v16.14.3 2026-10-21 */
8209
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8129
8210
 
8130
8211
  /*
8131
8212
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8360,7 +8441,7 @@
8360
8441
  }
8361
8442
  }
8362
8443
 
8363
- /*! @azure/msal-common v16.14.3 2026-10-21 */
8444
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8364
8445
 
8365
8446
  /*
8366
8447
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8653,7 +8734,7 @@
8653
8734
  clearNativeBrokerErrorCode() { }
8654
8735
  }
8655
8736
 
8656
- /*! @azure/msal-common v16.14.3 2026-10-21 */
8737
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8657
8738
 
8658
8739
  /*
8659
8740
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8780,7 +8861,7 @@
8780
8861
  }
8781
8862
  }
8782
8863
 
8783
- /*! @azure/msal-common v16.14.3 2026-10-21 */
8864
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8784
8865
 
8785
8866
  /*
8786
8867
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8796,7 +8877,7 @@
8796
8877
  },
8797
8878
  };
8798
8879
 
8799
- /*! @azure/msal-common v16.14.3 2026-10-21 */
8880
+ /*! @azure/msal-common v16.15.0 2026-10-27 */
8800
8881
 
8801
8882
  /*
8802
8883
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9874,9 +9955,14 @@
9874
9955
  };
9875
9956
  }
9876
9957
  /**
9877
- * Clears hash from window url.
9958
+ * Clears a recognized authentication response fragment, preserving the query string.
9959
+ * Assigns an empty hash, then removes the trailing # when history updates are available.
9878
9960
  */
9879
9961
  function clearHash(contentWindow) {
9962
+ const serverParams = getDeserializedResponse(contentWindow.location.hash);
9963
+ if (!serverParams) {
9964
+ return;
9965
+ }
9880
9966
  // Office.js sets history.replaceState to null
9881
9967
  contentWindow.location.hash = "";
9882
9968
  if (typeof contentWindow.history.replaceState === "function") {
@@ -11499,7 +11585,7 @@
11499
11585
 
11500
11586
  /* eslint-disable header/header */
11501
11587
  const name = "@azure/msal-browser";
11502
- const version = "5.26.0";
11588
+ const version = "5.27.0";
11503
11589
 
11504
11590
  /*
11505
11591
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -13007,6 +13093,116 @@
13007
13093
  return browserStorage.getActiveAccount(correlationId);
13008
13094
  }
13009
13095
 
13096
+ /*
13097
+ * Copyright (c) Microsoft Corporation. All rights reserved.
13098
+ * Licensed under the MIT License.
13099
+ */
13100
+ const POPUP_POLL_INTERVAL_MS = 30;
13101
+ let activePopupPoller;
13102
+ /**
13103
+ * Cancels legacy popup polling when an interaction is superseded.
13104
+ *
13105
+ * @internal
13106
+ * @param logger Logger for the interaction.
13107
+ */
13108
+ function cancelPendingPopupPollingResponse(logger) {
13109
+ if (activePopupPoller) {
13110
+ logger.verbose("0g9n3p", activePopupPoller.correlationId);
13111
+ activePopupPoller.cancel();
13112
+ }
13113
+ }
13114
+ /**
13115
+ * Monitors a popup window for a URL change to the same origin as the parent application.
13116
+ * Polls the popup at a specified interval until it is redirected back to the application,
13117
+ * closed by the user, or a navigation to a same-origin URL is detected. Once a same-origin
13118
+ * URL is detected, extracts the response string (query or hash) and resolves the promise.
13119
+ *
13120
+ * @param popupWindow - The popup window to monitor for navigation.
13121
+ * @param popupWindowParent - The parent window that opened the popup.
13122
+ * @param responseMode - Response mode (`"query"` | `"fragment"`) determines whether
13123
+ * to read `location.search` or `location.hash` from the popup once on the same
13124
+ * origin. Any value other than `"query"` is treated as fragment.
13125
+ * @param logger - Logger instance.
13126
+ * @param unloadWindow - Event handler to remove from the parent window on cleanup.
13127
+ * @param correlationId
13128
+ */
13129
+ async function monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadWindow, correlationId) {
13130
+ let poller;
13131
+ return new Promise((resolve, reject) => {
13132
+ logger.verbose("0cp91u", correlationId);
13133
+ const intervalId = window.setInterval(() => {
13134
+ if (popupWindow.closed) {
13135
+ logger.error("0n69wb", correlationId);
13136
+ window.clearInterval(intervalId);
13137
+ reject(new BrowserAuthError(userCancelled, correlationId));
13138
+ return;
13139
+ }
13140
+ let href = "";
13141
+ try {
13142
+ /*
13143
+ * Will throw if cross origin,
13144
+ * which should be caught and ignored
13145
+ * since we need the interval to keep running while on STS UI.
13146
+ */
13147
+ href = popupWindow.location.href;
13148
+ }
13149
+ catch (e) { }
13150
+ // Don't process blank pages or cross domain
13151
+ if (!href || href === "about:blank") {
13152
+ return;
13153
+ }
13154
+ window.clearInterval(intervalId);
13155
+ let responseString;
13156
+ if (responseMode === ResponseMode$1.QUERY) {
13157
+ responseString = popupWindow.location.search;
13158
+ }
13159
+ else {
13160
+ responseString = popupWindow.location.hash;
13161
+ }
13162
+ logger.verbose("0po9er", correlationId);
13163
+ resolve(responseString);
13164
+ }, POPUP_POLL_INTERVAL_MS);
13165
+ poller = {
13166
+ correlationId,
13167
+ cancel: () => {
13168
+ window.clearInterval(intervalId);
13169
+ if (activePopupPoller === poller) {
13170
+ activePopupPoller = undefined;
13171
+ }
13172
+ reject(new BrowserAuthError(interactionInProgressCancelled, correlationId));
13173
+ },
13174
+ };
13175
+ activePopupPoller = poller;
13176
+ }).finally(() => {
13177
+ if (poller && activePopupPoller === poller) {
13178
+ activePopupPoller = undefined;
13179
+ }
13180
+ cleanPopup(popupWindow, popupWindowParent, unloadWindow);
13181
+ });
13182
+ }
13183
+ /**
13184
+ * Performs cleanup operations after popup authentication.
13185
+ * Strips auth-response params (code/state) from the popup URL while it is still
13186
+ * open, closes the popup window, and removes the 'beforeunload' event listener
13187
+ * from the parent window.
13188
+ *
13189
+ * @param popupWindow - The popup window to be closed.
13190
+ * @param popupWindowParent - The parent window from which the event listener will be removed.
13191
+ * @param unloadWindow - The event handler function to remove.
13192
+ */
13193
+ function cleanPopup(popupWindow, popupWindowParent, unloadWindow) {
13194
+ if (!popupWindow.closed) {
13195
+ try {
13196
+ clearAuthResponseFromUrl(popupWindow);
13197
+ }
13198
+ catch {
13199
+ // Popup may have become cross-origin or otherwise inaccessible; ignore.
13200
+ }
13201
+ }
13202
+ popupWindow.close();
13203
+ popupWindowParent.removeEventListener("beforeunload", unloadWindow);
13204
+ }
13205
+
13010
13206
  /*
13011
13207
  * Copyright (c) Microsoft Corporation. All rights reserved.
13012
13208
  * Licensed under the MIT License.
@@ -13386,6 +13582,90 @@
13386
13582
  return httpMethod;
13387
13583
  }
13388
13584
 
13585
+ /*
13586
+ * Copyright (c) Microsoft Corporation. All rights reserved.
13587
+ * Licensed under the MIT License.
13588
+ */
13589
+ /**
13590
+ * `window.origin` of a document with an opaque origin, e.g. one sandboxed
13591
+ * without `allow-same-origin`. Read from `window.origin`, not
13592
+ * `location.origin`, which reports the real host even when sandboxed.
13593
+ */
13594
+ const OPAQUE_ORIGIN = "null";
13595
+ /**
13596
+ * Returns `true` when every ancestor browsing context is same-origin with
13597
+ * `win`. A top-level document has no ancestors, so it always passes.
13598
+ */
13599
+ function allAncestorsSameOrigin(win) {
13600
+ try {
13601
+ // Sandboxed: no origin to compare ancestors against.
13602
+ if (win.origin === OPAQUE_ORIGIN) {
13603
+ return false;
13604
+ }
13605
+ let current = win;
13606
+ // `window.parent` is self-referential at the top level, never falsy.
13607
+ while (current !== current.parent) {
13608
+ current = current.parent;
13609
+ // Throws SecurityError if this ancestor is cross-origin.
13610
+ void current.location.href;
13611
+ }
13612
+ return true;
13613
+ }
13614
+ catch {
13615
+ return false;
13616
+ }
13617
+ }
13618
+ /**
13619
+ * Returns `true` when the top-level window has no opener, or one that is
13620
+ * same-origin with it.
13621
+ *
13622
+ * Reads the opener from `win.top`, not `win`: a framed document always reports
13623
+ * `window.opener === null` and would pass while the top window's untrusted
13624
+ * opener still holds a handle on it.
13625
+ */
13626
+ function topOpenerIsSameOriginOrAbsent(win) {
13627
+ try {
13628
+ const top = win.top;
13629
+ if (!top) {
13630
+ // Detached from its browsing context; treat as unsafe.
13631
+ return false;
13632
+ }
13633
+ const opener = top.opener;
13634
+ if (!opener || opener === top) {
13635
+ return true;
13636
+ }
13637
+ // Throws SecurityError if the opener is cross-origin.
13638
+ void opener.location.href;
13639
+ return true;
13640
+ }
13641
+ catch {
13642
+ return false;
13643
+ }
13644
+ }
13645
+ /**
13646
+ * Computes the `pocd` ("popup origin check done") authorize parameter value.
13647
+ *
13648
+ * `1` means no untrusted window can reach the popup, which is what lets Entra
13649
+ * omit the `Cross-Origin-Opener-Policy` response header for the request.
13650
+ *
13651
+ * @param config Resolved browser configuration.
13652
+ * @param win Window whose hosting environment is being checked. Defaults to the app window.
13653
+ * @returns `1` when the check passes, otherwise `0`.
13654
+ */
13655
+ function computePocd(config, win = typeof window !== "undefined" ? window : undefined) {
13656
+ /*
13657
+ * Only an explicit false opts out; anything else computes the check, so an
13658
+ * unresolved config fails closed rather than asserting pocd=1.
13659
+ */
13660
+ if (config.auth.originCheck === false) {
13661
+ return 1;
13662
+ }
13663
+ if (!win || !allAncestorsSameOrigin(win)) {
13664
+ return 0;
13665
+ }
13666
+ return topOpenerIsSameOriginOrAbsent(win) ? 1 : 0;
13667
+ }
13668
+
13389
13669
  /*
13390
13670
  * Copyright (c) Microsoft Corporation. All rights reserved.
13391
13671
  * Licensed under the MIT License.
@@ -13403,6 +13683,11 @@
13403
13683
  const validLogoutRequest = {
13404
13684
  correlationId: this.correlationId,
13405
13685
  ...logoutRequest,
13686
+ /*
13687
+ * Computed here rather than per flow so every end-session request
13688
+ * carries it, matching the authorize path.
13689
+ */
13690
+ popupOriginCheckDone: computePocd(this.config) === 1,
13406
13691
  };
13407
13692
  /**
13408
13693
  * Set logout_hint to be login_hint from ID Token Claims if present
@@ -14880,7 +15165,16 @@
14880
15165
  * @returns
14881
15166
  */
14882
15167
  async function getStandardParameters(config, authority, request, logger, performanceClient) {
14883
- const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority }, request, logger, performanceClient);
15168
+ const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority }, {
15169
+ ...request,
15170
+ /*
15171
+ * Computed here rather than per flow so every authorize request
15172
+ * carries it — GET, POST and EAR, interactive and silent alike.
15173
+ * A request may assert it instead when the topology, rather than
15174
+ * the current window, is what makes the popup unreachable.
15175
+ */
15176
+ popupOriginCheckDone: request.popupOriginCheckDone ?? computePocd(config) === 1,
15177
+ }, logger, performanceClient);
14884
15178
  addLibraryInfo(parameters, {
14885
15179
  sku: BrowserConstants.MSAL_SKU,
14886
15180
  version: version,
@@ -14934,6 +15228,15 @@
14934
15228
  });
14935
15229
  return getAuthorizeUrl(authority, parameters);
14936
15230
  }
15231
+ function getAuthorizeFormAction(authority, request, parameters) {
15232
+ const queryParams = new Map();
15233
+ addExtraParameters(queryParams, request.extraQueryParameters || {});
15234
+ if (parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
15235
+ queryParams.delete(POPUP_ORIGIN_CHECK_DONE);
15236
+ }
15237
+ addCorrelationId(queryParams, request.correlationId);
15238
+ return getAuthorizeUrl(authority, queryParams);
15239
+ }
14937
15240
  /**
14938
15241
  * Builds the action URL + POST-body fields for the EAR /authorize form.
14939
15242
  */
@@ -14949,11 +15252,7 @@
14949
15252
  addExtraParameters(parameters, {
14950
15253
  ...request.extraParameters,
14951
15254
  });
14952
- const queryParams = new Map();
14953
- addExtraParameters(queryParams, request.extraQueryParameters || {});
14954
- // Add correlationId to query params so gateway can propagate it to IDPs
14955
- addCorrelationId(queryParams, request.correlationId);
14956
- const action = getAuthorizeUrl(authority, queryParams);
15255
+ const action = getAuthorizeFormAction(authority, request, parameters);
14957
15256
  return { action, fields: Object.fromEntries(parameters) };
14958
15257
  }
14959
15258
  /**
@@ -14974,12 +15273,7 @@
14974
15273
  addExtraParameters(parameters, {
14975
15274
  ...request.extraParameters,
14976
15275
  });
14977
- // Add extraQueryParameters to be appended to request URL
14978
- const queryParams = new Map();
14979
- addExtraParameters(queryParams, request.extraQueryParameters || {});
14980
- // Add correlationId to query params so gateway can propagate it to IDPs
14981
- addCorrelationId(queryParams, request.correlationId);
14982
- const action = getAuthorizeUrl(authority, queryParams);
15276
+ const action = getAuthorizeFormAction(authority, request, parameters);
14983
15277
  return { action, fields: Object.fromEntries(parameters) };
14984
15278
  }
14985
15279
  /**
@@ -15366,7 +15660,7 @@
15366
15660
  */
15367
15661
  // Default timeout for popup windows and iframes in milliseconds
15368
15662
  const DEFAULT_POPUP_TIMEOUT_MS = 60000;
15369
- const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
15663
+ const DEFAULT_IFRAME_TIMEOUT_MS$1 = 10000;
15370
15664
  const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
15371
15665
  const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
15372
15666
  /**
@@ -15407,6 +15701,8 @@
15407
15701
  instanceAware: false,
15408
15702
  isMcp: false,
15409
15703
  verifySSO: false,
15704
+ // Legacy polling needs COOP omitted, so it implies asserting pocd=1.
15705
+ originCheck: !userInputSystem?.enableLegacyPolling,
15410
15706
  };
15411
15707
  // Default cache options for browser
15412
15708
  const DEFAULT_CACHE_OPTIONS = {
@@ -15431,7 +15727,7 @@
15431
15727
  : StubbedNetworkModule,
15432
15728
  navigationClient: new NavigationClient(),
15433
15729
  popupBridgeTimeout: userInputSystem?.popupBridgeTimeout || DEFAULT_POPUP_TIMEOUT_MS,
15434
- iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS,
15730
+ iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS$1,
15435
15731
  redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,
15436
15732
  allowRedirectInIframe: false,
15437
15733
  navigatePopups: true,
@@ -15440,6 +15736,7 @@
15440
15736
  DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
15441
15737
  protocolMode: ProtocolMode.AAD,
15442
15738
  serverTelemetryEnabled: false,
15739
+ enableLegacyPolling: false,
15443
15740
  };
15444
15741
  const providedSystemOptions = {
15445
15742
  ...DEFAULT_BROWSER_SYSTEM_OPTIONS,
@@ -15457,11 +15754,17 @@
15457
15754
  iframeTimeoutTelemetry: false,
15458
15755
  allowPlatformBrokerWithDOM: false,
15459
15756
  };
15757
+ let logger;
15758
+ const getLogger = () => {
15759
+ if (!logger) {
15760
+ logger = new Logger(providedSystemOptions.loggerOptions, name, version);
15761
+ }
15762
+ return logger;
15763
+ };
15460
15764
  // Throw an error if user has set OIDCOptions without being in OIDC protocol mode
15461
15765
  if (userInputSystem?.protocolMode !== ProtocolMode.OIDC &&
15462
15766
  userInputAuth?.OIDCOptions) {
15463
- const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
15464
- logger.warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
15767
+ getLogger().warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
15465
15768
  }
15466
15769
  // Throw an error if user has set allowPlatformBroker to true with OIDC protocol mode
15467
15770
  if (userInputSystem?.protocolMode &&
@@ -15469,6 +15772,24 @@
15469
15772
  providedSystemOptions?.allowPlatformBroker) {
15470
15773
  throw createClientConfigurationError(cannotAllowPlatformBroker, "");
15471
15774
  }
15775
+ /*
15776
+ * The origin check computes 0 in the embedded contexts legacy polling
15777
+ * serves, so re-enabling it there breaks the flow. Honor it, but warn.
15778
+ */
15779
+ if (userInputSystem?.enableLegacyPolling &&
15780
+ userInputAuth?.originCheck === true) {
15781
+ 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.", "");
15782
+ }
15783
+ /*
15784
+ * Opting out is a deliberate risk transfer, not an error — but the app
15785
+ * cannot know at config time that the risky topology is actually present.
15786
+ */
15787
+ if ((userInputAuth?.originCheck ?? DEFAULT_AUTH_OPTIONS.originCheck) ===
15788
+ false &&
15789
+ typeof window !== "undefined" &&
15790
+ !topOpenerIsSameOriginOrAbsent(window)) {
15791
+ 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.", "");
15792
+ }
15472
15793
  const overlayedConfig = {
15473
15794
  auth: {
15474
15795
  ...DEFAULT_AUTH_OPTIONS,
@@ -16294,6 +16615,9 @@
16294
16615
  popupWindowAttributes: logoutRequest?.popupWindowAttributes || {},
16295
16616
  popupWindowParent: logoutRequest?.popupWindowParent ?? window,
16296
16617
  };
16618
+ validLogoutRequest.popupOriginCheckDone =
16619
+ this.getPopupOriginCheckDone(popupParams.popupWindowParent) ??
16620
+ validLogoutRequest.popupOriginCheckDone;
16297
16621
  const authority = logoutRequest && logoutRequest.authority;
16298
16622
  const mainWindowRedirectUri = logoutRequest && logoutRequest.mainWindowRedirectUri;
16299
16623
  // navigatePopups flag set to false. Acquires token without first opening popup. Popup will be opened later asynchronously.
@@ -16358,6 +16682,7 @@
16358
16682
  ...request,
16359
16683
  codeChallenge: pkce.challenge,
16360
16684
  ...tokenBindingParams,
16685
+ popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
16361
16686
  };
16362
16687
  try {
16363
16688
  // Initialize the client
@@ -16421,6 +16746,7 @@
16421
16746
  earJwk: earJwk,
16422
16747
  codeChallenge: pkce.challenge,
16423
16748
  ...tokenBindingParams,
16749
+ popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
16424
16750
  };
16425
16751
  const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
16426
16752
  // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
@@ -16693,6 +17019,27 @@
16693
17019
  getRelayStateId(state, correlationId) {
16694
17020
  return parseRequestState(base64Decode, state, correlationId).libraryState.id;
16695
17021
  }
17022
+ /**
17023
+ * Asserts `pocd=1` for the relay flow. Direct popups also require the
17024
+ * environment of a delegated opening window to pass the origin check.
17025
+ *
17026
+ * With a relay the IdP window is a grandchild popup, which an untrusted
17027
+ * ancestor cannot reach by name — so the topology satisfies the check by
17028
+ * construction. The current window is framed and would otherwise compute
17029
+ * `0`. Without a delegated parent, the standard app check remains unchanged.
17030
+ *
17031
+ * @param popupWindowParent Window that opens the popup.
17032
+ */
17033
+ getPopupOriginCheckDone(popupWindowParent) {
17034
+ if (this.config.auth.popupRelayUri) {
17035
+ return true;
17036
+ }
17037
+ if (popupWindowParent !== window) {
17038
+ return (computePocd(this.config) === 1 &&
17039
+ computePocd(this.config, popupWindowParent) === 1);
17040
+ }
17041
+ return undefined;
17042
+ }
16696
17043
  /**
16697
17044
  * Opens the interactive popup for a POST-form /authorize request. Shared by
16698
17045
  * the auth-code POST and EAR flows, which are identical apart from the form
@@ -17015,7 +17362,6 @@
17015
17362
  }
17016
17363
  return [null, ""];
17017
17364
  }
17018
- clearHash(window);
17019
17365
  this.logger.verbose("00uvho", this.correlationId);
17020
17366
  return [response, responseString];
17021
17367
  }
@@ -17986,7 +18332,32 @@
17986
18332
  * @returns
17987
18333
  */
17988
18334
  async handleRedirectPromiseInternal(options) {
17989
- if (!this.browserStorage.isInteractionInProgress(true)) {
18335
+ // Preserve the response for RedirectClient before removing it from the URL.
18336
+ const responseString = options?.hash ||
18337
+ (this.config.auth.OIDCOptions.responseMode ===
18338
+ ResponseMode$1.QUERY
18339
+ ? window.location.search
18340
+ : window.location.hash);
18341
+ const anyClientInteractionInProgress = this.browserStorage.isInteractionInProgress(false);
18342
+ const currentClientInteraction = this.browserStorage.isInteractionInProgress(true);
18343
+ const isBridgeCallback = isInPopup() ||
18344
+ (isInIframe() &&
18345
+ !this.config.system.allowRedirectInIframe);
18346
+ /*
18347
+ * Clear recognized response fragments for:
18348
+ * - Stale callbacks with no pending interaction.
18349
+ * - This client's login callback, even if request setup or response validation fails.
18350
+ * - This client's logout callback containing state, before the SIGNOUT early return.
18351
+ * Leave another client's callback untouched. clearHash preserves query strings
18352
+ * and application routes, and does nothing when no response fragment is present.
18353
+ * Skip popup and non-redirect iframe callbacks: legacy apps may call HRP
18354
+ * before their redirect bridge reads and broadcasts the response.
18355
+ */
18356
+ if (!isBridgeCallback &&
18357
+ (!anyClientInteractionInProgress || currentClientInteraction)) {
18358
+ clearHash(window);
18359
+ }
18360
+ if (!currentClientInteraction) {
17990
18361
  this.logger.info("0le6uv", "");
17991
18362
  return null;
17992
18363
  }
@@ -17994,7 +18365,7 @@
17994
18365
  if (interactionType === INTERACTION_TYPE.SIGNOUT) {
17995
18366
  this.logger.verbose("1ywcv2", "");
17996
18367
  this.browserStorage.setInteractionInProgress(false);
17997
- return Promise.resolve(null);
18368
+ return null;
17998
18369
  }
17999
18370
  const loggedInAccounts = this.getAllAccounts();
18000
18371
  const platformBrokerRequest = this.browserStorage.getCachedNativeRequest();
@@ -18024,7 +18395,9 @@
18024
18395
  rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
18025
18396
  this.logger.trace("0znzs5", correlationId);
18026
18397
  const redirectClient = this.createRedirectClient(correlationId);
18027
- redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options);
18398
+ redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options?.hash
18399
+ ? options
18400
+ : { ...options, hash: responseString });
18028
18401
  }
18029
18402
  }
18030
18403
  catch (e) {
@@ -18172,6 +18545,9 @@
18172
18545
  this.logger.verbose("0ch87b", correlationId);
18173
18546
  preflightCheck(this.initialized, atPopupMeasurement, this.config, request);
18174
18547
  this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN, request.overrideInteractionInProgress, correlationId);
18548
+ if (request.overrideInteractionInProgress) {
18549
+ cancelPendingPopupPollingResponse(this.logger);
18550
+ }
18175
18551
  }
18176
18552
  catch (e) {
18177
18553
  // Since this function is syncronous we need to reject
@@ -20547,6 +20923,79 @@
20547
20923
  */
20548
20924
  NestedAppOperatingContext.ID = "NestedAppOperatingContext";
20549
20925
 
20926
+ /*
20927
+ * Copyright (c) Microsoft Corporation. All rights reserved.
20928
+ * Licensed under the MIT License.
20929
+ */
20930
+ const IFRAME_POLL_INTERVAL_MS = 50;
20931
+ const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
20932
+ /**
20933
+ * Monitors an iframe content window until it loads a URL with a known hash, or hits a specified timeout.
20934
+ *
20935
+ * @param iframe - The hidden iframe to monitor.
20936
+ * @param timeout - Maximum time (ms) to wait for navigation before rejecting with
20937
+ * `monitor_window_timeout`.
20938
+ * @param logger - Logger instance.
20939
+ * @param correlationId
20940
+ * @param responseMode - `"query"` or `"fragment"` — determines whether to read
20941
+ * `location.search` or `location.hash`. Any value other than `"query"` is
20942
+ * treated as fragment.
20943
+ */
20944
+ async function monitorIframeForHash(iframe, timeout, logger, correlationId, responseMode) {
20945
+ return new Promise((resolve, reject) => {
20946
+ if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {
20947
+ logger.warning(`137tec ${timeout} ${DEFAULT_IFRAME_TIMEOUT_MS}`, correlationId);
20948
+ }
20949
+ /*
20950
+ * Polling for iframes can be purely timing based,
20951
+ * since we don't need to account for interaction.
20952
+ */
20953
+ const timeoutId = window.setTimeout(() => {
20954
+ window.clearInterval(intervalId);
20955
+ reject(new AuthError(timedOut, correlationId, undefined, "monitor_window_timeout"));
20956
+ }, timeout);
20957
+ const intervalId = window.setInterval(() => {
20958
+ const contentWindow = iframe.contentWindow;
20959
+ if (!contentWindow) {
20960
+ return;
20961
+ }
20962
+ let href = "";
20963
+ try {
20964
+ /*
20965
+ * Will throw if cross origin,
20966
+ * which should be caught and ignored
20967
+ * since we need the interval to keep running while on STS UI.
20968
+ */
20969
+ href = contentWindow.location.href;
20970
+ }
20971
+ catch (e) { }
20972
+ if (!href || href === "about:blank") {
20973
+ return;
20974
+ }
20975
+ const responseString = responseMode === ResponseMode$1.QUERY
20976
+ ? contentWindow.location.search
20977
+ : contentWindow.location.hash;
20978
+ window.clearTimeout(timeoutId);
20979
+ window.clearInterval(intervalId);
20980
+ resolve(responseString);
20981
+ }, IFRAME_POLL_INTERVAL_MS);
20982
+ }).finally(() => {
20983
+ /*
20984
+ * Strip auth-response params from the iframe URL. The monitor owns the
20985
+ * iframe for the duration of the poll, mirroring cleanPopup in
20986
+ * PopupMonitor.
20987
+ */
20988
+ try {
20989
+ if (iframe.contentWindow) {
20990
+ clearAuthResponseFromUrl(iframe.contentWindow);
20991
+ }
20992
+ }
20993
+ catch {
20994
+ // Iframe may already be navigated away or cross-origin; ignore.
20995
+ }
20996
+ });
20997
+ }
20998
+
20550
20999
  /*
20551
21000
  * Copyright (c) Microsoft Corporation. All rights reserved.
20552
21001
  * Licensed under the MIT License.
@@ -20589,27 +21038,29 @@
20589
21038
  /**
20590
21039
  * Waits for the auth response from a popup window opened by MSAL.
20591
21040
  *
20592
- * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge.
20593
- * Subclasses must return the raw response string (hash/query/fragment), or reject
20594
- * with an `AuthError` on failure.
21041
+ * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
21042
+ * or to the v4-style same-origin location poller when
21043
+ * `system.enableLegacyPolling` is set. Subclasses must return the raw response
21044
+ * string (hash/query/fragment), or reject with an `AuthError` on failure.
20595
21045
  *
20596
21046
  * @internal
20597
21047
  * @param request The in-flight authorization or end-session request.
20598
21048
  * @param popupWindow The popup window opened by MSAL.
20599
21049
  * @param popupWindowParent The parent window that opened the popup.
20600
21050
  */
20601
- async waitForPopupResponse(request,
20602
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
20603
- popupWindow,
20604
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
20605
- popupWindowParent) {
21051
+ async waitForPopupResponse(request, popupWindow, popupWindowParent) {
20606
21052
  const controller = this.controller;
20607
- return waitForBridgeResponse(controller.getConfiguration().system.popupBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient());
21053
+ const config = controller.getConfiguration();
21054
+ if (config.system.enableLegacyPolling) {
21055
+ return waitForPopupPollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), request, popupWindow, popupWindowParent);
21056
+ }
21057
+ return waitForBridgeResponse(config.system.popupBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient());
20608
21058
  }
20609
21059
  /**
20610
21060
  * Waits for the auth response from a hidden iframe used by MSAL silent flows.
20611
21061
  *
20612
- * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge.
21062
+ * The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
21063
+ * or to the v4-style location poller when `system.enableLegacyPolling` is set.
20613
21064
  * Subclasses must return the raw response string (hash/query/fragment), or reject
20614
21065
  * with an `AuthError` on failure.
20615
21066
  *
@@ -20617,11 +21068,12 @@
20617
21068
  * @param iframe The hidden iframe MSAL attached to the document.
20618
21069
  * @param request The in-flight authorization request.
20619
21070
  */
20620
- async waitForIframeResponse(
20621
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
20622
- iframe, request) {
21071
+ async waitForIframeResponse(iframe, request) {
20623
21072
  const controller = this.controller;
20624
21073
  const config = controller.getConfiguration();
21074
+ if (config.system.enableLegacyPolling) {
21075
+ return waitForIframePollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), iframe, request);
21076
+ }
20625
21077
  return waitForBridgeResponse(config.system.iframeBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient(), config.experimental);
20626
21078
  }
20627
21079
  /**
@@ -20890,6 +21342,40 @@
20890
21342
  const pca = new PublicClientApplication(configuration);
20891
21343
  await pca.initialize();
20892
21344
  return pca;
21345
+ }
21346
+ /**
21347
+ * Collects a popup auth response using the v4-style same-origin location
21348
+ * poller instead of the `BroadcastChannel` redirect bridge.
21349
+ */
21350
+ async function waitForPopupPollingResponse(config, logger, performanceClient, request, popupWindow, popupWindowParent) {
21351
+ const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
21352
+ ? ResponseMode$1.QUERY
21353
+ : ResponseMode$1.FRAGMENT;
21354
+ performanceClient.addFields({ usesLegacyPolling: true }, request.correlationId);
21355
+ const unloadHandler = () => {
21356
+ try {
21357
+ if (popupWindow && !popupWindow.closed) {
21358
+ popupWindow.close();
21359
+ }
21360
+ }
21361
+ catch {
21362
+ /* ignore */
21363
+ }
21364
+ };
21365
+ popupWindowParent.addEventListener("beforeunload", unloadHandler);
21366
+ return monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadHandler, request.correlationId);
21367
+ }
21368
+ /**
21369
+ * Collects a silent-iframe auth response using the v4-style location poller
21370
+ * instead of the `BroadcastChannel` redirect bridge.
21371
+ */
21372
+ async function waitForIframePollingResponse(config, logger, performanceClient, iframe, request) {
21373
+ const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
21374
+ ? ResponseMode$1.QUERY
21375
+ : ResponseMode$1.FRAGMENT;
21376
+ const iframePollTimeout = config.system.iframeBridgeTimeout;
21377
+ performanceClient.addFields({ usesLegacyPolling: true, iframePollTimeout }, request.correlationId);
21378
+ return monitorIframeForHash(iframe, iframePollTimeout, logger, request.correlationId, responseMode);
20893
21379
  }
20894
21380
 
20895
21381
  /*
@@ -21523,7 +22009,7 @@
21523
22009
  exports.ClientAuthErrorCodes = ClientAuthErrorCodes;
21524
22010
  exports.ClientConfigurationError = ClientConfigurationError;
21525
22011
  exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
21526
- exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS;
22012
+ exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS$1;
21527
22013
  exports.EventHandler = EventHandler;
21528
22014
  exports.EventMessageUtils = EventMessageUtils;
21529
22015
  exports.EventType = EventType;