@azure/msal-browser 5.15.0 → 5.17.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 (396) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  3. package/dist/app/PublicClientApplication.mjs +1 -1
  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/PlatformAuthDOMHandler.mjs.map +1 -1
  8. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  9. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
  10. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  11. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
  12. package/dist/cache/AccountManager.mjs +1 -1
  13. package/dist/cache/AccountManager.mjs.map +1 -1
  14. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  15. package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
  16. package/dist/cache/BrowserCacheManager.mjs +4 -2
  17. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  18. package/dist/cache/CacheHelpers.mjs +1 -1
  19. package/dist/cache/CacheHelpers.mjs.map +1 -1
  20. package/dist/cache/CacheKeys.mjs +1 -1
  21. package/dist/cache/CacheKeys.mjs.map +1 -1
  22. package/dist/cache/CookieStorage.mjs +1 -1
  23. package/dist/cache/CookieStorage.mjs.map +1 -1
  24. package/dist/cache/DatabaseStorage.mjs +1 -1
  25. package/dist/cache/DatabaseStorage.mjs.map +1 -1
  26. package/dist/cache/EncryptedData.mjs +1 -1
  27. package/dist/cache/LocalStorage.mjs +1 -1
  28. package/dist/cache/LocalStorage.mjs.map +1 -1
  29. package/dist/cache/MemoryStorage.mjs +1 -1
  30. package/dist/cache/MemoryStorage.mjs.map +1 -1
  31. package/dist/cache/SessionStorage.mjs +1 -1
  32. package/dist/cache/SessionStorage.mjs.map +1 -1
  33. package/dist/cache/TokenCache.mjs +1 -1
  34. package/dist/cache/TokenCache.mjs.map +1 -1
  35. package/dist/config/Configuration.mjs +2 -1
  36. package/dist/config/Configuration.mjs.map +1 -1
  37. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  38. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  39. package/dist/controllers/StandardController.mjs +2 -2
  40. package/dist/controllers/StandardController.mjs.map +1 -1
  41. package/dist/crypto/BrowserCrypto.mjs +1 -1
  42. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  43. package/dist/crypto/CryptoOps.mjs +1 -1
  44. package/dist/crypto/CryptoOps.mjs.map +1 -1
  45. package/dist/crypto/PkceGenerator.mjs +1 -1
  46. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  47. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  48. package/dist/crypto/SignedHttpRequest.mjs.map +1 -1
  49. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  50. package/dist/custom_auth/CustomAuthConstants.mjs.map +1 -1
  51. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  52. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  53. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  54. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  55. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  56. package/dist/custom_auth/core/CustomAuthAuthority.mjs.map +1 -1
  57. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  58. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs.map +1 -1
  59. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  60. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs.map +1 -1
  61. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  62. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs.map +1 -1
  63. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  64. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  65. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs.map +1 -1
  66. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  67. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
  68. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  69. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +1 -1
  70. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  71. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs.map +1 -1
  72. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  73. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs.map +1 -1
  74. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  75. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +1 -1
  76. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  77. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs.map +1 -1
  78. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  79. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
  80. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  81. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +1 -1
  82. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  83. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs.map +1 -1
  84. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  85. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs.map +1 -1
  86. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  87. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
  88. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  89. package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +1 -1
  90. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  91. package/dist/custom_auth/core/error/CustomAuthError.mjs.map +1 -1
  92. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  93. package/dist/custom_auth/core/error/HttpError.mjs.map +1 -1
  94. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  95. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  96. package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
  97. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  98. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs.map +1 -1
  99. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  100. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  101. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs.map +1 -1
  102. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  103. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs.map +1 -1
  104. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  105. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs.map +1 -1
  106. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  107. package/dist/custom_auth/core/error/ParsedUrlError.mjs.map +1 -1
  108. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  109. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  110. package/dist/custom_auth/core/error/UnexpectedError.mjs.map +1 -1
  111. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  112. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs.map +1 -1
  113. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  114. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs.map +1 -1
  115. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  116. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs.map +1 -1
  117. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  118. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs.map +1 -1
  119. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  120. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs.map +1 -1
  121. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  122. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs.map +1 -1
  123. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  124. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  125. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs.map +1 -1
  126. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  127. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  128. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs.map +1 -1
  129. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  130. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs.map +1 -1
  131. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  132. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  133. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs.map +1 -1
  134. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  135. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs.map +1 -1
  136. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  137. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs.map +1 -1
  138. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  139. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs.map +1 -1
  140. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  141. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  142. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  143. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs.map +1 -1
  144. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  145. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs.map +1 -1
  146. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  147. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  148. package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
  149. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  150. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs.map +1 -1
  151. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  152. package/dist/custom_auth/core/utils/UrlUtils.mjs.map +1 -1
  153. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  154. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs.map +1 -1
  155. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  156. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs.map +1 -1
  157. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  158. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs.map +1 -1
  159. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  160. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs.map +1 -1
  161. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  162. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs.map +1 -1
  163. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  164. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs.map +1 -1
  165. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  166. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs.map +1 -1
  167. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  168. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs.map +1 -1
  169. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  170. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
  171. package/dist/custom_auth/index.mjs +1 -1
  172. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  173. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs.map +1 -1
  174. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  175. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs.map +1 -1
  176. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  177. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs.map +1 -1
  178. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  179. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs.map +1 -1
  180. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  181. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs.map +1 -1
  182. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  183. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs.map +1 -1
  184. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  185. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs.map +1 -1
  186. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  187. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs.map +1 -1
  188. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  189. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs.map +1 -1
  190. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  191. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs.map +1 -1
  192. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  193. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs.map +1 -1
  194. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  195. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs.map +1 -1
  196. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  197. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs.map +1 -1
  198. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  199. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs.map +1 -1
  200. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  201. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs.map +1 -1
  202. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  203. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
  204. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  205. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
  206. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  207. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +1 -1
  208. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  209. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs.map +1 -1
  210. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  211. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs.map +1 -1
  212. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  213. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs.map +1 -1
  214. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  215. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs.map +1 -1
  216. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  217. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs.map +1 -1
  218. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  219. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs.map +1 -1
  220. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  221. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs.map +1 -1
  222. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  223. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  224. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs.map +1 -1
  225. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  226. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs.map +1 -1
  227. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  228. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs.map +1 -1
  229. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  230. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs.map +1 -1
  231. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  232. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs.map +1 -1
  233. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  234. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs.map +1 -1
  235. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  236. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs.map +1 -1
  237. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  238. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs.map +1 -1
  239. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  240. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs.map +1 -1
  241. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  242. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs.map +1 -1
  243. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  244. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs.map +1 -1
  245. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  246. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs.map +1 -1
  247. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  248. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs.map +1 -1
  249. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  250. package/dist/encode/Base64Decode.mjs +1 -1
  251. package/dist/encode/Base64Encode.mjs +1 -1
  252. package/dist/error/BrowserAuthError.mjs +1 -1
  253. package/dist/error/BrowserAuthError.mjs.map +1 -1
  254. package/dist/error/BrowserAuthErrorCodes.mjs +3 -2
  255. package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
  256. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  257. package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
  258. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  259. package/dist/error/NativeAuthError.mjs +1 -1
  260. package/dist/error/NativeAuthError.mjs.map +1 -1
  261. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  262. package/dist/error/NestedAppAuthError.mjs +1 -1
  263. package/dist/error/NestedAppAuthError.mjs.map +1 -1
  264. package/dist/event/EventHandler.mjs +1 -1
  265. package/dist/event/EventHandler.mjs.map +1 -1
  266. package/dist/event/EventMessage.mjs +1 -1
  267. package/dist/event/EventMessage.mjs.map +1 -1
  268. package/dist/event/EventType.mjs +1 -1
  269. package/dist/event/EventType.mjs.map +1 -1
  270. package/dist/index.mjs +1 -1
  271. package/dist/index.mjs.map +1 -1
  272. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  273. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  274. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  275. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs.map +1 -1
  276. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  277. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  278. package/dist/interaction_client/PopupClient.mjs +77 -10
  279. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  280. package/dist/interaction_client/RedirectClient.mjs +1 -1
  281. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  282. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  283. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  284. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  285. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  286. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  287. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  288. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  289. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  290. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  291. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  292. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  293. package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
  294. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  295. package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
  296. package/dist/log-strings-mapping.json +7 -3
  297. package/dist/naa/BridgeError.mjs +1 -1
  298. package/dist/naa/BridgeProxy.mjs +2 -2
  299. package/dist/naa/BridgeProxy.mjs.map +1 -1
  300. package/dist/naa/BridgeStatusCode.mjs +1 -1
  301. package/dist/naa/BridgeStatusCode.mjs.map +1 -1
  302. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  303. package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
  304. package/dist/navigation/NavigationClient.mjs +1 -1
  305. package/dist/navigation/NavigationClient.mjs.map +1 -1
  306. package/dist/network/FetchClient.mjs +1 -1
  307. package/dist/network/FetchClient.mjs.map +1 -1
  308. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  309. package/dist/operatingcontext/BaseOperatingContext.mjs.map +1 -1
  310. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  311. package/dist/operatingcontext/NestedAppOperatingContext.mjs.map +1 -1
  312. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  313. package/dist/operatingcontext/StandardOperatingContext.mjs.map +1 -1
  314. package/dist/packageMetadata.mjs +2 -2
  315. package/dist/popup_relay/constants.mjs +21 -0
  316. package/dist/popup_relay/constants.mjs.map +1 -0
  317. package/dist/popup_relay/index.mjs +163 -0
  318. package/dist/popup_relay/index.mjs.map +1 -0
  319. package/dist/popup_relay/relayClient.mjs +114 -0
  320. package/dist/popup_relay/relayClient.mjs.map +1 -0
  321. package/dist/protocol/Authorize.mjs +42 -24
  322. package/dist/protocol/Authorize.mjs.map +1 -1
  323. package/dist/redirect_bridge/index.mjs +1 -1
  324. package/dist/redirect_bridge/index.mjs.map +1 -1
  325. package/dist/request/RequestHelpers.mjs +1 -1
  326. package/dist/request/RequestHelpers.mjs.map +1 -1
  327. package/dist/response/ResponseHandler.mjs +1 -1
  328. package/dist/response/ResponseHandler.mjs.map +1 -1
  329. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  330. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  331. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  332. package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
  333. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  334. package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
  335. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  336. package/dist/utils/BrowserConstants.mjs +1 -1
  337. package/dist/utils/BrowserConstants.mjs.map +1 -1
  338. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  339. package/dist/utils/BrowserProtocolUtils.mjs.map +1 -1
  340. package/dist/utils/BrowserUtils.mjs +2 -2
  341. package/dist/utils/BrowserUtils.mjs.map +1 -1
  342. package/dist/utils/Helpers.mjs +1 -1
  343. package/dist/utils/Helpers.mjs.map +1 -1
  344. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  345. package/dist/utils/MsalFrameStatsUtils.mjs.map +1 -1
  346. package/lib/custom-auth-path/log-strings-mapping.json +7 -3
  347. package/lib/custom-auth-path/msal-custom-auth.cjs +5966 -5754
  348. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  349. package/lib/custom-auth-path/msal-custom-auth.js +5966 -5754
  350. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  351. package/lib/log-strings-mapping.json +7 -3
  352. package/lib/msal-browser.cjs +6801 -6567
  353. package/lib/msal-browser.cjs.map +1 -1
  354. package/lib/msal-browser.js +6801 -6567
  355. package/lib/msal-browser.js.map +1 -1
  356. package/lib/msal-browser.min.js +2 -2
  357. package/lib/popup-relay/msal-popup-relay.cjs +278 -0
  358. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -0
  359. package/lib/popup-relay/msal-popup-relay.js +284 -0
  360. package/lib/popup-relay/msal-popup-relay.js.map +1 -0
  361. package/lib/popup-relay/msal-popup-relay.min.js +2 -0
  362. package/lib/redirect-bridge/msal-redirect-bridge.cjs +39 -39
  363. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  364. package/lib/redirect-bridge/msal-redirect-bridge.js +39 -39
  365. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  366. package/lib/redirect-bridge/msal-redirect-bridge.min.js +2 -2
  367. package/package.json +14 -3
  368. package/scripts/README.md +112 -0
  369. package/scripts/decode-logs.cjs +822 -0
  370. package/src/cache/BrowserCacheManager.ts +3 -4
  371. package/src/config/Configuration.ts +18 -0
  372. package/src/error/BrowserAuthErrorCodes.ts +1 -0
  373. package/src/interaction_client/PopupClient.ts +137 -23
  374. package/src/packageMetadata.ts +1 -1
  375. package/src/popup_relay/constants.ts +17 -0
  376. package/src/popup_relay/index.ts +221 -0
  377. package/src/popup_relay/relayClient.ts +178 -0
  378. package/src/protocol/Authorize.ts +76 -27
  379. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  380. package/types/config/Configuration.d.ts +16 -0
  381. package/types/config/Configuration.d.ts.map +1 -1
  382. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  383. package/types/error/BrowserAuthErrorCodes.d.ts +1 -0
  384. package/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
  385. package/types/interaction_client/PopupClient.d.ts +13 -0
  386. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  387. package/types/packageMetadata.d.ts +1 -1
  388. package/types/popup_relay/constants.d.ts +13 -0
  389. package/types/popup_relay/constants.d.ts.map +1 -0
  390. package/types/popup_relay/index.d.cts +1 -0
  391. package/types/popup_relay/index.d.ts +42 -0
  392. package/types/popup_relay/index.d.ts.map +1 -0
  393. package/types/popup_relay/relayClient.d.ts +43 -0
  394. package/types/popup_relay/relayClient.d.ts.map +1 -0
  395. package/types/protocol/Authorize.d.ts +25 -0
  396. package/types/protocol/Authorize.d.ts.map +1 -1
