@azure/msal-browser 4.15.0 → 4.16.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 (307) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/app/PublicClientNext.mjs +1 -1
  4. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  5. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  8. package/dist/cache/AccountManager.mjs +1 -1
  9. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  10. package/dist/cache/BrowserCacheManager.mjs +1 -1
  11. package/dist/cache/CacheHelpers.mjs +1 -1
  12. package/dist/cache/CookieStorage.mjs +1 -1
  13. package/dist/cache/DatabaseStorage.mjs +1 -1
  14. package/dist/cache/LocalStorage.mjs +1 -1
  15. package/dist/cache/MemoryStorage.mjs +1 -1
  16. package/dist/cache/SessionStorage.mjs +1 -1
  17. package/dist/cache/TokenCache.mjs +1 -1
  18. package/dist/config/Configuration.mjs +1 -1
  19. package/dist/controllers/ControllerFactory.mjs +1 -1
  20. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  21. package/dist/controllers/NestedAppAuthController.mjs +15 -3
  22. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  23. package/dist/controllers/StandardController.mjs +1 -1
  24. package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
  25. package/dist/crypto/BrowserCrypto.mjs +1 -1
  26. package/dist/crypto/CryptoOps.mjs +1 -1
  27. package/dist/crypto/PkceGenerator.mjs +1 -1
  28. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  29. package/dist/custom-auth-path/app/PublicClientApplication.mjs +1 -1
  30. package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  31. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  32. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  33. package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  34. package/dist/custom-auth-path/cache/AccountManager.mjs +1 -1
  35. package/dist/custom-auth-path/cache/AsyncMemoryStorage.mjs +1 -1
  36. package/dist/custom-auth-path/cache/BrowserCacheManager.mjs +1 -1
  37. package/dist/custom-auth-path/cache/CacheHelpers.mjs +1 -1
  38. package/dist/custom-auth-path/cache/CookieStorage.mjs +1 -1
  39. package/dist/custom-auth-path/cache/DatabaseStorage.mjs +1 -1
  40. package/dist/custom-auth-path/cache/LocalStorage.mjs +1 -1
  41. package/dist/custom-auth-path/cache/MemoryStorage.mjs +1 -1
  42. package/dist/custom-auth-path/cache/SessionStorage.mjs +1 -1
  43. package/dist/custom-auth-path/cache/TokenCache.mjs +1 -1
  44. package/dist/custom-auth-path/config/Configuration.mjs +1 -1
  45. package/dist/custom-auth-path/controllers/ControllerFactory.mjs +1 -1
  46. package/dist/custom-auth-path/controllers/NestedAppAuthController.d.ts.map +1 -1
  47. package/dist/custom-auth-path/controllers/StandardController.mjs +1 -1
  48. package/dist/custom-auth-path/crypto/BrowserCrypto.mjs +1 -1
  49. package/dist/custom-auth-path/crypto/CryptoOps.mjs +1 -1
  50. package/dist/custom-auth-path/crypto/PkceGenerator.mjs +1 -1
  51. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.d.ts +1 -1
  52. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.mjs +1 -1
  53. package/dist/custom-auth-path/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  54. package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  55. package/dist/custom-auth-path/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  56. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  57. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  58. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  59. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  60. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthError.mjs +1 -1
  61. package/dist/custom-auth-path/custom_auth/core/error/HttpError.mjs +1 -1
  62. package/dist/custom-auth-path/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  63. package/dist/custom-auth-path/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  64. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  65. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  66. package/dist/custom-auth-path/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  67. package/dist/custom-auth-path/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  68. package/dist/custom-auth-path/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  69. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  70. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  71. package/dist/custom-auth-path/custom_auth/core/error/UnexpectedError.mjs +1 -1
  72. package/dist/custom-auth-path/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  73. package/dist/custom-auth-path/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  74. package/dist/custom-auth-path/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  75. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  76. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  77. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  78. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  79. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  80. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  81. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  82. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  83. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  84. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  85. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  86. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  87. package/dist/custom-auth-path/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  88. package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  89. package/dist/custom-auth-path/custom_auth/core/utils/UrlUtils.mjs +1 -1
  90. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  91. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  92. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  93. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  94. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  95. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  96. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  97. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  98. package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  99. package/dist/custom-auth-path/custom_auth/index.mjs +1 -1
  100. package/dist/custom-auth-path/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  101. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  102. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  103. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  104. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  105. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  106. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  107. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  108. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  109. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  110. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  111. package/dist/custom-auth-path/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  112. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  113. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  114. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  115. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  116. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  117. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCredentialResult.mjs +1 -1
  118. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  119. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  120. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  121. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  122. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  123. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  124. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  125. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  126. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  127. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  128. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  129. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  130. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  131. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  132. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  133. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  134. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  135. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  136. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  137. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  138. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  139. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  140. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  141. package/dist/custom-auth-path/encode/Base64Decode.mjs +1 -1
  142. package/dist/custom-auth-path/encode/Base64Encode.mjs +1 -1
  143. package/dist/custom-auth-path/error/BrowserAuthError.mjs +1 -1
  144. package/dist/custom-auth-path/error/BrowserAuthErrorCodes.mjs +1 -1
  145. package/dist/custom-auth-path/error/BrowserConfigurationAuthError.mjs +1 -1
  146. package/dist/custom-auth-path/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  147. package/dist/custom-auth-path/error/NativeAuthError.mjs +1 -1
  148. package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
  149. package/dist/custom-auth-path/event/EventHandler.mjs +1 -1
  150. package/dist/custom-auth-path/event/EventType.mjs +1 -1
  151. package/dist/custom-auth-path/interaction_client/BaseInteractionClient.mjs +1 -1
  152. package/dist/custom-auth-path/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  153. package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  154. package/dist/custom-auth-path/interaction_client/PopupClient.d.ts +2 -1
  155. package/dist/custom-auth-path/interaction_client/PopupClient.d.ts.map +1 -1
  156. package/dist/custom-auth-path/interaction_client/PopupClient.mjs +43 -14
  157. package/dist/custom-auth-path/interaction_client/PopupClient.mjs.map +1 -1
  158. package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts +5 -0
  159. package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts.map +1 -1
  160. package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +42 -15
  161. package/dist/custom-auth-path/interaction_client/RedirectClient.mjs.map +1 -1
  162. package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +1 -1
  163. package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
  164. package/dist/custom-auth-path/interaction_client/SilentIframeClient.d.ts.map +1 -1
  165. package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +13 -7
  166. package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs.map +1 -1
  167. package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +1 -1
  168. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  169. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +7 -3
  170. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs.map +1 -1
  171. package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +1 -1
  172. package/dist/custom-auth-path/interaction_handler/SilentHandler.d.ts +1 -0
  173. package/dist/custom-auth-path/interaction_handler/SilentHandler.d.ts.map +1 -1
  174. package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +12 -3
  175. package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs.map +1 -1
  176. package/dist/custom-auth-path/navigation/NavigationClient.mjs +1 -1
  177. package/dist/custom-auth-path/network/FetchClient.mjs +1 -1
  178. package/dist/custom-auth-path/operatingcontext/BaseOperatingContext.mjs +1 -1
  179. package/dist/custom-auth-path/operatingcontext/StandardOperatingContext.mjs +1 -1
  180. package/dist/custom-auth-path/packageMetadata.d.ts +1 -1
  181. package/dist/custom-auth-path/packageMetadata.mjs +2 -2
  182. package/dist/custom-auth-path/protocol/Authorize.d.ts +4 -0
  183. package/dist/custom-auth-path/protocol/Authorize.d.ts.map +1 -1
  184. package/dist/custom-auth-path/protocol/Authorize.mjs +15 -2
  185. package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
  186. package/dist/custom-auth-path/request/RequestHelpers.d.ts +11 -1
  187. package/dist/custom-auth-path/request/RequestHelpers.d.ts.map +1 -1
  188. package/dist/custom-auth-path/request/RequestHelpers.mjs +32 -3
  189. package/dist/custom-auth-path/request/RequestHelpers.mjs.map +1 -1
  190. package/dist/custom-auth-path/response/ResponseHandler.mjs +1 -1
  191. package/dist/custom-auth-path/utils/BrowserConstants.mjs +1 -1
  192. package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
  193. package/dist/custom-auth-path/utils/BrowserUtils.mjs +1 -1
  194. package/dist/custom-auth-path/utils/MsalFrameStatsUtils.mjs +1 -1
  195. package/dist/custom_auth/CustomAuthConstants.d.ts +1 -1
  196. package/dist/encode/Base64Decode.mjs +1 -1
  197. package/dist/encode/Base64Encode.mjs +1 -1
  198. package/dist/error/BrowserAuthError.mjs +1 -1
  199. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  200. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  201. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  202. package/dist/error/NativeAuthError.mjs +1 -1
  203. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  204. package/dist/error/NestedAppAuthError.mjs +1 -1
  205. package/dist/event/EventHandler.mjs +1 -1
  206. package/dist/event/EventMessage.mjs +1 -1
  207. package/dist/event/EventType.mjs +1 -1
  208. package/dist/index.mjs +1 -1
  209. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  210. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  211. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  212. package/dist/interaction_client/PopupClient.d.ts +2 -1
  213. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  214. package/dist/interaction_client/PopupClient.mjs +43 -14
  215. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  216. package/dist/interaction_client/RedirectClient.d.ts +5 -0
  217. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  218. package/dist/interaction_client/RedirectClient.mjs +42 -15
  219. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  220. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  221. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  222. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  223. package/dist/interaction_client/SilentIframeClient.mjs +13 -7
  224. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  225. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  226. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  227. package/dist/interaction_client/StandardInteractionClient.mjs +7 -3
  228. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  229. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  230. package/dist/interaction_handler/SilentHandler.d.ts +1 -0
  231. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  232. package/dist/interaction_handler/SilentHandler.mjs +12 -3
  233. package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
  234. package/dist/naa/BridgeError.mjs +1 -1
  235. package/dist/naa/BridgeProxy.mjs +1 -1
  236. package/dist/naa/BridgeStatusCode.mjs +1 -1
  237. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  238. package/dist/navigation/NavigationClient.mjs +1 -1
  239. package/dist/network/FetchClient.mjs +1 -1
  240. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  241. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  242. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  243. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  244. package/dist/packageMetadata.d.ts +1 -1
  245. package/dist/packageMetadata.mjs +2 -2
  246. package/dist/protocol/Authorize.d.ts +4 -0
  247. package/dist/protocol/Authorize.d.ts.map +1 -1
  248. package/dist/protocol/Authorize.mjs +15 -2
  249. package/dist/protocol/Authorize.mjs.map +1 -1
  250. package/dist/request/RequestHelpers.d.ts +11 -1
  251. package/dist/request/RequestHelpers.d.ts.map +1 -1
  252. package/dist/request/RequestHelpers.mjs +32 -3
  253. package/dist/request/RequestHelpers.mjs.map +1 -1
  254. package/dist/response/ResponseHandler.mjs +1 -1
  255. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  256. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  257. package/dist/utils/BrowserConstants.mjs +1 -1
  258. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  259. package/dist/utils/BrowserUtils.mjs +1 -1
  260. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  261. package/lib/custom-auth-path/msal-custom-auth.cjs +230 -94
  262. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  263. package/lib/custom-auth-path/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  264. package/lib/custom-auth-path/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  265. package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts +2 -1
  266. package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts.map +1 -1
  267. package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts +5 -0
  268. package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts.map +1 -1
  269. package/lib/custom-auth-path/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  270. package/lib/custom-auth-path/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  271. package/lib/custom-auth-path/types/interaction_handler/SilentHandler.d.ts +1 -0
  272. package/lib/custom-auth-path/types/interaction_handler/SilentHandler.d.ts.map +1 -1
  273. package/lib/custom-auth-path/types/packageMetadata.d.ts +1 -1
  274. package/lib/custom-auth-path/types/protocol/Authorize.d.ts +4 -0
  275. package/lib/custom-auth-path/types/protocol/Authorize.d.ts.map +1 -1
  276. package/lib/custom-auth-path/types/request/RequestHelpers.d.ts +11 -1
  277. package/lib/custom-auth-path/types/request/RequestHelpers.d.ts.map +1 -1
  278. package/lib/msal-browser.cjs +256 -98
  279. package/lib/msal-browser.cjs.map +1 -1
  280. package/lib/msal-browser.js +256 -98
  281. package/lib/msal-browser.js.map +1 -1
  282. package/lib/msal-browser.min.js +68 -68
  283. package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  284. package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  285. package/lib/types/interaction_client/PopupClient.d.ts +2 -1
  286. package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
  287. package/lib/types/interaction_client/RedirectClient.d.ts +5 -0
  288. package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
  289. package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  290. package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  291. package/lib/types/interaction_handler/SilentHandler.d.ts +1 -0
  292. package/lib/types/interaction_handler/SilentHandler.d.ts.map +1 -1
  293. package/lib/types/packageMetadata.d.ts +1 -1
  294. package/lib/types/protocol/Authorize.d.ts +4 -0
  295. package/lib/types/protocol/Authorize.d.ts.map +1 -1
  296. package/lib/types/request/RequestHelpers.d.ts +11 -1
  297. package/lib/types/request/RequestHelpers.d.ts.map +1 -1
  298. package/package.json +2 -2
  299. package/src/controllers/NestedAppAuthController.ts +18 -2
  300. package/src/interaction_client/PopupClient.ts +161 -63
  301. package/src/interaction_client/RedirectClient.ts +86 -35
  302. package/src/interaction_client/SilentIframeClient.ts +49 -28
  303. package/src/interaction_client/StandardInteractionClient.ts +13 -2
  304. package/src/interaction_handler/SilentHandler.ts +24 -1
  305. package/src/packageMetadata.ts +1 -1
  306. package/src/protocol/Authorize.ts +48 -0
  307. package/src/request/RequestHelpers.ts +45 -0
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v4.15.0 2025-07-08 */
1
+ /*! @azure/msal-browser v4.16.0 2025-07-23 */
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 v15.8.1 2025-07-08 */
9
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -86,6 +86,10 @@
86
86
  SERVER_ERROR_RANGE_END: 599,
