@azure/msal-browser 4.26.1 → 4.26.2

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 (388) 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/CacheKeys.mjs +1 -1
  13. package/dist/cache/CookieStorage.mjs +1 -1
  14. package/dist/cache/DatabaseStorage.mjs +1 -1
  15. package/dist/cache/EncryptedData.mjs +1 -1
  16. package/dist/cache/LocalStorage.mjs +1 -1
  17. package/dist/cache/MemoryStorage.mjs +1 -1
  18. package/dist/cache/SessionStorage.mjs +1 -1
  19. package/dist/cache/TokenCache.mjs +1 -1
  20. package/dist/config/Configuration.mjs +1 -1
  21. package/dist/controllers/ControllerFactory.mjs +1 -1
  22. package/dist/controllers/NestedAppAuthController.mjs +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/CacheKeys.mjs +1 -1
  39. package/dist/custom-auth-path/cache/CookieStorage.mjs +1 -1
  40. package/dist/custom-auth-path/cache/DatabaseStorage.mjs +1 -1
  41. package/dist/custom-auth-path/cache/EncryptedData.mjs +1 -1
  42. package/dist/custom-auth-path/cache/LocalStorage.mjs +1 -1
  43. package/dist/custom-auth-path/cache/MemoryStorage.mjs +1 -1
  44. package/dist/custom-auth-path/cache/SessionStorage.mjs +1 -1
  45. package/dist/custom-auth-path/cache/TokenCache.mjs +1 -1
  46. package/dist/custom-auth-path/config/Configuration.mjs +1 -1
  47. package/dist/custom-auth-path/controllers/ControllerFactory.mjs +1 -1
  48. package/dist/custom-auth-path/controllers/StandardController.mjs +1 -1
  49. package/dist/custom-auth-path/crypto/BrowserCrypto.mjs +1 -1
  50. package/dist/custom-auth-path/crypto/CryptoOps.mjs +1 -1
  51. package/dist/custom-auth-path/crypto/PkceGenerator.mjs +1 -1
  52. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.d.ts +1 -1
  53. package/dist/custom-auth-path/custom_auth/CustomAuthConstants.mjs +1 -1
  54. package/dist/custom-auth-path/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  55. package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  56. package/dist/custom-auth-path/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  57. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  58. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  59. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  60. package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  61. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  62. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
  63. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
  64. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -4
  65. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
  66. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
  67. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
  68. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -3
  69. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +1 -1
  70. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  71. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  72. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
  73. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
  74. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +3 -10
  75. package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +1 -1
  76. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  77. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
  78. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
  79. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -3
  80. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
  81. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
  82. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
  83. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -3
  84. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +1 -1
  85. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  86. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  87. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
  88. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
  89. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -7
  90. package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
  91. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  92. package/dist/custom-auth-path/custom_auth/core/error/CustomAuthError.mjs +1 -1
  93. package/dist/custom-auth-path/custom_auth/core/error/HttpError.mjs +1 -1
  94. package/dist/custom-auth-path/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  95. package/dist/custom-auth-path/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  96. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  97. package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  98. package/dist/custom-auth-path/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  99. package/dist/custom-auth-path/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  100. package/dist/custom-auth-path/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  101. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  102. package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  103. package/dist/custom-auth-path/custom_auth/core/error/UnexpectedError.mjs +1 -1
  104. package/dist/custom-auth-path/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  105. package/dist/custom-auth-path/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  106. package/dist/custom-auth-path/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  107. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  108. package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  109. package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  110. package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  111. package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  112. package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  113. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  114. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  115. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  116. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  117. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  118. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  119. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  120. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  121. package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  122. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  123. package/dist/custom-auth-path/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  124. package/dist/custom-auth-path/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  125. package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  126. package/dist/custom-auth-path/custom_auth/core/utils/UrlUtils.mjs +1 -1
  127. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  128. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  129. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  130. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  131. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  132. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  133. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  134. package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  135. package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  136. package/dist/custom-auth-path/custom_auth/index.mjs +1 -1
  137. package/dist/custom-auth-path/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  138. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  139. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  140. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  141. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  142. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  143. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  144. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  145. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  146. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  147. package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  148. package/dist/custom-auth-path/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  149. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  150. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  151. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  152. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
  153. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
  154. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -3
  155. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
  156. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
  157. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
  158. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -3
  159. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
  160. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
  161. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
  162. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -3
  163. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +1 -1
  164. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  165. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  166. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  167. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  168. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  169. package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  170. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  171. package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  172. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  173. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  174. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  175. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  176. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  177. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  178. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  179. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  180. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  181. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  182. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  183. package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  184. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  185. package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  186. package/dist/custom-auth-path/encode/Base64Decode.mjs +1 -1
  187. package/dist/custom-auth-path/encode/Base64Encode.mjs +1 -1
  188. package/dist/custom-auth-path/error/BrowserAuthError.mjs +1 -1
  189. package/dist/custom-auth-path/error/BrowserAuthErrorCodes.mjs +1 -1
  190. package/dist/custom-auth-path/error/BrowserConfigurationAuthError.mjs +1 -1
  191. package/dist/custom-auth-path/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  192. package/dist/custom-auth-path/error/NativeAuthError.mjs +1 -1
  193. package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
  194. package/dist/custom-auth-path/event/EventHandler.mjs +1 -1
  195. package/dist/custom-auth-path/event/EventType.mjs +1 -1
  196. package/dist/custom-auth-path/interaction_client/BaseInteractionClient.mjs +1 -1
  197. package/dist/custom-auth-path/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  198. package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  199. package/dist/custom-auth-path/interaction_client/PopupClient.d.ts +1 -1
  200. package/dist/custom-auth-path/interaction_client/PopupClient.d.ts.map +1 -1
  201. package/dist/custom-auth-path/interaction_client/PopupClient.mjs +20 -4
  202. package/dist/custom-auth-path/interaction_client/PopupClient.mjs.map +1 -1
  203. package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts.map +1 -1
  204. package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +4 -2
  205. package/dist/custom-auth-path/interaction_client/RedirectClient.mjs.map +1 -1
  206. package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +1 -1
  207. package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
  208. package/dist/custom-auth-path/interaction_client/SilentIframeClient.d.ts.map +1 -1
  209. package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +19 -3
  210. package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs.map +1 -1
  211. package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +1 -1
  212. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.d.ts +3 -1
  213. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  214. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +8 -7
  215. package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs.map +1 -1
  216. package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +1 -1
  217. package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +1 -1
  218. package/dist/custom-auth-path/navigation/NavigationClient.mjs +1 -1
  219. package/dist/custom-auth-path/network/FetchClient.mjs +1 -1
  220. package/dist/custom-auth-path/operatingcontext/BaseOperatingContext.mjs +1 -1
  221. package/dist/custom-auth-path/operatingcontext/StandardOperatingContext.mjs +1 -1
  222. package/dist/custom-auth-path/packageMetadata.d.ts +1 -1
  223. package/dist/custom-auth-path/packageMetadata.mjs +2 -2
  224. package/dist/custom-auth-path/protocol/Authorize.d.ts.map +1 -1
  225. package/dist/custom-auth-path/protocol/Authorize.mjs +3 -1
  226. package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
  227. package/dist/custom-auth-path/request/RequestHelpers.mjs +1 -1
  228. package/dist/custom-auth-path/response/ResponseHandler.mjs +1 -1
  229. package/dist/custom-auth-path/utils/BrowserConstants.mjs +1 -1
  230. package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
  231. package/dist/custom-auth-path/utils/BrowserUtils.mjs +1 -1
  232. package/dist/custom-auth-path/utils/Helpers.mjs +1 -1
  233. package/dist/custom-auth-path/utils/MsalFrameStatsUtils.mjs +1 -1
  234. package/dist/custom_auth/CustomAuthConstants.d.ts +1 -1
  235. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
  236. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
  237. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
  238. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
  239. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
  240. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
  241. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
  242. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
  243. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
  244. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
  245. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
  246. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
  247. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
  248. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
  249. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
  250. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
  251. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
  252. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
  253. package/dist/encode/Base64Decode.mjs +1 -1
  254. package/dist/encode/Base64Encode.mjs +1 -1
  255. package/dist/error/BrowserAuthError.mjs +1 -1
  256. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  257. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  258. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  259. package/dist/error/NativeAuthError.mjs +1 -1
  260. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  261. package/dist/error/NestedAppAuthError.mjs +1 -1
  262. package/dist/event/EventHandler.mjs +1 -1
  263. package/dist/event/EventMessage.mjs +1 -1
  264. package/dist/event/EventType.mjs +1 -1
  265. package/dist/index.mjs +1 -1
  266. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  267. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  268. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  269. package/dist/interaction_client/PopupClient.d.ts +1 -1
  270. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  271. package/dist/interaction_client/PopupClient.mjs +20 -4
  272. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  273. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  274. package/dist/interaction_client/RedirectClient.mjs +4 -2
  275. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  276. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  277. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  278. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  279. package/dist/interaction_client/SilentIframeClient.mjs +19 -3
  280. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  281. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  282. package/dist/interaction_client/StandardInteractionClient.d.ts +3 -1
  283. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  284. package/dist/interaction_client/StandardInteractionClient.mjs +8 -7
  285. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  286. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  287. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  288. package/dist/naa/BridgeError.mjs +1 -1
  289. package/dist/naa/BridgeProxy.mjs +1 -1
  290. package/dist/naa/BridgeStatusCode.mjs +1 -1
  291. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  292. package/dist/navigation/NavigationClient.mjs +1 -1
  293. package/dist/network/FetchClient.mjs +1 -1
  294. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  295. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  296. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  297. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  298. package/dist/packageMetadata.d.ts +1 -1
  299. package/dist/packageMetadata.mjs +2 -2
  300. package/dist/protocol/Authorize.d.ts.map +1 -1
  301. package/dist/protocol/Authorize.mjs +3 -1
  302. package/dist/protocol/Authorize.mjs.map +1 -1
  303. package/dist/request/RequestHelpers.mjs +1 -1
  304. package/dist/response/ResponseHandler.mjs +1 -1
  305. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  306. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  307. package/dist/utils/BrowserConstants.mjs +1 -1
  308. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  309. package/dist/utils/BrowserUtils.mjs +1 -1
  310. package/dist/utils/Helpers.mjs +1 -1
  311. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  312. package/lib/custom-auth-path/msal-custom-auth.cjs +118 -107
  313. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  314. package/lib/custom-auth-path/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  315. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
  316. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
  317. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
  318. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
  319. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
  320. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
  321. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
  322. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
  323. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
  324. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
  325. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
  326. package/lib/custom-auth-path/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
  327. package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
  328. package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
  329. package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
  330. package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
  331. package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
  332. package/lib/custom-auth-path/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
  333. package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts +1 -1
  334. package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts.map +1 -1
  335. package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts.map +1 -1
  336. package/lib/custom-auth-path/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  337. package/lib/custom-auth-path/types/interaction_client/StandardInteractionClient.d.ts +3 -1
  338. package/lib/custom-auth-path/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  339. package/lib/custom-auth-path/types/packageMetadata.d.ts +1 -1
  340. package/lib/custom-auth-path/types/protocol/Authorize.d.ts.map +1 -1
  341. package/lib/msal-browser.cjs +123 -79
  342. package/lib/msal-browser.cjs.map +1 -1
  343. package/lib/msal-browser.js +123 -79
  344. package/lib/msal-browser.js.map +1 -1
  345. package/lib/msal-browser.min.js +66 -66
  346. package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  347. package/lib/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
  348. package/lib/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
  349. package/lib/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
  350. package/lib/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
  351. package/lib/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
  352. package/lib/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
  353. package/lib/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
  354. package/lib/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
  355. package/lib/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
  356. package/lib/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
  357. package/lib/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
  358. package/lib/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
  359. package/lib/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
  360. package/lib/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
  361. package/lib/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
  362. package/lib/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
  363. package/lib/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
  364. package/lib/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
  365. package/lib/types/interaction_client/PopupClient.d.ts +1 -1
  366. package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
  367. package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
  368. package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  369. package/lib/types/interaction_client/StandardInteractionClient.d.ts +3 -1
  370. package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  371. package/lib/types/packageMetadata.d.ts +1 -1
  372. package/lib/types/protocol/Authorize.d.ts.map +1 -1
  373. package/package.json +2 -2
  374. package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.ts +0 -3
  375. package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.ts +0 -2
  376. package/src/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.ts +4 -11
  377. package/src/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.ts +0 -2
  378. package/src/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.ts +0 -2
  379. package/src/custom_auth/core/auth_flow/mfa/state/MfaState.ts +0 -6
  380. package/src/custom_auth/sign_in/auth_flow/result/SignInResult.ts +0 -2
  381. package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.ts +0 -2
  382. package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.ts +0 -2
  383. package/src/interaction_client/PopupClient.ts +73 -21
  384. package/src/interaction_client/RedirectClient.ts +14 -1
  385. package/src/interaction_client/SilentIframeClient.ts +68 -19
  386. package/src/interaction_client/StandardInteractionClient.ts +17 -12
  387. package/src/packageMetadata.ts +1 -1
  388. package/src/protocol/Authorize.ts +7 -0