@@ -0,0 +1,278 @@
1
+ /*! @azure/msal-browser v5.17.0 2026-07-07 */
2
+ 'use strict';
3
+ 'use strict';
4
+
5
+ /*
6
+ * Copyright (c) Microsoft Corporation. All rights reserved.
7
+ * Licensed under the MIT License.
8
+ */
9
+ /**
10
+ * postMessage envelope type used to relay an auth response from a popup-relay
11
+ * page (see `runPopupRelay`) back to the embedded frame that opened it. See
12
+ * {@link BrowserAuthOptions.popupRelayUri}.
13
+ *
14
+ * Kept dependency-free so both the relay-page entry (`./index.js`) and the
15
+ * client-side helpers (`./relayClient.js`) can import it without either bundle
16
+ * pulling in the other's dependencies.
17
+ *
18
+ * @internal
19
+ */
20
+ const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
21
+
22
+ /*! @azure/msal-common v16.11.1 2026-07-07 */
23
+ /*
24
+ * Copyright (c) Microsoft Corporation. All rights reserved.
25
+ * Licensed under the MIT License.
26
+ */
27
+ function getDefaultErrorMessage$1(code) {
28
+ return `See https://aka.ms/msal.js.errors#${code} for details`;
29
+ }
30
+ /**
31
+ * General error class thrown by the MSAL.js library.
32
+ */
33
+ class AuthError extends Error {
34
+ constructor(errorCode, correlationId, errorMessage, suberror) {
35
+ const message = errorMessage ||
36
+ (errorCode ? getDefaultErrorMessage$1(errorCode) : "");
37
+ const errorString = message ? `${errorCode}: ${message}` : errorCode;
38
+ super(errorString);
39
+ Object.setPrototypeOf(this, AuthError.prototype);
40
+ this.errorCode = errorCode || "";
41
+ this.errorMessage = message || "";
42
+ this.subError = suberror || "";
43
+ this.correlationId = correlationId;
44
+ this.name = "AuthError";
45
+ }
46
+ }
47
+
48
+ /*
49
+ * Copyright (c) Microsoft Corporation. All rights reserved.
50
+ * Licensed under the MIT License.
51
+ */
52
+ const popupWindowError = "popup_window_error";
53
+ const userCancelled = "user_cancelled";
54
+ const popupRelayUnsupportedFlow = "popup_relay_unsupported_flow";
55
+ const timedOut = "timed_out";
56
+
57
+ /*
58
+ * Copyright (c) Microsoft Corporation. All rights reserved.
59
+ * Licensed under the MIT License.
60
+ */
61
+ function getDefaultErrorMessage(code) {
62
+ return `See https://aka.ms/msal.js.errors#${code} for details`;
63
+ }
64
+ /**
65
+ * Browser library error class thrown by the MSAL.js library for SPAs
66
+ */
67
+ class BrowserAuthError extends AuthError {
68
+ constructor(errorCode, correlationId, subError) {
69
+ super(errorCode, correlationId, getDefaultErrorMessage(errorCode), subError);
70
+ Object.setPrototypeOf(this, BrowserAuthError.prototype);
71
+ this.name = "BrowserAuthError";
72
+ }
73
+ }
74
+ function createBrowserAuthError(errorCode, correlationId, subError) {
75
+ return new BrowserAuthError(errorCode, correlationId, subError);
76
+ }
77
+
78
+ /*
79
+ * Copyright (c) Microsoft Corporation. All rights reserved.
80
+ * Licensed under the MIT License.
81
+ */
82
+ /*
83
+ * Interaction type of the API - used for state and telemetry
84
+ */
85
+ var InteractionType;
86
+ (function (InteractionType) {
87
+ InteractionType["Redirect"] = "redirect";
88
+ InteractionType["Popup"] = "popup";
89
+ InteractionType["Silent"] = "silent";
90
+ InteractionType["None"] = "none";
91
+ })(InteractionType || (InteractionType = {}));
92
+
93
+ /*
94
+ * Copyright (c) Microsoft Corporation. All rights reserved.
95
+ * Licensed under the MIT License.
96
+ */
97
+ /**
98
+ * Creates a POST `<form>` in the provided document with the given auth
99
+ * parameters as hidden inputs, targeting `action`. Shared by the popup auth
100
+ * flows (`getEARForm` / `getCodeForm`) and the popup-relay page
101
+ * (`runPopupRelay`) so the form is built one way only.
102
+ *
103
+ * @param frame - document to create the form in
104
+ * @param action - form action (the /authorize URL)
105
+ * @param fields - POST-body fields
106
+ * @internal
107
+ */
108
+ function createForm(frame, action, fields) {
109
+ const form = frame.createElement("form");
110
+ form.method = "post";
111
+ form.action = action;
112
+ Object.keys(fields).forEach((name) => {
113
+ const input = frame.createElement("input");
114
+ input.hidden = true;
115
+ input.name = name;
116
+ input.value = fields[name];
117
+ form.appendChild(input);
118
+ });
119
+ frame.body.appendChild(form);
120
+ return form;
121
+ }
122
+
123
+ /*
124
+ * Copyright (c) Microsoft Corporation. All rights reserved.
125
+ * Licensed under the MIT License.
126
+ */
127
+ const DEFAULT_POPUP_RELAY_TIMEOUT_MS = 300000;
128
+ const DEFAULT_POPUP_RELAY_WIDTH = 520;
129
+ const DEFAULT_POPUP_RELAY_HEIGHT = 640;
130
+ /**
131
+ * Builds the `window.open` features string for the IdP child popup from a
132
+ * {@link PopupWindowAttributes}, mirroring the shape used by
133
+ * `PopupRequest.popupWindowAttributes`.
134
+ */
135
+ function buildChildPopupFeatures(attributes) {
136
+ const width = attributes?.popupSize?.width || DEFAULT_POPUP_RELAY_WIDTH;
137
+ const height = attributes?.popupSize?.height || DEFAULT_POPUP_RELAY_HEIGHT;
138
+ const features = [`width=${width}`, `height=${height}`];
139
+ if (attributes?.popupPosition?.top !== undefined) {
140
+ features.push(`top=${attributes.popupPosition.top}`);
141
+ }
142
+ if (attributes?.popupPosition?.left !== undefined) {
143
+ features.push(`left=${attributes.popupPosition.left}`);
144
+ }
145
+ features.push("scrollbars=yes");
146
+ return features.join(",");
147
+ }
148
+ /**
149
+ * Entry point for the top-level "popup-relay" page referenced by
150
+ * `auth.popupRelayUri`. Call this from the relay page (which MSAL opens as a
151
+ * top-level popup from inside an embedded, cross-origin iframe). It:
152
+ *
153
+ * 1. Reads the IdP navigation MSAL passed in this page's hash (a GET URL, or a
154
+ * POST form for the form_post / EAR response modes), then scrubs the hash.
155
+ * 2. Opens the IdP child popup and performs that navigation (the relay page
156
+ * stays put, so its `window.opener` link back to the embedded frame
157
+ * survives COOP).
158
+ * 3. Waits for the child's redirect URI page (which must run the redirect
159
+ * bridge, `broadcastResponseToMainFrame`) to broadcast the raw auth
160
+ * response over a same-origin `BroadcastChannel`.
161
+ * 4. Relays that raw response back to the embedded frame via
162
+ * `opener.postMessage`, posting only to its own (same) origin, then closes.
163
+ *
164
+ * The embedded frame keeps the PKCE verifier (and EAR private key) and exchanges
165
+ * the relayed response itself — no token, verifier, or private key ever crosses
166
+ * a window boundary.
167
+ *
168
+ * Note: the child popup is opened when this function runs, so call it from a
169
+ * user gesture (e.g. a "Continue" button click) to avoid popup blockers.
170
+ *
171
+ * @param options - {@link PopupRelayOptions}
172
+ */
173
+ function runPopupRelay(options) {
174
+ const opener = window.opener;
175
+ const targetOrigin = window.location.origin;
176
+ const hashParams = new URLSearchParams(window.location.hash.replace(/^#/, ""));
177
+ const rawReq = hashParams.get("req") || "";
178
+ // Scrub the relayed request out of the relay page's own URL immediately.
179
+ if (typeof window.history.replaceState === "function") {
180
+ window.history.replaceState(null, "", window.location.origin + window.location.pathname);
181
+ }
182
+ if (!opener) {
183
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_no_opener");
184
+ }
185
+ let request;
186
+ try {
187
+ request = JSON.parse(rawReq);
188
+ }
189
+ catch (e) {
190
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
191
+ }
192
+ if (!request || !request.id) {
193
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
194
+ }
195
+ const id = request.id;
196
+ const channel = new BroadcastChannel(id);
197
+ let settled = false;
198
+ /*
199
+ * Timer handles are kept on a const holder so relay() (declared before the
200
+ * timers are created) can clear them — `let` handles trip prefer-const, and
201
+ * `const` handles can't be referenced before assignment (TDZ).
202
+ */
203
+ const timers = {};
204
+ const relay = (message) => {
205
+ if (settled) {
206
+ return;
207
+ }
208
+ settled = true;
209
+ try {
210
+ channel.close();
211
+ }
212
+ catch (e) {
213
+ /* ignore */
214
+ }
215
+ clearInterval(timers.closedPoll);
216
+ clearTimeout(timers.timeoutId);
217
+ opener.postMessage({ type: POPUP_RELAY_RESPONSE_TYPE, id, ...message }, targetOrigin);
218
+ setTimeout(() => {
219
+ try {
220
+ window.close();
221
+ }
222
+ catch (e) {
223
+ /* ignore */
224
+ }
225
+ }, 0);
226
+ };
227
+ // The redirect bridge broadcasts the raw auth response payload here.
228
+ channel.onmessage = (event) => {
229
+ const payload = event.data && event.data.payload;
230
+ if (payload) {
231
+ relay({ payload });
232
+ }
233
+ };
234
+ const features = buildChildPopupFeatures(options?.popupWindowAttributes);
235
+ const childPopup = request.method === "POST"
236
+ ? window.open("about:blank", "msalPopupRelayChild", features)
237
+ : window.open(request.url, "msalPopupRelayChild", features);
238
+ if (!childPopup) {
239
+ relay({ error: popupWindowError });
240
+ return;
241
+ }
242
+ if (request.method === "POST") {
243
+ createForm(childPopup.document, request.action, request.fields).submit();
244
+ }
245
+ timers.closedPoll = window.setInterval(() => {
246
+ if (childPopup.closed && !settled) {
247
+ /*
248
+ * The popup is gone, so the overall timeout no longer applies —
249
+ * drop it and report cancellation. A successful sign-in settles
250
+ * first: the redirect bridge broadcasts the response before it
251
+ * closes the popup, so onmessage runs on the
252
+ * next event-loop turn, well before this 500ms poll observes the
253
+ * close — the `!settled` guard then skips cancellation.
254
+ */
255
+ clearTimeout(timers.timeoutId);
256
+ relay({ error: userCancelled });
257
+ }
258
+ }, 500);
259
+ timers.timeoutId = window.setTimeout(() => {
260
+ if (!settled) {
261
+ /*
262
+ * Stop the close poll before we close the popup ourselves, so it
263
+ * can't observe the close and report user_cancelled instead.
264
+ */
265
+ clearInterval(timers.closedPoll);
266
+ try {
267
+ childPopup.close();
268
+ }
269
+ catch (e) {
270
+ /* ignore */
271
+ }
272
+ relay({ error: timedOut });
273
+ }
274
+ }, options?.timeoutMs || DEFAULT_POPUP_RELAY_TIMEOUT_MS);
275
+ }
276
+
277
+ exports.runPopupRelay = runPopupRelay;
278
+ //# sourceMappingURL=msal-popup-relay.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msal-popup-relay.cjs","sources":["../../../../src/popup_relay/constants.ts","../../../msal-common/dist-browser/error/AuthError.mjs","../../../../src/error/BrowserAuthErrorCodes.ts","../../../../src/error/BrowserAuthError.ts","../../../../src/utils/BrowserConstants.ts","../../../../src/protocol/Authorize.ts","../../../../src/popup_relay/index.ts"],"sourcesContent":[null,"/*! @azure/msal-common v16.11.1 2026-07-07 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction getDefaultErrorMessage(code) {\r\n return `See https://aka.ms/msal.js.errors#${code} for details`;\r\n}\r\n/**\r\n * General error class thrown by the MSAL.js library.\r\n */\r\nclass AuthError extends Error {\r\n constructor(errorCode, correlationId, errorMessage, suberror) {\r\n const message = errorMessage ||\r\n (errorCode ? getDefaultErrorMessage(errorCode) : \"\");\r\n const errorString = message ? `${errorCode}: ${message}` : errorCode;\r\n super(errorString);\r\n Object.setPrototypeOf(this, AuthError.prototype);\r\n this.errorCode = errorCode || \"\";\r\n this.errorMessage = message || \"\";\r\n this.subError = suberror || \"\";\r\n this.correlationId = correlationId;\r\n this.name = \"AuthError\";\r\n }\r\n}\r\nfunction createAuthError(code, correlationId, additionalMessage) {\r\n return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));\r\n}\n\nexport { AuthError, createAuthError, getDefaultErrorMessage };\n//# sourceMappingURL=AuthError.mjs.map\n",null,null,null,null,null],"names":["getDefaultErrorMessage","BrowserAuthErrorCodes.popupRelayUnsupportedFlow","BrowserAuthErrorCodes.popupWindowError","BrowserAuthErrorCodes.userCancelled","BrowserAuthErrorCodes.timedOut"],"mappings":";;;;AAAA;;;AAGG;AAEH;;;;;;;;;;AAUG;AACI,MAAM,yBAAyB,GAAG,8BAA8B;;AChBvE;AAEA;AACA;AACA;AACA;AACA,SAASA,wBAAsB,CAAC,IAAI,EAAE;AACtC,IAAI,OAAO,CAAC,kCAAkC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;AACnE,CAAC;AACD;AACA;AACA;AACA,MAAM,SAAS,SAAS,KAAK,CAAC;AAC9B,IAAI,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE;AAClE,QAAQ,MAAM,OAAO,GAAG,YAAY;AACpC,aAAa,SAAS,GAAGA,wBAAsB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC;AACjE,QAAQ,MAAM,WAAW,GAAG,OAAO,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;AAC7E,QAAQ,KAAK,CAAC,WAAW,CAAC,CAAC;AAC3B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;AACzD,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS,I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A,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE;AAC/B;;;;;;;AAOG;AACH,YAAA,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC/B,KAAK,CAAC,EAAE,KAAK,EAAEC,aAAmC,EAAE,CAAC,CAAC;AACzD,QAAA,CAAA;IACL,CAAC,EAAE,GAAG,CAAC,CAAC;IAER,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAK;QACtC,IAAI,CAAC,OAAO,EAAE;AACV;;;AAGG;AACH,YAAA,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACjC,IAAI;gBACA,UAAU,CAAC,KAAK,EAAE,CAAC;AACtB,YAAA,CAAA;AAAC,YAAA,OAAO,CAAC,EAAE;;AAEX,YAAA,CAAA;YACD,KAAK,CAAC,EAAE,KAAK,EAAEC,QAA8B,EAAE,CAAC,CAAC;AACpD,QAAA,CAAA;AACL,IAAA,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,8BAA8B,CAAC,CAAC;AAC7D;;;;"}
@@ -0,0 +1,284 @@
1
+ /*! @azure/msal-browser v5.17.0 2026-07-07 */
2
+ 'use strict';
3
+ (function (global, factory) {
4
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
5
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
6
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msalPopupRelay = {}));
7
+ })(this, (function (exports) { 'use strict';
8
+
9
+ /*
10
+ * Copyright (c) Microsoft Corporation. All rights reserved.
11
+ * Licensed under the MIT License.
12
+ */
13
+ /**
14
+ * postMessage envelope type used to relay an auth response from a popup-relay
15
+ * page (see `runPopupRelay`) back to the embedded frame that opened it. See
16
+ * {@link BrowserAuthOptions.popupRelayUri}.
17
+ *
18
+ * Kept dependency-free so both the relay-page entry (`./index.js`) and the
19
+ * client-side helpers (`./relayClient.js`) can import it without either bundle
20
+ * pulling in the other's dependencies.
21
+ *
22
+ * @internal
23
+ */
24
+ const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
25
+
26
+ /*! @azure/msal-common v16.11.1 2026-07-07 */
27
+ /*
28
+ * Copyright (c) Microsoft Corporation. All rights reserved.
29
+ * Licensed under the MIT License.
30
+ */
31
+ function getDefaultErrorMessage$1(code) {
32
+ return `See https://aka.ms/msal.js.errors#${code} for details`;
33
+ }
34
+ /**
35
+ * General error class thrown by the MSAL.js library.
36
+ */
37
+ class AuthError extends Error {
38
+ constructor(errorCode, correlationId, errorMessage, suberror) {
39
+ const message = errorMessage ||
40
+ (errorCode ? getDefaultErrorMessage$1(errorCode) : "");
41
+ const errorString = message ? `${errorCode}: ${message}` : errorCode;
42
+ super(errorString);
43
+ Object.setPrototypeOf(this, AuthError.prototype);
44
+ this.errorCode = errorCode || "";
45
+ this.errorMessage = message || "";
46
+ this.subError = suberror || "";
47
+ this.correlationId = correlationId;
48
+ this.name = "AuthError";
49
+ }
50
+ }
51
+
52
+ /*
53
+ * Copyright (c) Microsoft Corporation. All rights reserved.
54
+ * Licensed under the MIT License.
55
+ */
56
+ const popupWindowError = "popup_window_error";
57
+ const userCancelled = "user_cancelled";
58
+ const popupRelayUnsupportedFlow = "popup_relay_unsupported_flow";
59
+ const timedOut = "timed_out";
60
+
61
+ /*
62
+ * Copyright (c) Microsoft Corporation. All rights reserved.
63
+ * Licensed under the MIT License.
64
+ */
65
+ function getDefaultErrorMessage(code) {
66
+ return `See https://aka.ms/msal.js.errors#${code} for details`;
67
+ }
68
+ /**
69
+ * Browser library error class thrown by the MSAL.js library for SPAs
70
+ */
71
+ class BrowserAuthError extends AuthError {
72
+ constructor(errorCode, correlationId, subError) {
73
+ super(errorCode, correlationId, getDefaultErrorMessage(errorCode), subError);
74
+ Object.setPrototypeOf(this, BrowserAuthError.prototype);
75
+ this.name = "BrowserAuthError";
76
+ }
77
+ }
78
+ function createBrowserAuthError(errorCode, correlationId, subError) {
79
+ return new BrowserAuthError(errorCode, correlationId, subError);
80
+ }
81
+
82
+ /*
83
+ * Copyright (c) Microsoft Corporation. All rights reserved.
84
+ * Licensed under the MIT License.
85
+ */
86
+ /*
87
+ * Interaction type of the API - used for state and telemetry
88
+ */
89
+ var InteractionType;
90
+ (function (InteractionType) {
91
+ InteractionType["Redirect"] = "redirect";
92
+ InteractionType["Popup"] = "popup";
93
+ InteractionType["Silent"] = "silent";
94
+ InteractionType["None"] = "none";
95
+ })(InteractionType || (InteractionType = {}));
96
+
97
+ /*
98
+ * Copyright (c) Microsoft Corporation. All rights reserved.
99
+ * Licensed under the MIT License.
100
+ */
101
+ /**
102
+ * Creates a POST `<form>` in the provided document with the given auth
103
+ * parameters as hidden inputs, targeting `action`. Shared by the popup auth
104
+ * flows (`getEARForm` / `getCodeForm`) and the popup-relay page
105
+ * (`runPopupRelay`) so the form is built one way only.
106
+ *
107
+ * @param frame - document to create the form in
108
+ * @param action - form action (the /authorize URL)
109
+ * @param fields - POST-body fields
110
+ * @internal
111
+ */
112
+ function createForm(frame, action, fields) {
113
+ const form = frame.createElement("form");
114
+ form.method = "post";
115
+ form.action = action;
116
+ Object.keys(fields).forEach((name) => {
117
+ const input = frame.createElement("input");
118
+ input.hidden = true;
119
+ input.name = name;
120
+ input.value = fields[name];
121
+ form.appendChild(input);
122
+ });
123
+ frame.body.appendChild(form);
124
+ return form;
125
+ }
126
+
127
+ /*
128
+ * Copyright (c) Microsoft Corporation. All rights reserved.
129
+ * Licensed under the MIT License.
130
+ */
131
+ const DEFAULT_POPUP_RELAY_TIMEOUT_MS = 300000;
132
+ const DEFAULT_POPUP_RELAY_WIDTH = 520;
133
+ const DEFAULT_POPUP_RELAY_HEIGHT = 640;
134
+ /**
135
+ * Builds the `window.open` features string for the IdP child popup from a
136
+ * {@link PopupWindowAttributes}, mirroring the shape used by
137
+ * `PopupRequest.popupWindowAttributes`.
138
+ */
139
+ function buildChildPopupFeatures(attributes) {
140
+ const width = attributes?.popupSize?.width || DEFAULT_POPUP_RELAY_WIDTH;
141
+ const height = attributes?.popupSize?.height || DEFAULT_POPUP_RELAY_HEIGHT;
142
+ const features = [`width=${width}`, `height=${height}`];
143
+ if (attributes?.popupPosition?.top !== undefined) {
144
+ features.push(`top=${attributes.popupPosition.top}`);
145
+ }
146
+ if (attributes?.popupPosition?.left !== undefined) {
147
+ features.push(`left=${attributes.popupPosition.left}`);
148
+ }
149
+ features.push("scrollbars=yes");
150
+ return features.join(",");
151
+ }
152
+ /**
153
+ * Entry point for the top-level "popup-relay" page referenced by
154
+ * `auth.popupRelayUri`. Call this from the relay page (which MSAL opens as a
155
+ * top-level popup from inside an embedded, cross-origin iframe). It:
156
+ *
157
+ * 1. Reads the IdP navigation MSAL passed in this page's hash (a GET URL, or a
158
+ * POST form for the form_post / EAR response modes), then scrubs the hash.
159
+ * 2. Opens the IdP child popup and performs that navigation (the relay page
160
+ * stays put, so its `window.opener` link back to the embedded frame
161
+ * survives COOP).
162
+ * 3. Waits for the child's redirect URI page (which must run the redirect
163
+ * bridge, `broadcastResponseToMainFrame`) to broadcast the raw auth
164
+ * response over a same-origin `BroadcastChannel`.
165
+ * 4. Relays that raw response back to the embedded frame via
166
+ * `opener.postMessage`, posting only to its own (same) origin, then closes.
167
+ *
168
+ * The embedded frame keeps the PKCE verifier (and EAR private key) and exchanges
169
+ * the relayed response itself — no token, verifier, or private key ever crosses
170
+ * a window boundary.
171
+ *
172
+ * Note: the child popup is opened when this function runs, so call it from a
173
+ * user gesture (e.g. a "Continue" button click) to avoid popup blockers.
174
+ *
175
+ * @param options - {@link PopupRelayOptions}
176
+ */
177
+ function runPopupRelay(options) {
178
+ const opener = window.opener;
179
+ const targetOrigin = window.location.origin;
180
+ const hashParams = new URLSearchParams(window.location.hash.replace(/^#/, ""));
181
+ const rawReq = hashParams.get("req") || "";
182
+ // Scrub the relayed request out of the relay page's own URL immediately.
183
+ if (typeof window.history.replaceState === "function") {
184
+ window.history.replaceState(null, "", window.location.origin + window.location.pathname);
185
+ }
186
+ if (!opener) {
187
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_no_opener");
188
+ }
189
+ let request;
190
+ try {
191
+ request = JSON.parse(rawReq);
192
+ }
193
+ catch (e) {
194
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
195
+ }
196
+ if (!request || !request.id) {
197
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
198
+ }
199
+ const id = request.id;
200
+ const channel = new BroadcastChannel(id);
201
+ let settled = false;
202
+ /*
203
+ * Timer handles are kept on a const holder so relay() (declared before the
204
+ * timers are created) can clear them — `let` handles trip prefer-const, and
205
+ * `const` handles can't be referenced before assignment (TDZ).
206
+ */
207
+ const timers = {};
208
+ const relay = (message) => {
209
+ if (settled) {
210
+ return;
211
+ }
212
+ settled = true;
213
+ try {
214
+ channel.close();
215
+ }
216
+ catch (e) {
217
+ /* ignore */
218
+ }
219
+ clearInterval(timers.closedPoll);
220
+ clearTimeout(timers.timeoutId);
221
+ opener.postMessage({ type: POPUP_RELAY_RESPONSE_TYPE, id, ...message }, targetOrigin);
222
+ setTimeout(() => {
223
+ try {
224
+ window.close();
225
+ }
226
+ catch (e) {
227
+ /* ignore */
228
+ }
229
+ }, 0);
230
+ };
231
+ // The redirect bridge broadcasts the raw auth response payload here.
232
+ channel.onmessage = (event) => {
233
+ const payload = event.data && event.data.payload;
234
+ if (payload) {
235
+ relay({ payload });
236
+ }
237
+ };
238
+ const features = buildChildPopupFeatures(options?.popupWindowAttributes);
239
+ const childPopup = request.method === "POST"
240
+ ? window.open("about:blank", "msalPopupRelayChild", features)
241
+ : window.open(request.url, "msalPopupRelayChild", features);
242
+ if (!childPopup) {
243
+ relay({ error: popupWindowError });
244
+ return;
245
+ }
246
+ if (request.method === "POST") {
247
+ createForm(childPopup.document, request.action, request.fields).submit();
248
+ }
249
+ timers.closedPoll = window.setInterval(() => {
250
+ if (childPopup.closed && !settled) {
251
+ /*
252
+ * The popup is gone, so the overall timeout no longer applies —
253
+ * drop it and report cancellation. A successful sign-in settles
254
+ * first: the redirect bridge broadcasts the response before it
255
+ * closes the popup, so onmessage runs on the
256
+ * next event-loop turn, well before this 500ms poll observes the
257
+ * close — the `!settled` guard then skips cancellation.
258
+ */
259
+ clearTimeout(timers.timeoutId);
260
+ relay({ error: userCancelled });
261
+ }
262
+ }, 500);
263
+ timers.timeoutId = window.setTimeout(() => {
264
+ if (!settled) {
265
+ /*
266
+ * Stop the close poll before we close the popup ourselves, so it
267
+ * can't observe the close and report user_cancelled instead.
268
+ */
269
+ clearInterval(timers.closedPoll);
270
+ try {
271
+ childPopup.close();
272
+ }
273
+ catch (e) {
274
+ /* ignore */
275
+ }
276
+ relay({ error: timedOut });
277
+ }
278
+ }, options?.timeoutMs || DEFAULT_POPUP_RELAY_TIMEOUT_MS);
279
+ }
280
+
281
+ exports.runPopupRelay = runPopupRelay;
282
+
283
+ }));
284
+ //# sourceMappingURL=msal-popup-relay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msal-popup-relay.js","sources":["../../../../src/popup_relay/constants.ts","../../../msal-common/dist-browser/error/AuthError.mjs","../../../../src/error/BrowserAuthErrorCodes.ts","../../../../src/error/BrowserAuthError.ts","../../../../src/utils/BrowserConstants.ts","../../../../src/protocol/Authorize.ts","../../../../src/popup_relay/index.ts"],"sourcesContent":[null,"/*! @azure/msal-common v16.11.1 2026-07-07 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction getDefaultErrorMessage(code) {\r\n return `See https://aka.ms/msal.js.errors#${code} for details`;\r\n}\r\n/**\r\n * General error class thrown by the MSAL.js library.\r\n */\r\nclass AuthError extends Error {\r\n constructor(errorCode, correlationId, errorMessage, suberror) {\r\n const message = errorMessage ||\r\n (errorCode ? getDefaultErrorMessage(errorCode) : \"\");\r\n const errorString = message ? `${errorCode}: ${message}` : errorCode;\r\n super(errorString);\r\n Object.setPrototypeOf(this, AuthError.prototype);\r\n this.errorCode = errorCode || \"\";\r\n this.errorMessage = message || \"\";\r\n this.subError = suberror || \"\";\r\n this.correlationId = correlationId;\r\n this.name = \"AuthError\";\r\n }\r\n}\r\nfunction createAuthError(code, correlationId, additionalMessage) {\r\n return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));\r\n}\n\nexport { AuthError, createAuthError, getDefaultErrorMessage };\n//# sourceMappingURL=AuthError.mjs.map\n",null,null,null,null,null],"names":["getDefaultErrorMessage","BrowserAuthErrorCodes.popupRelayUnsupportedFlow","BrowserAuthErrorCodes.popupWindowError","BrowserAuthErrorCodes.userCancelled","BrowserAuthErrorCodes.timedOut"],"mappings":";;;;;;;;IAAA;;;IAGG;IAEH;;;;;;;;;;IAUG;IACI,MAAM,yBAAyB,GAAG,8BAA8B;;IChBvE;IAEA;IACA;IACA;IACA;IACA,SAASA,wBAAsB,CAAC,IAAI,EAAE;IACtC,IAAI,OAAO,CAAC,kCAAkC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACnE,CAAC;IACD;IACA;IACA;IACA,MAAM,SAAS,SAAS,KAAK,CAAC;IAC9B,IAAI,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE;IAClE,QAAQ,MAAM,OAAO,GAAG,YAAY;IACpC,aAAa,SAAS,GAAGA,wBAAsB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC;IACjE,QAAQ,MAAM,WAAW,GAAG,OAAO,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAC7E,QAAQ,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzD,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;IACzC,QAAQ,IAAI,CAAC,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OAAO,EAAE;IAC/B;;;;;;;IAOG;IACH,YAAA,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAC/B,KAAK,CAAC,EAAE,KAAK,EAAEC,aAAmC,EAAE,CAAC,CAAC;IACzD,QAAA,CAAA;QACL,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAK;YACtC,IAAI,CAAC,OAAO,EAAE;IACV;;;IAGG;IACH,YAAA,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBACjC,IAAI;oBACA,UAAU,CAAC,KAAK,EAAE,CAAC;IACtB,YAAA,CAAA;IAAC,YAAA,OAAO,CAAC,EAAE;;IAEX,YAAA,CAAA;gBACD,KAAK,CAAC,EAAE,KAAK,EAAEC,QAA8B,EAAE,CAAC,CAAC;IACpD,QAAA,CAAA;IACL,IAAA,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,8BAA8B,CAAC,CAAC;IAC7D;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ /*! @azure/msal-browser v5.17.0 2026-07-07 */
2
+ "use strict";!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).msalPopupRelay={})}(this,function(e){class o extends Error{constructor(e,t,r,n){const s=r||(e?`See https://aka.ms/msal.js.errors#${e} for details`:"");super(s?`${e}: ${s}`:e),Object.setPrototypeOf(this,o.prototype),this.errorCode=e||"",this.errorMessage=s||"",this.subError=n||"",this.correlationId=t,this.name="AuthError"}}const t="popup_relay_unsupported_flow";class r extends o{constructor(e,o,t){super(e,o,`See https://aka.ms/msal.js.errors#${e} for details`,t),Object.setPrototypeOf(this,r.prototype),this.name="BrowserAuthError"}}function n(e,o,t){return new r(e,o,t)}var s;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(s||(s={}));e.runPopupRelay=function(e){const o=window.opener,r=window.location.origin,s=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("req")||"";if("function"==typeof window.history.replaceState&&window.history.replaceState(null,"",window.location.origin+window.location.pathname),!o)throw n(t,"","popup_relay_no_opener");let i;try{i=JSON.parse(s)}catch(e){throw n(t,"","popup_relay_bad_request")}if(!i||!i.id)throw n(t,"","popup_relay_bad_request");const p=i.id,a=new BroadcastChannel(p);let l=!1;const c={},d=e=>{if(!l){l=!0;try{a.close()}catch(e){}clearInterval(c.closedPoll),clearTimeout(c.timeoutId),o.postMessage({type:"msal:popup-relay-response:v1",id:p,...e},r),setTimeout(()=>{try{window.close()}catch(e){}},0)}};a.onmessage=e=>{const o=e.data&&e.data.payload;o&&d({payload:o})};const u=function(e){const o=[`width=${e?.popupSize?.width||520}`,`height=${e?.popupSize?.height||640}`];return void 0!==e?.popupPosition?.top&&o.push(`top=${e.popupPosition.top}`),void 0!==e?.popupPosition?.left&&o.push(`left=${e.popupPosition.left}`),o.push("scrollbars=yes"),o.join(",")}(e?.popupWindowAttributes),h="POST"===i.method?window.open("about:blank","msalPopupRelayChild",u):window.open(i.url,"msalPopupRelayChild",u);h?("POST"===i.method&&function(e,o,t){const r=e.createElement("form");return r.method="post",r.action=o,Object.keys(t).forEach(o=>{const n=e.createElement("input");n.hidden=!0,n.name=o,n.value=t[o],r.appendChild(n)}),e.body.appendChild(r),r}(h.document,i.action,i.fields).submit(),c.closedPoll=window.setInterval(()=>{h.closed&&!l&&(clearTimeout(c.timeoutId),d({error:"user_cancelled"}))},500),c.timeoutId=window.setTimeout(()=>{if(!l){clearInterval(c.closedPoll);try{h.close()}catch(e){}d({error:"timed_out"})}},e?.timeoutMs||3e5)):d({error:"popup_window_error"})}});