87
87
  MULTI_SIDED_ERROR: 600,
88
88
  };
89
+ const HttpMethod = {
90
+ GET: "GET",
91
+ POST: "POST",
92
+ };
89
93
  const OIDC_DEFAULT_SCOPES = [
90
94
  Constants.OPENID_SCOPE,
91
95
  Constants.PROFILE_SCOPE,
@@ -281,7 +285,7 @@
281
285
  // Token renewal offset default in seconds
282
286
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
283
287
 
284
- /*! @azure/msal-common v15.8.1 2025-07-08 */
288
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
285
289
  /*
286
290
  * Copyright (c) Microsoft Corporation. All rights reserved.
287
291
  * Licensed under the MIT License.
@@ -298,7 +302,7 @@
298
302
  unexpectedError: unexpectedError
299
303
  });
300
304
 
301
- /*! @azure/msal-common v15.8.1 2025-07-08 */
305
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
302
306
 
303
307
  /*
304
308
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -347,7 +351,7 @@
347
351
  : AuthErrorMessages[code]);
348
352
  }
349
353
 
350
- /*! @azure/msal-common v15.8.1 2025-07-08 */
354
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
351
355
  /*
352
356
  * Copyright (c) Microsoft Corporation. All rights reserved.
353
357
  * Licensed under the MIT License.
@@ -445,7 +449,7 @@
445
449
  userTimeoutReached: userTimeoutReached
446
450
  });
447
451
 
448
- /*! @azure/msal-common v15.8.1 2025-07-08 */
452
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
449
453
 
450
454
  /*
451
455
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -697,7 +701,7 @@
697
701
  return new ClientAuthError(errorCode, additionalMessage);
698
702
  }
699
703
 
700
- /*! @azure/msal-common v15.8.1 2025-07-08 */
704
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
701
705
 
702
706
  /*
703
707
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -736,7 +740,7 @@
736
740
  },
737
741
  };
738
742
 
739
- /*! @azure/msal-common v15.8.1 2025-07-08 */
743
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
740
744
 
741
745
  /*
742
746
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -927,12 +931,12 @@
927
931
  }
928
932
  }
929
933
 
930
- /*! @azure/msal-common v15.8.1 2025-07-08 */
934
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
931
935
  /* eslint-disable header/header */
932
936
  const name$1 = "@azure/msal-common";
933
- const version$1 = "15.8.1";
937
+ const version$1 = "15.9.0";
934
938
 
935
- /*! @azure/msal-common v15.8.1 2025-07-08 */
939
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
936
940
  /*
937
941
  * Copyright (c) Microsoft Corporation. All rights reserved.
938
942
  * Licensed under the MIT License.
@@ -952,7 +956,7 @@
952
956
  AzureUsGovernment: "https://login.microsoftonline.us",
953
957
  };
954
958
 
955
- /*! @azure/msal-common v15.8.1 2025-07-08 */
959
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
956
960
 
957
961
  /*
958
962
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1013,7 +1017,7 @@
1013
1017
  }
1014
1018
  }
1015
1019
 
1016
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1020
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1017
1021
  /*
1018
1022
  * Copyright (c) Microsoft Corporation. All rights reserved.
1019
1023
  * Licensed under the MIT License.
@@ -1068,7 +1072,7 @@
1068
1072
  return cachedAtSec > nowSeconds();
1069
1073
  }
1070
1074
 
1071
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1075
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1072
1076
 
1073
1077
  /*
1074
1078
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1395,7 +1399,7 @@
1395
1399
  return metadata.expiresAt <= nowSeconds();
1396
1400
  }
1397
1401
 
1398
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1402
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1399
1403
  /*
1400
1404
  * Copyright (c) Microsoft Corporation. All rights reserved.
1401
1405
  * Licensed under the MIT License.
@@ -1420,7 +1424,9 @@
1420
1424
  const invalidAuthenticationHeader = "invalid_authentication_header";
1421
1425
  const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
1422
1426
  const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
1423
- const authorityMismatch = "authority_mismatch";
1427
+ const authorityMismatch = "authority_mismatch";
1428
+ const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
1429
+ const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
1424
1430
 
1425
1431
  var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
1426
1432
  __proto__: null,
@@ -1432,9 +1438,11 @@
1432
1438
  emptyInputScopesError: emptyInputScopesError,
1433
1439
  invalidAuthenticationHeader: invalidAuthenticationHeader,
1434
1440
  invalidAuthorityMetadata: invalidAuthorityMetadata,
1441
+ invalidAuthorizePostBodyParameters: invalidAuthorizePostBodyParameters,
1435
1442
  invalidClaims: invalidClaims,
1436
1443
  invalidCloudDiscoveryMetadata: invalidCloudDiscoveryMetadata,
1437
1444
  invalidCodeChallengeMethod: invalidCodeChallengeMethod,
1445
+ invalidRequestMethodForEAR: invalidRequestMethodForEAR,
1438
1446
  logoutRequestEmpty: logoutRequestEmpty,
1439
1447
  missingNonceAuthenticationHeader: missingNonceAuthenticationHeader,
1440
1448
  missingSshJwk: missingSshJwk,
@@ -1447,7 +1455,7 @@
1447
1455
  urlParseError: urlParseError
1448
1456
  });
1449
1457
 
1450
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1458
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1451
1459
 
1452
1460
  /*
1453
1461
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1475,6 +1483,8 @@
1475
1483
  [cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",
1476
1484
  [cannotAllowPlatformBroker]: "Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",
1477
1485
  [authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",
1486
+ [invalidAuthorizePostBodyParameters]: "Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",
1487
+ [invalidRequestMethodForEAR]: "Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST.",
1478
1488
  };
1479
1489
  /**
1480
1490
  * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.
@@ -1565,6 +1575,14 @@
1565
1575
  code: authorityMismatch,
1566
1576
  desc: ClientConfigurationErrorMessages[authorityMismatch],
1567
1577
  },
1578
+ invalidAuthorizePostBodyParameters: {
1579
+ code: invalidAuthorizePostBodyParameters,
1580
+ desc: ClientConfigurationErrorMessages[invalidAuthorizePostBodyParameters],
1581
+ },
1582
+ invalidRequestMethodForEAR: {
1583
+ code: invalidRequestMethodForEAR,
1584
+ desc: ClientConfigurationErrorMessages[invalidRequestMethodForEAR],
1585
+ },
1568
1586
  };
1569
1587
  /**
1570
1588
  * Error thrown when there is an error in configuration of the MSAL.js library.
@@ -1580,7 +1598,7 @@
1580
1598
  return new ClientConfigurationError(errorCode);
1581
1599
  }
1582
1600
 
1583
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1601
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1584
1602
  /*
1585
1603
  * Copyright (c) Microsoft Corporation. All rights reserved.
1586
1604
  * Licensed under the MIT License.
@@ -1677,7 +1695,7 @@
1677
1695
  }
1678
1696
  }
1679
1697
 
1680
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1698
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1681
1699
 
1682
1700
  /*
1683
1701
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1868,7 +1886,7 @@
1868
1886
  }
1869
1887
  }
1870
1888
 
1871
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1889
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1872
1890
 
1873
1891
  /*
1874
1892
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1908,7 +1926,7 @@
1908
1926
  };
1909
1927
  }
1910
1928
 
1911
- /*! @azure/msal-common v15.8.1 2025-07-08 */
1929
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1912
1930
  /*
1913
1931
  * Copyright (c) Microsoft Corporation. All rights reserved.
1914
1932
  * Licensed under the MIT License.
@@ -1987,7 +2005,7 @@
1987
2005
  return updatedAccountInfo;
1988
2006
  }
1989
2007
 
1990
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2008
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
1991
2009
  /*
1992
2010
  * Copyright (c) Microsoft Corporation. All rights reserved.
1993
2011
  * Licensed under the MIT License.
@@ -2002,7 +2020,7 @@
2002
2020
  Ciam: 3,
2003
2021
  };
2004
2022
 
2005
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2023
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2006
2024
  /*
2007
2025
  * Copyright (c) Microsoft Corporation. All rights reserved.
2008
2026
  * Licensed under the MIT License.
@@ -2024,7 +2042,7 @@
2024
2042
  return null;
2025
2043
  }
2026
2044
 
2027
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2045
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2028
2046
  /*
2029
2047
  * Copyright (c) Microsoft Corporation. All rights reserved.
2030
2048
  * Licensed under the MIT License.
@@ -2048,7 +2066,7 @@
2048
2066
  EAR: "EAR",
2049
2067
  };
2050
2068
 
2051
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2069
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2052
2070
 
2053
2071
  /*
2054
2072
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2291,7 +2309,7 @@
2291
2309
  }
2292
2310
  }
2293
2311
 
2294
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2312
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2295
2313
 
2296
2314
  /*
2297
2315
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2356,7 +2374,7 @@
2356
2374
  return queryParameterArray.join("&");
2357
2375
  }
2358
2376
 
2359
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2377
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2360
2378
 
2361
2379
  /*
2362
2380
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2520,7 +2538,7 @@
2520
2538
  }
2521
2539
  }
2522
2540
 
2523
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2541
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2524
2542
 
2525
2543
  /*
2526
2544
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2659,7 +2677,7 @@
2659
2677
  return null;
2660
2678
  }
2661
2679
 
2662
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2680
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2663
2681
  /*
2664
2682
  * Copyright (c) Microsoft Corporation. All rights reserved.
2665
2683
  * Licensed under the MIT License.
@@ -2667,7 +2685,7 @@
2667
2685
  const cacheQuotaExceeded = "cache_quota_exceeded";
2668
2686
  const cacheErrorUnknown = "cache_error_unknown";
2669
2687
 
2670
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2688
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2671
2689
 
2672
2690
  /*
2673
2691
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2712,7 +2730,7 @@
2712
2730
  }
2713
2731
  }
2714
2732
 
2715
- /*! @azure/msal-common v15.8.1 2025-07-08 */
2733
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
2716
2734
 
2717
2735
  /*
2718
2736
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3879,7 +3897,7 @@
3879
3897
  }
3880
3898
  }
3881
3899
 
3882
- /*! @azure/msal-common v15.8.1 2025-07-08 */
3900
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
3883
3901
  /*
3884
3902
  * Copyright (c) Microsoft Corporation. All rights reserved.
3885
3903
  * Licensed under the MIT License.
@@ -4391,7 +4409,7 @@
4391
4409
  "encryptedCacheExpiredCount",
4392
4410
  ]);
4393
4411
 
4394
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4412
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4395
4413
 
4396
4414
  /*
4397
4415
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4470,7 +4488,7 @@
4470
4488
  }
4471
4489
  }
4472
4490
 
4473
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4491
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4474
4492
 
4475
4493
  /*
4476
4494
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4570,7 +4588,7 @@
4570
4588
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
4571
4589
  }
4572
4590
 
4573
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4591
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4574
4592
  /*
4575
4593
  * Copyright (c) Microsoft Corporation. All rights reserved.
4576
4594
  * Licensed under the MIT License.
@@ -4580,7 +4598,7 @@
4580
4598
  UPN: "UPN",
4581
4599
  };
4582
4600
 
4583
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4601
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4584
4602
  /*
4585
4603
  * Copyright (c) Microsoft Corporation. All rights reserved.
4586
4604
  * Licensed under the MIT License.
@@ -4630,7 +4648,7 @@
4630
4648
  const EAR_JWK = "ear_jwk";
4631
4649
  const EAR_JWE_CRYPTO = "ear_jwe_crypto";
4632
4650
 
4633
- /*! @azure/msal-common v15.8.1 2025-07-08 */
4651
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
4634
4652
 
4635
4653
  /*
4636
4654
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4996,9 +5014,21 @@
4996
5014
  // ear_jwe_crypto will always have value: {"alg":"dir","enc":"A256GCM"} so we can hardcode this
4997
5015
  const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
4998
5016
  parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
5017
+ }
5018
+ /**
5019
+ * Adds authorize body parameters to the request parameters
5020
+ * @param parameters
5021
+ * @param bodyParameters
5022
+ */
5023
+ function addPostBodyParameters(parameters, bodyParameters) {
5024
+ Object.entries(bodyParameters).forEach(([key, value]) => {
5025
+ if (value) {
5026
+ parameters.set(key, value);
5027
+ }
5028
+ });
4999
5029
  }
5000
5030
 
5001
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5031
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5002
5032
  /*
5003
5033
  * Copyright (c) Microsoft Corporation. All rights reserved.
5004
5034
  * Licensed under the MIT License.
@@ -5010,7 +5040,7 @@
5010
5040
  response.hasOwnProperty("jwks_uri"));
5011
5041
  }
5012
5042
 
5013
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5043
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5014
5044
  /*
5015
5045
  * Copyright (c) Microsoft Corporation. All rights reserved.
5016
5046
  * Licensed under the MIT License.
@@ -5020,7 +5050,7 @@
5020
5050
  response.hasOwnProperty("metadata"));
5021
5051
  }
5022
5052
 
5023
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5053
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5024
5054
  /*
5025
5055
  * Copyright (c) Microsoft Corporation. All rights reserved.
5026
5056
  * Licensed under the MIT License.
@@ -5030,7 +5060,7 @@
5030
5060
  response.hasOwnProperty("error_description"));
5031
5061
  }
5032
5062
 
5033
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5063
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5034
5064
  /*
5035
5065
  * Copyright (c) Microsoft Corporation. All rights reserved.
5036
5066
  * Licensed under the MIT License.
@@ -5126,7 +5156,7 @@
5126
5156
  };
5127
5157
  };
5128
5158
 
5129
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5159
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5130
5160
 
5131
5161
  /*
5132
5162
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5232,7 +5262,7 @@
5232
5262
  },
5233
5263
  };
5234
5264
 
5235
- /*! @azure/msal-common v15.8.1 2025-07-08 */
5265
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
5236
5266
 
5237
5267
  /*
5238
5268
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6071,7 +6101,7 @@
6071
6101
  };
6072
6102
  }
6073
6103
 
6074
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6104
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6075
6105
 
6076
6106
  /*
6077
6107
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6102,7 +6132,7 @@
6102
6132
  }
6103
6133
  }
6104
6134
 
6105
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6135
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6106
6136
 
6107
6137
  /*
6108
6138
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6121,7 +6151,7 @@
6121
6151
  }
6122
6152
  }
6123
6153
 
6124
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6154
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6125
6155
  /*
6126
6156
  * Copyright (c) Microsoft Corporation. All rights reserved.
6127
6157
  * Licensed under the MIT License.
@@ -6142,7 +6172,7 @@
6142
6172
  };
6143
6173
  }
6144
6174
 
6145
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6175
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6146
6176
 
6147
6177
  /*
6148
6178
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6229,7 +6259,7 @@
6229
6259
  }
6230
6260
  }
6231
6261
 
6232
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6262
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6233
6263
 
6234
6264
  /*
6235
6265
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6260,7 +6290,7 @@
6260
6290
  return new NetworkError(error, httpStatus, responseHeaders);
6261
6291
  }
6262
6292
 
6263
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6293
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6264
6294
 
6265
6295
  /*
6266
6296
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6408,7 +6438,7 @@
6408
6438
  }
6409
6439
  }
6410
6440
 
6411
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6441
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6412
6442
  /*
6413
6443
  * Copyright (c) Microsoft Corporation. All rights reserved.
6414
6444
  * Licensed under the MIT License.
@@ -6436,7 +6466,7 @@
6436
6466
  uxNotAllowed: uxNotAllowed
6437
6467
  });
6438
6468
 
6439
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6469
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6440
6470
 
6441
6471
  /*
6442
6472
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6526,7 +6556,7 @@
6526
6556
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
6527
6557
  }
6528
6558
 
6529
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6559
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6530
6560
 
6531
6561
  /*
6532
6562
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6598,7 +6628,7 @@
6598
6628
  }
6599
6629
  }
6600
6630
 
6601
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6631
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6602
6632
 
6603
6633
  /*
6604
6634
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6680,7 +6710,7 @@
6680
6710
  }
6681
6711
  }
6682
6712
 
6683
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6713
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6684
6714
  /*
6685
6715
  * Copyright (c) Microsoft Corporation. All rights reserved.
6686
6716
  * Licensed under the MIT License.
@@ -6707,7 +6737,7 @@
6707
6737
  }
6708
6738
  }
6709
6739
 
6710
- /*! @azure/msal-common v15.8.1 2025-07-08 */
6740
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
6711
6741
 
6712
6742
  /*
6713
6743
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7038,7 +7068,7 @@
7038
7068
  return baseAccount;
7039
7069
  }
7040
7070
 
7041
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7071
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7042
7072
  /*
7043
7073
  * Copyright (c) Microsoft Corporation. All rights reserved.
7044
7074
  * Licensed under the MIT License.
@@ -7056,7 +7086,7 @@
7056
7086
  }
7057
7087
  }
7058
7088
 
7059
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7089
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7060
7090
 
7061
7091
  /*
7062
7092
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7291,7 +7321,7 @@
7291
7321
  }
7292
7322
  }
7293
7323
 
7294
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7324
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7295
7325
 
7296
7326
  /*
7297
7327
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7500,7 +7530,7 @@
7500
7530
  }
7501
7531
  }
7502
7532
 
7503
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7533
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7504
7534
 
7505
7535
  /*
7506
7536
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7598,7 +7628,7 @@
7598
7628
  }
7599
7629
  }
7600
7630
 
7601
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7631
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7602
7632
 
7603
7633
  /*
7604
7634
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7613,7 +7643,7 @@
7613
7643
  },
7614
7644
  };
7615
7645
 
7616
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7646
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7617
7647
 
7618
7648
  /*
7619
7649
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7837,7 +7867,7 @@
7837
7867
  return account.idTokenClaims?.login_hint || null;
7838
7868
  }
7839
7869
 
7840
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7870
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7841
7871
 
7842
7872
  /*
7843
7873
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7895,7 +7925,7 @@
7895
7925
  }
7896
7926
  }
7897
7927
 
7898
- /*! @azure/msal-common v15.8.1 2025-07-08 */
7928
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
7899
7929
 
7900
7930
  /*
7901
7931
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8158,7 +8188,7 @@
8158
8188
  }
8159
8189
  }
8160
8190
 
8161
- /*! @azure/msal-common v15.8.1 2025-07-08 */
8191
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
8162
8192
  /*
8163
8193
  * Copyright (c) Microsoft Corporation. All rights reserved.
8164
8194
  * Licensed under the MIT License.
@@ -8166,7 +8196,7 @@
8166
8196
  const missingKidError = "missing_kid_error";
8167
8197
  const missingAlgError = "missing_alg_error";
8168
8198
 
8169
- /*! @azure/msal-common v15.8.1 2025-07-08 */
8199
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
8170
8200
 
8171
8201
  /*
8172
8202
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8191,7 +8221,7 @@
8191
8221
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
8192
8222
  }
8193
8223
 
8194
- /*! @azure/msal-common v15.8.1 2025-07-08 */
8224
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
8195
8225
 
8196
8226
  /*
8197
8227
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8231,7 +8261,7 @@
8231
8261
  }
8232
8262
  }
8233
8263
 
8234
- /*! @azure/msal-common v15.8.1 2025-07-08 */
8264
+ /*! @azure/msal-common v15.9.0 2025-07-23 */
8235
8265
 
8236
8266
  /*
8237
8267
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10335,7 +10365,7 @@
10335
10365
 
10336
10366
  /* eslint-disable header/header */
10337
10367
  const name = "@azure/msal-browser";
10338
- const version = "4.15.0";
10368
+ const version = "4.16.0";
10339
10369
 
10340
10370
  /*
10341
10371
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -13066,6 +13096,35 @@
13066
13096
  account: account,
13067
13097
  forceRefresh: request.forceRefresh || false,
13068
13098
  };
13099
+ }
13100
+ /**
13101
+ * Validates that the combination of request method, protocol mode and authorize body parameters is correct.
13102
+ * Returns the validated or defaulted HTTP method or throws if the configured combination is invalid.
13103
+ * @param interactionRequest
13104
+ * @param protocolMode
13105
+ * @returns
13106
+ */
13107
+ function validateRequestMethod(interactionRequest, protocolMode) {
13108
+ let httpMethod;
13109
+ const requestMethod = interactionRequest.httpMethod;
13110
+ if (protocolMode === ProtocolMode.EAR) {
13111
+ // Don't override httpMethod if it is already set, default to POST if not set
13112
+ httpMethod = requestMethod || HttpMethod.POST;
13113
+ // Validate that method is not GET if protocol mode is EAR
13114
+ if (httpMethod !== HttpMethod.POST) {
13115
+ throw createClientConfigurationError(invalidRequestMethodForEAR);
13116
+ }
13117
+ }
13118
+ else {
13119
+ // For non-EAR protocol modes, default to GET if httpMethod is not set
13120
+ httpMethod = requestMethod || HttpMethod.GET;
13121
+ }
13122
+ // Regardless of protocolMode, if there are authorizePostBodyParameters, validate the request method is POST
13123
+ if (interactionRequest.authorizePostBodyParameters &&
13124
+ httpMethod !== HttpMethod.POST) {
13125
+ throw createClientConfigurationError(invalidAuthorizePostBodyParameters);
13126
+ }
13127
+ return httpMethod;
13069
13128
  }
13070
13129
 
13071
13130
  /*
@@ -13242,7 +13301,7 @@
13242
13301
  };
13243
13302
  const state = ProtocolUtils.setRequestState(this.browserCrypto, (request && request.state) || Constants.EMPTY_STRING, browserState);
13244
13303
  const baseRequest = await invokeAsync(initializeBaseRequest, PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, this.correlationId)({ ...request, correlationId: this.correlationId }, this.config, this.performanceClient, this.logger);
13245
- const validatedRequest = {
13304
+ const interactionRequest = {
13246
13305
  ...baseRequest,
13247
13306
  redirectUri: redirectUri,
13248
13307
  state: state,
@@ -13250,6 +13309,10 @@
13250
13309
  responseMode: this.config.auth.OIDCOptions
13251
13310
  .serverResponseType,
13252
13311
  };
13312
+ const validatedRequest = {
13313
+ ...interactionRequest,
13314
+ httpMethod: validateRequestMethod(interactionRequest, this.config.auth.protocolMode),
13315
+ };
13253
13316
  // Skip active account lookup if either login hint or session id is set
13254
13317
  if (request.loginHint || request.sid) {
13255
13318
  return validatedRequest;
@@ -14244,6 +14307,19 @@
14244
14307
  const url = getAuthorizeUrl(authority, queryParams, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
14245
14308
  return createForm(frame, url, parameters);
14246
14309
  }
14310
+ /**
14311
+ * Gets the form that will be posted to /authorize with request parameters when using POST method
14312
+ */
14313
+ async function getCodeForm(frame, config, authority, request, logger, performanceClient) {
14314
+ const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
14315
+ addResponseType(parameters, OAuthResponseType.CODE);
14316
+ addCodeChallengeParams(parameters, request.codeChallenge, request.codeChallengeMethod || Constants.S256_CODE_CHALLENGE_METHOD);
14317
+ addPostBodyParameters(parameters, request.authorizePostBodyParameters || {});
14318
+ const queryParams = new Map();
14319
+ addExtraQueryParameters(queryParams, request.extraQueryParameters || {});
14320
+ const url = getAuthorizeUrl(authority, queryParams, config.auth.encodeExtraQueryParams, request.extraQueryParameters);
14321
+ return createForm(frame, url, parameters);
14322
+ }
14247
14323
  /**
14248
14324
  * Creates form element in the provided document with auth parameters in the post body
14249
14325
  * @param frame
@@ -14935,9 +15011,10 @@
14935
15011
  * @param pkceCodes
14936
15012
  */
14937
15013
  acquireToken(request, pkceCodes) {
15014
+ let popupParams = undefined;
14938
15015
  try {
14939
15016
  const popupName = this.generatePopupName(request.scopes || OIDC_DEFAULT_SCOPES, request.authority || this.config.auth.authority);
14940
- const popupParams = {
15017
+ popupParams = {
14941
15018
  popupName,
14942
15019
  popupWindowAttributes: request.popupWindowAttributes || {},
14943
15020
  popupWindowParent: request.popupWindowParent ?? window,
@@ -14950,10 +15027,15 @@
14950
15027
  return this.acquireTokenPopupAsync(request, popupParams, pkceCodes);
14951
15028
  }
14952
15029
  else {
15030
+ // Pre-validate request method to avoid opening popup if the request is invalid
15031
+ const validatedRequest = {
15032
+ ...request,
15033
+ httpMethod: validateRequestMethod(request, this.config.auth.protocolMode),
15034
+ };
14953
15035
  // asyncPopups flag is set to false. Opens popup before acquiring token.
14954
15036
  this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");
14955
15037
  popupParams.popup = this.openSizedPopup("about:blank", popupParams);
14956
- return this.acquireTokenPopupAsync(request, popupParams, pkceCodes);
15038
+ return this.acquireTokenPopupAsync(validatedRequest, popupParams, pkceCodes);
14957
15039
  }
14958
15040
  }
14959
15041
  catch (e) {
@@ -15045,15 +15127,20 @@
15045
15127
  requestExtraQueryParameters: popupRequest.extraQueryParameters,
15046
15128
  account: popupRequest.account,
15047
15129
  });
15048
- // Create acquire token url.
15049
- const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, popupRequest, this.logger, this.performanceClient);
15050
- // Show the UI once the url has been created. Get the window handle for the popup.
15051
- const popupWindow = this.initiateAuthRequest(navigateUrl, popupParams);
15052
- this.eventHandler.emitEvent(EventType.POPUP_OPENED, exports.InteractionType.Popup, { popupWindow }, null);
15053
- // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
15054
- const responseString = await this.monitorPopupForHash(popupWindow, popupParams.popupWindowParent);
15055
- const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
15056
- return await invokeAsync(handleResponseCode, PerformanceEvents.HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
15130
+ if (popupRequest.httpMethod === HttpMethod.POST) {
15131
+ return await this.executeCodeFlowWithPost(popupRequest, popupParams, authClient, pkce.verifier);
15132
+ }
15133
+ else {
15134
+ // Create acquire token url.
15135
+ const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, popupRequest, this.logger, this.performanceClient);
15136
+ // Show the UI once the url has been created. Get the window handle for the popup.
15137
+ const popupWindow = this.initiateAuthRequest(navigateUrl, popupParams);
15138
+ this.eventHandler.emitEvent(EventType.POPUP_OPENED, exports.InteractionType.Popup, { popupWindow }, null);
15139
+ // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
15140
+ const responseString = await this.monitorPopupForHash(popupWindow, popupParams.popupWindowParent);
15141
+ const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
15142
+ return await invokeAsync(handleResponseCode, PerformanceEvents.HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
15143
+ }
15057
15144
  }
15058
15145
  catch (e) {
15059
15146
  // Close the synchronous popup if an error is thrown before the window unload event is registered
@@ -15091,6 +15178,23 @@
15091
15178
  const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
15092
15179
  return invokeAsync(handleResponseEAR, PerformanceEvents.HandleResponseEar, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, ApiId.acquireTokenPopup, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
15093
15180
  }
15181
+ async executeCodeFlowWithPost(request, popupParams, authClient, pkceVerifier) {
15182
+ const correlationId = request.correlationId;
15183
+ // Get the frame handle for the silent request
15184
+ const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)({
15185
+ requestAuthority: request.authority,
15186
+ requestAzureCloudOptions: request.azureCloudOptions,
15187
+ requestExtraQueryParameters: request.extraQueryParameters,
15188
+ account: request.account,
15189
+ });
15190
+ const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
15191
+ const form = await getCodeForm(popupWindow.document, this.config, discoveredAuthority, request, this.logger, this.performanceClient);
15192
+ form.submit();
15193
+ // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
15194
+ const responseString = await invokeAsync(this.monitorPopupForHash.bind(this), PerformanceEvents.SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupWindow, popupParams.popupWindowParent);
15195
+ const serverParams = invoke(deserializeResponse, PerformanceEvents.DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.serverResponseType, this.logger);
15196
+ return invokeAsync(handleResponseCode, PerformanceEvents.HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
15197
+ }
15094
15198
  /**
15095
15199
  *
15096
15200
  * @param validRequest
@@ -15442,18 +15546,23 @@
15442
15546
  };
15443
15547
  this.browserStorage.cacheAuthorizeRequest(redirectRequest, pkceCodes.verifier);
15444
15548
  try {
15445
- // Initialize the client
15446
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
15447
- serverTelemetryManager,
15448
- requestAuthority: redirectRequest.authority,
15449
- requestAzureCloudOptions: redirectRequest.azureCloudOptions,
15450
- requestExtraQueryParameters: redirectRequest.extraQueryParameters,
15451
- account: redirectRequest.account,
15452
- });
15453
- // Create acquire token url.
15454
- const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, request.correlationId)(this.config, authClient.authority, redirectRequest, this.logger, this.performanceClient);
15455
- // Show the UI once the url has been created. Response will come back in the hash, which will be handled in the handleRedirectCallback function.
15456
- return await this.initiateAuthRequest(navigateUrl, onRedirectNavigate);
15549
+ if (redirectRequest.httpMethod === HttpMethod.POST) {
15550
+ return await this.executeCodeFlowWithPost(redirectRequest);
15551
+ }
15552
+ else {
15553
+ // Initialize the client
15554
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({
15555
+ serverTelemetryManager,
15556
+ requestAuthority: redirectRequest.authority,
15557
+ requestAzureCloudOptions: redirectRequest.azureCloudOptions,
15558
+ requestExtraQueryParameters: redirectRequest.extraQueryParameters,
15559
+ account: redirectRequest.account,
15560
+ });
15561
+ // Create acquire token url.
15562
+ const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, request.correlationId)(this.config, authClient.authority, redirectRequest, this.logger, this.performanceClient);
15563
+ // Show the UI once the url has been created. Response will come back in the hash, which will be handled in the handleRedirectCallback function.
15564
+ return await this.initiateAuthRequest(navigateUrl, onRedirectNavigate);
15565
+ }
15457
15566
  }
15458
15567
  catch (e) {
15459
15568
  if (e instanceof AuthError) {
@@ -15490,6 +15599,28 @@
15490
15599
  }, this.config.system.redirectNavigationTimeout);
15491
15600
  });
15492
15601
  }
15602
+ /**
15603
+ * Executes classic Authorization Code flow with a POST request.
15604
+ * @param request
15605
+ */
15606
+ async executeCodeFlowWithPost(request) {
15607
+ const correlationId = request.correlationId;
15608
+ // Get the frame handle for the silent request
15609
+ const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)({
15610
+ requestAuthority: request.authority,
15611
+ requestAzureCloudOptions: request.azureCloudOptions,
15612
+ requestExtraQueryParameters: request.extraQueryParameters,
15613
+ account: request.account,
15614
+ });
15615
+ this.browserStorage.cacheAuthorizeRequest(request);
15616
+ const form = await getCodeForm(document, this.config, discoveredAuthority, request, this.logger, this.performanceClient);
15617
+ form.submit();
15618
+ return new Promise((resolve, reject) => {
15619
+ setTimeout(() => {
15620
+ reject(createBrowserAuthError(timedOut, "failed_to_redirect"));
15621
+ }, this.config.system.redirectNavigationTimeout);
15622
+ });
15623
+ }
15493
15624
  /**
15494
15625
  * Checks if navigateToLoginRequestUrl is set, and:
15495
15626
  * - if true, performs logic to cache and navigate
@@ -15800,6 +15931,15 @@
15800
15931
  }
15801
15932
  return invoke(loadFrameSync, PerformanceEvents.SilentHandlerLoadFrameSync, logger, performanceClient, correlationId)(requestUrl);
15802
15933
  }
15934
+ async function initiateCodeFlowWithPost(config, authority, request, logger, performanceClient) {
15935
+ const frame = createHiddenIframe();
15936
+ if (!frame.contentDocument) {
15937
+ throw "No document associated with iframe!";
15938
+ }
15939
+ const form = await getCodeForm(frame.contentDocument, config, authority, request, logger, performanceClient);
15940
+ form.submit();
15941
+ return frame;
15942
+ }
15803
15943
  async function initiateEarRequest(config, authority, request, logger, performanceClient) {
15804
15944
  const frame = createHiddenIframe();
15805
15945
  if (!frame.contentDocument) {
@@ -16048,10 +16188,16 @@
16048
16188
  ...request,
16049
16189
  codeChallenge: pkceCodes.challenge,
16050
16190
  };
16051
- // Create authorize request url
16052
- const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
16053
- // Get the frame handle for the silent request
16054
- const msalFrame = await invokeAsync(initiateCodeRequest, PerformanceEvents.SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(navigateUrl, this.performanceClient, this.logger, correlationId, this.config.system.navigateFrameWait);
16191
+ let msalFrame;
16192
+ if (request.httpMethod === HttpMethod.POST) {
16193
+ msalFrame = await invokeAsync(initiateCodeFlowWithPost, PerformanceEvents.SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
16194
+ }
16195
+ else {
16196
+ // Create authorize request url
16197
+ const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, PerformanceEvents.GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
16198
+ // Get the frame handle for the silent request
16199
+ msalFrame = await invokeAsync(initiateCodeRequest, PerformanceEvents.SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(navigateUrl, this.performanceClient, this.logger, correlationId, this.config.system.navigateFrameWait);
16200
+ }
16055
16201
  const responseType = this.config.auth.OIDCOptions.serverResponseType;
16056
16202
  // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
16057
16203
  const responseString = await invokeAsync(monitorIframeForHash, PerformanceEvents.SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(msalFrame, this.config.system.iframeHashTimeout, this.config.system.pollIntervalMilliseconds, this.performanceClient, this.logger, correlationId, responseType);
@@ -18150,7 +18296,13 @@
18150
18296
  ...this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp),
18151
18297
  };
18152
18298
  // cache the tokens in the response
18153
- await this.hydrateCache(result, request);
18299
+ try {
18300
+ // cache hydration can fail in JS Runtime scenario that doesn't support full crypto API
18301
+ await this.hydrateCache(result, request);
18302
+ }
18303
+ catch (error) {
18304
+ this.logger.warningPii(`Failed to hydrate cache. Error: ${error}`, validRequest.correlationId);
18305
+ }
18154
18306
  // cache the account context in memory after successful token fetch
18155
18307
  this.currentAccountContext = {
18156
18308
  homeAccountId: result.account.homeAccountId,
@@ -18207,7 +18359,13 @@
18207
18359
  const response = await this.bridgeProxy.getTokenSilent(naaRequest);
18208
18360
  const result = this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp);
18209
18361
  // cache the tokens in the response
18210
- await this.hydrateCache(result, request);
18362
+ try {
18363
+ // cache hydration can fail in JS Runtime scenario that doesn't support full crypto API
18364
+ await this.hydrateCache(result, request);
18365
+ }
18366
+ catch (error) {
18367
+ this.logger.warningPii(`Failed to hydrate cache. Error: ${error}`, validRequest.correlationId);
18368
+ }
18211
18369
  // cache the account context in memory after successful token fetch
18212
18370
  this.currentAccountContext = {
18213
18371
  homeAccountId: result.account.homeAccountId,