@@ -31,7 +31,6 @@ abstract class MfaState<
31
31
  * Requests an MFA challenge for a specific authentication method.
32
32
  * @param authMethodId The authentication method ID to use for the challenge.
33
33
  * @returns Promise that resolves to MfaRequestChallengeResult.
34
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
35
34
  */
36
35
  async requestChallenge(
37
36
  authMethodId: string
@@ -101,7 +100,6 @@ export class MfaAwaitingState extends MfaState<MfaAwaitingStateParameters> {
101
100
  /**
102
101
  * Gets the available authentication methods for MFA.
103
102
  * @returns Array of available authentication methods.
104
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
105
103
  */
106
104
  getAuthMethods(): AuthenticationMethod[] {
107
105
  return this.stateParameters.authMethods;
@@ -121,7 +119,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
121
119
  /**
122
120
  * Gets the length of the code that the user needs to provide.
123
121
  * @returns The expected code length.
124
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
125
122
  */
126
123
  getCodeLength(): number {
127
124
  return this.stateParameters.codeLength;
@@ -130,7 +127,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
130
127
  /**
131
128
  * Gets the channel through which the challenge was sent.
132
129
  * @returns The challenge channel (e.g., "email").
133
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
134
130
  */
135
131
  getChannel(): string {
136
132
  return this.stateParameters.challengeChannel;
@@ -139,7 +135,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
139
135
  /**
140
136
  * Gets the target label indicating where the challenge was sent.
141
137
  * @returns The challenge target label (e.g., masked email address).
142
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
143
138
  */
144
139
  getSentTo(): string {
145
140
  return this.stateParameters.challengeTargetLabel;
@@ -149,7 +144,6 @@ export class MfaVerificationRequiredState extends MfaState<MfaVerificationRequir
149
144
  * Submits the MFA challenge (e.g., OTP code) to complete the authentication.
150
145
  * @param challenge The challenge code (e.g., OTP code) entered by the user.
151
146
  * @returns Promise that resolves to MfaSubmitChallengeResult.
152
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
153
147
  */
154
148
  async submitChallenge(
155
149
  challenge: string
@@ -83,7 +83,6 @@ export class SignInResult extends AuthFlowResultBase<
83
83
 
84
84
  /**
85
85
  * Checks if the result requires authentication method registration.
86
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
87
86
  */
88
87
  isAuthMethodRegistrationRequired(): this is SignInResult & {
89
88
  state: AuthMethodRegistrationRequiredState;
@@ -96,7 +95,6 @@ export class SignInResult extends AuthFlowResultBase<
96
95
 
97
96
  /**
98
97
  * Checks if the result requires MFA.
99
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
100
98
  */
101
99
  isMfaRequired(): this is SignInResult & { state: MfaAwaitingState } {
102
100
  return this.state.stateType === MFA_AWAITING_STATE_TYPE;
@@ -57,7 +57,6 @@ export class SignInSubmitCodeResult extends AuthFlowResultBase<
57
57
 
58
58
  /**
59
59
  * Checks if the result requires authentication method registration.
60
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
61
60
  */
62
61
  isAuthMethodRegistrationRequired(): this is SignInSubmitCodeResult & {
63
62
  state: AuthMethodRegistrationRequiredState;
@@ -70,7 +69,6 @@ export class SignInSubmitCodeResult extends AuthFlowResultBase<
70
69
 
71
70
  /**
72
71
  * Checks if the result requires MFA.
73
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
74
72
  */
75
73
  isMfaRequired(): this is SignInSubmitCodeResult & {
76
74
  state: MfaAwaitingState;
@@ -54,7 +54,6 @@ export class SignInSubmitPasswordResult extends AuthFlowResultBase<
54
54
 
55
55
  /**
56
56
  * Checks if the result requires authentication method registration.
57
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
58
57
  */
59
58
  isAuthMethodRegistrationRequired(): this is SignInSubmitPasswordResult & {
60
59
  state: AuthMethodRegistrationRequiredState;
@@ -67,7 +66,6 @@ export class SignInSubmitPasswordResult extends AuthFlowResultBase<
67
66
 
68
67
  /**
69
68
  * Checks if the result requires MFA.
70
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
71
69
  */
72
70
  isMfaRequired(): this is SignInSubmitPasswordResult & {
73
71
  state: MfaAwaitingState;
@@ -243,7 +243,7 @@ export class PopupClient extends StandardInteractionClient {
243
243
  validRequest.platformBroker = isPlatformBroker;
244
244
 
245
245
  if (this.config.auth.protocolMode === ProtocolMode.EAR) {
246
- return this.executeEarFlow(validRequest, popupParams);
246
+ return this.executeEarFlow(validRequest, popupParams, pkceCodes);
247
247
  } else {
248
248
  return this.executeCodeFlow(validRequest, popupParams, pkceCodes);
249
249
  }
@@ -389,7 +389,8 @@ export class PopupClient extends StandardInteractionClient {
389
389
  */
390
390
  async executeEarFlow(
391
391
  request: CommonAuthorizationUrlRequest,
392
- popupParams: PopupParams
392
+ popupParams: PopupParams,
393
+ pkceCodes?: PkceCodes
393
394
  ): Promise<AuthenticationResult> {
394
395
  const correlationId = request.correlationId;
395
396
  // Get the frame handle for the silent request
@@ -413,9 +414,20 @@ export class PopupClient extends StandardInteractionClient {
413
414
  this.performanceClient,
414
415
  correlationId
415
416
  )();
417
+ const pkce =
418
+ pkceCodes ||
419
+ (await invokeAsync(
420
+ generatePkceCodes,
421
+ PerformanceEvents.GeneratePkceCodes,
422
+ this.logger,
423
+ this.performanceClient,
424
+ correlationId
425
+ )(this.performanceClient, this.logger, correlationId));
426
+
416
427
  const popupRequest = {
417
428
  ...request,
418
429
  earJwk: earJwk,
430
+ codeChallenge: pkce.challenge,
419
431
  };
420
432
  const popupWindow =
421
433
  popupParams.popup || this.openPopup("about:blank", popupParams);
@@ -451,25 +463,65 @@ export class PopupClient extends StandardInteractionClient {
451
463
  this.logger
452
464
  );
453
465
 
454
- return invokeAsync(
455
- Authorize.handleResponseEAR,
456
- PerformanceEvents.HandleResponseEar,
457
- this.logger,
458
- this.performanceClient,
459
- correlationId
460
- )(
461
- popupRequest,
462
- serverParams,
463
- ApiId.acquireTokenPopup,
464
- this.config,
465
- discoveredAuthority,
466
- this.browserStorage,
467
- this.nativeStorage,
468
- this.eventHandler,
469
- this.logger,
470
- this.performanceClient,
471
- this.platformAuthProvider
472
- );
466
+ if (!serverParams.ear_jwe && serverParams.code) {
467
+ const authClient = await invokeAsync(
468
+ this.createAuthCodeClient.bind(this),
469
+ PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,
470
+ this.logger,
471
+ this.performanceClient,
472
+ correlationId
473
+ )({
474
+ serverTelemetryManager: this.initializeServerTelemetryManager(
475
+ ApiId.acquireTokenPopup
476
+ ),
477
+ requestAuthority: request.authority,
478
+ requestAzureCloudOptions: request.azureCloudOptions,
479
+ requestExtraQueryParameters: request.extraQueryParameters,
480
+ account: request.account,
481
+ authority: discoveredAuthority,
482
+ });
483
+
484
+ return invokeAsync(
485
+ Authorize.handleResponseCode,
486
+ PerformanceEvents.HandleResponseCode,
487
+ this.logger,
488
+ this.performanceClient,
489
+ correlationId
490
+ )(
491
+ popupRequest,
492
+ serverParams,
493
+ pkce.verifier,
494
+ ApiId.acquireTokenPopup,
495
+ this.config,
496
+ authClient,
497
+ this.browserStorage,
498
+ this.nativeStorage,
499
+ this.eventHandler,
500
+ this.logger,
501
+ this.performanceClient,
502
+ this.platformAuthProvider
503
+ );
504
+ } else {
505
+ return invokeAsync(
506
+ Authorize.handleResponseEAR,
507
+ PerformanceEvents.HandleResponseEar,
508
+ this.logger,
509
+ this.performanceClient,
510
+ correlationId
511
+ )(
512
+ popupRequest,
513
+ serverParams,
514
+ ApiId.acquireTokenPopup,
515
+ this.config,
516
+ discoveredAuthority,
517
+ this.browserStorage,
518
+ this.nativeStorage,
519
+ this.eventHandler,
520
+ this.logger,
521
+ this.performanceClient,
522
+ this.platformAuthProvider
523
+ );
524
+ }
473
525
  }
474
526
 
475
527
  async executeCodeFlowWithPost(
@@ -272,11 +272,24 @@ export class RedirectClient extends StandardInteractionClient {
272
272
  this.performanceClient,
273
273
  correlationId
274
274
  )();
275
+ const pkceCodes = await invokeAsync(
276
+ generatePkceCodes,
277
+ PerformanceEvents.GeneratePkceCodes,
278
+ this.logger,
279
+ this.performanceClient,
280
+ correlationId
281
+ )(this.performanceClient, this.logger, correlationId);
282
+
275
283
  const redirectRequest = {
276
284
  ...request,
277
285
  earJwk: earJwk,
286
+ codeChallenge: pkceCodes.challenge,
278
287
  };
279
- this.browserStorage.cacheAuthorizeRequest(redirectRequest);
288
+
289
+ this.browserStorage.cacheAuthorizeRequest(
290
+ redirectRequest,
291
+ pkceCodes.verifier
292
+ );
280
293
 
281
294
  const form = await Authorize.getEARForm(
282
295
  document,
@@ -235,9 +235,17 @@ export class SilentIframeClient extends StandardInteractionClient {
235
235
  this.performanceClient,
236
236
  correlationId
237
237
  )();
238
+ const pkceCodes = await invokeAsync(
239
+ generatePkceCodes,
240
+ PerformanceEvents.GeneratePkceCodes,
241
+ this.logger,
242
+ this.performanceClient,
243
+ correlationId
244
+ )(this.performanceClient, this.logger, correlationId);
238
245
  const silentRequest = {
239
246
  ...request,
240
247
  earJwk: earJwk,
248
+ codeChallenge: pkceCodes.challenge,
241
249
  };
242
250
  const msalFrame = await invokeAsync(
243
251
  initiateEarRequest,
@@ -279,25 +287,66 @@ export class SilentIframeClient extends StandardInteractionClient {
279
287
  correlationId
280
288
  )(responseString, responseType, this.logger);
281
289
 
282
- return invokeAsync(
283
- Authorize.handleResponseEAR,
284
- PerformanceEvents.HandleResponseEar,
285
- this.logger,
286
- this.performanceClient,
287
- correlationId
288
- )(
289
- silentRequest,
290
- serverParams,
291
- this.apiId,
292
- this.config,
293
- discoveredAuthority,
294
- this.browserStorage,
295
- this.nativeStorage,
296
- this.eventHandler,
297
- this.logger,
298
- this.performanceClient,
299
- this.platformAuthProvider
300
- );
290
+ if (!serverParams.ear_jwe && serverParams.code) {
291
+ // If server doesn't support EAR, they may fallback to auth code flow instead
292
+ const authClient = await invokeAsync(
293
+ this.createAuthCodeClient.bind(this),
294
+ PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,
295
+ this.logger,
296
+ this.performanceClient,
297
+ correlationId
298
+ )({
299
+ serverTelemetryManager: this.initializeServerTelemetryManager(
300
+ this.apiId
301
+ ),
302
+ requestAuthority: request.authority,
303
+ requestAzureCloudOptions: request.azureCloudOptions,
304
+ requestExtraQueryParameters: request.extraQueryParameters,
305
+ account: request.account,
306
+ authority: discoveredAuthority,
307
+ });
308
+
309
+ return invokeAsync(
310
+ Authorize.handleResponseCode,
311
+ PerformanceEvents.HandleResponseCode,
312
+ this.logger,
313
+ this.performanceClient,
314
+ correlationId
315
+ )(
316
+ silentRequest,
317
+ serverParams,
318
+ pkceCodes.verifier,
319
+ this.apiId,
320
+ this.config,
321
+ authClient,
322
+ this.browserStorage,
323
+ this.nativeStorage,
324
+ this.eventHandler,
325
+ this.logger,
326
+ this.performanceClient,
327
+ this.platformAuthProvider
328
+ );
329
+ } else {
330
+ return invokeAsync(
331
+ Authorize.handleResponseEAR,
332
+ PerformanceEvents.HandleResponseEar,
333
+ this.logger,
334
+ this.performanceClient,
335
+ correlationId
336
+ )(
337
+ silentRequest,
338
+ serverParams,
339
+ this.apiId,
340
+ this.config,
341
+ discoveredAuthority,
342
+ this.browserStorage,
343
+ this.nativeStorage,
344
+ this.eventHandler,
345
+ this.logger,
346
+ this.performanceClient,
347
+ this.platformAuthProvider
348
+ );
349
+ }
301
350
  }
302
351
 
303
352
  /**
@@ -20,6 +20,7 @@ import {
20
20
  BaseAuthRequest,
21
21
  StringDict,
22
22
  CommonAuthorizationUrlRequest,
23
+ Authority,
23
24
  } from "@azure/msal-common/browser";
24
25
  import { BaseInteractionClient } from "./BaseInteractionClient.js";
25
26
  import {
@@ -186,6 +187,7 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
186
187
  requestAzureCloudOptions?: AzureCloudOptions;
187
188
  requestExtraQueryParameters?: StringDict;
188
189
  account?: AccountInfo;
190
+ authority?: Authority;
189
191
  }): Promise<AuthorizationCodeClient> {
190
192
  this.performanceClient.addQueueMeasurement(
191
193
  PerformanceEvents.StandardInteractionClientCreateAuthCodeClient,
@@ -222,6 +224,7 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
222
224
  requestAzureCloudOptions?: AzureCloudOptions;
223
225
  requestExtraQueryParameters?: StringDict;
224
226
  account?: AccountInfo;
227
+ authority?: Authority;
225
228
  }): Promise<ClientConfiguration> {
226
229
  const {
227
230
  serverTelemetryManager,
@@ -235,18 +238,20 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
235
238
  PerformanceEvents.StandardInteractionClientGetClientConfiguration,
236
239
  this.correlationId
237
240
  );
238
- const discoveredAuthority = await invokeAsync(
239
- this.getDiscoveredAuthority.bind(this),
240
- PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,
241
- this.logger,
242
- this.performanceClient,
243
- this.correlationId
244
- )({
245
- requestAuthority,
246
- requestAzureCloudOptions,
247
- requestExtraQueryParameters,
248
- account,
249
- });
241
+ const discoveredAuthority =
242
+ params.authority ||
243
+ (await invokeAsync(
244
+ this.getDiscoveredAuthority.bind(this),
245
+ PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority,
246
+ this.logger,
247
+ this.performanceClient,
248
+ this.correlationId
249
+ )({
250
+ requestAuthority,
251
+ requestAzureCloudOptions,
252
+ requestExtraQueryParameters,
253
+ account,
254
+ }));
250
255
  const logger = this.config.system.loggerOptions;
251
256
 
252
257
  return {
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable header/header */
2
2
  export const name = "@azure/msal-browser";
3
- export const version = "4.26.1";
3
+ export const version = "4.26.2";
@@ -203,6 +203,13 @@ export async function getEARForm(
203
203
  );
204
204
  RequestParameterBuilder.addEARParameters(parameters, request.earJwk);
205
205
 
206
+ // Also add codeChallenge as backup in case EAR is not supported
207
+ RequestParameterBuilder.addCodeChallengeParams(
208
+ parameters,
209
+ request.codeChallenge,
210
+ Constants.S256_CODE_CHALLENGE_METHOD
211
+ );
212
+
206
213
  const queryParams = new Map<string, string>();
207
214
  RequestParameterBuilder.addExtraQueryParameters(
208
215
  queryParams,