@azure/msal-browser 5.27.0 → 5.29.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 (567) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  4. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +9 -1
  5. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +7 -6
  7. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
  8. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +4 -2
  9. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
  10. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +21 -7
  11. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -1
  12. package/dist/cache/AccountManager.mjs +1 -1
  13. package/dist/cache/AsyncMemoryStorage.mjs +14 -1
  14. package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
  15. package/dist/cache/BrowserCacheManager.mjs +9 -2
  16. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  17. package/dist/cache/CacheHelpers.mjs +1 -1
  18. package/dist/cache/CacheKeys.mjs +1 -1
  19. package/dist/cache/CookieStorage.mjs +1 -1
  20. package/dist/cache/DatabaseStorage.mjs +1 -1
  21. package/dist/cache/EncryptedData.mjs +1 -1
  22. package/dist/cache/LocalStorage.mjs +1 -1
  23. package/dist/cache/MemoryStorage.mjs +1 -1
  24. package/dist/cache/SessionStorage.mjs +1 -1
  25. package/dist/cache/TokenCache.mjs +1 -1
  26. package/dist/config/Configuration.mjs +1 -1
  27. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  28. package/dist/controllers/StandardController.mjs +65 -7
  29. package/dist/controllers/StandardController.mjs.map +1 -1
  30. package/dist/crypto/BrowserCrypto.mjs +1 -1
  31. package/dist/crypto/CryptoOps.mjs +1 -1
  32. package/dist/crypto/PkceGenerator.mjs +1 -1
  33. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  34. package/dist/crypto/TokenBindingKeyManager.mjs +14 -1
  35. package/dist/crypto/TokenBindingKeyManager.mjs.map +1 -1
  36. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  37. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +6 -4
  38. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  39. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +58 -50
  40. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  41. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  51. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  52. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  53. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  54. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  55. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  56. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  57. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  58. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +3 -5
  59. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
  60. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +19 -13
  61. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
  62. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +8 -2
  63. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -1
  64. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +58 -69
  65. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
  66. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +68 -0
  67. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -0
  68. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +44 -16
  69. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
  70. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +100 -0
  71. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -0
  72. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +5 -3
  73. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -1
  74. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +27 -19
  75. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
  76. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +2 -4
  77. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
  78. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +2 -3
  79. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
  80. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +20 -8
  81. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
  82. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +110 -0
  83. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
  84. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  85. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  86. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  87. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  88. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +2 -1
  89. package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
  90. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  91. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  92. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  93. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  94. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  95. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  96. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  97. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  98. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  99. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  100. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  101. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  102. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  103. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  104. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  105. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  106. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  107. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +465 -186
  108. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
  109. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +2 -6
  110. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
  111. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +18 -3
  112. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -1
  113. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  114. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  115. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  116. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  117. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  118. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  119. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  120. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  121. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  122. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +10 -8
  123. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -1
  124. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
  125. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +147 -38
  126. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -1
  127. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
  128. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
  129. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +21 -10
  130. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -1
  131. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
  132. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +2 -12
  133. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
  134. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +2 -2
  135. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -1
  136. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  137. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  138. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +15 -3
  139. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
  140. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +10 -3
  141. package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
  142. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +17 -2
  143. package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
  144. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  145. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  146. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  147. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  148. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  149. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  150. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  151. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  152. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  153. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  154. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  155. package/dist/custom_auth/index.mjs +6 -3
  156. package/dist/custom_auth/index.mjs.map +1 -1
  157. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  158. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  159. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  160. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  161. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  162. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  163. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  164. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  165. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  166. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  167. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  168. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +49 -14
  169. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
  170. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +24 -0
  171. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs.map +1 -0
  172. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  173. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  174. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  175. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  176. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  177. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  178. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  179. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  180. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  181. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  182. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  183. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  184. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  185. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +4 -7
  186. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
  187. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +2 -2
  188. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -1
  189. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  190. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  191. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  192. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  193. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  194. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  195. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  196. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  197. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  198. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  199. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  200. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  201. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  202. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  203. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +17 -8
  204. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
  205. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +78 -0
  206. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs.map +1 -0
  207. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +48 -0
  208. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs.map +1 -0
  209. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +49 -0
  210. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs.map +1 -0
  211. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +21 -21
  212. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -1
  213. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  214. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  215. package/dist/encode/Base64Decode.mjs +1 -1
  216. package/dist/encode/Base64Encode.mjs +1 -1
  217. package/dist/error/BrowserAuthError.mjs +1 -1
  218. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  219. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  220. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  221. package/dist/error/NativeAuthError.mjs +1 -1
  222. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  223. package/dist/error/NestedAppAuthError.mjs +1 -1
  224. package/dist/event/EventHandler.mjs +1 -1
  225. package/dist/event/EventMessage.mjs +1 -1
  226. package/dist/event/EventType.mjs +1 -1
  227. package/dist/index.mjs +1 -1
  228. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  229. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  230. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +526 -90
  231. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  232. package/dist/interaction_client/PopupClient.mjs +27 -20
  233. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  234. package/dist/interaction_client/RedirectClient.mjs +29 -14
  235. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  236. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  237. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  238. package/dist/interaction_client/SilentIframeClient.mjs +44 -32
  239. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  240. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  241. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  242. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  243. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  244. package/dist/log-strings-mapping.json +77 -25
  245. package/dist/naa/BridgeError.mjs +1 -1
  246. package/dist/naa/BridgeProxy.mjs +1 -1
  247. package/dist/naa/BridgeStatusCode.mjs +1 -1
  248. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  249. package/dist/navigation/NavigationClient.mjs +1 -1
  250. package/dist/network/FetchClient.mjs +1 -1
  251. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  252. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  253. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  254. package/dist/packageMetadata.mjs +2 -2
  255. package/dist/popup_relay/constants.mjs +1 -1
  256. package/dist/popup_relay/index.mjs +1 -1
  257. package/dist/popup_relay/relayClient.mjs +1 -1
  258. package/dist/protocol/Authorize.mjs +21 -13
  259. package/dist/protocol/Authorize.mjs.map +1 -1
  260. package/dist/redirect_bridge/index.mjs +1 -1
  261. package/dist/request/RequestHelpers.mjs +35 -11
  262. package/dist/request/RequestHelpers.mjs.map +1 -1
  263. package/dist/request/SilentRequestHelpers.mjs +6 -6
  264. package/dist/request/SilentRequestHelpers.mjs.map +1 -1
  265. package/dist/response/ResponseHandler.mjs +1 -1
  266. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  267. package/dist/telemetry/BrowserPerformanceEvents.mjs +3 -2
  268. package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
  269. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  270. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  271. package/dist/utils/BrowserConstants.mjs +1 -1
  272. package/dist/utils/BrowserDetection.mjs +1 -1
  273. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  274. package/dist/utils/BrowserUtils.mjs +1 -1
  275. package/dist/utils/Helpers.mjs +1 -1
  276. package/dist/utils/IframeMonitor.mjs +1 -1
  277. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  278. package/dist/utils/PopupMonitor.mjs +1 -1
  279. package/dist/utils/PopupOriginCheck.mjs +1 -1
  280. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  281. package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
  282. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  283. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  284. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  285. package/dist/webBrokerBridge/index.mjs +1 -1
  286. package/lib/custom-auth-path/log-strings-mapping.json +69 -17
  287. package/lib/custom-auth-path/msal-custom-auth.cjs +2394 -920
  288. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  289. package/lib/custom-auth-path/msal-custom-auth.js +2394 -920
  290. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  291. package/lib/log-strings-mapping.json +23 -11
  292. package/lib/msal-browser.cjs +943 -278
  293. package/lib/msal-browser.cjs.map +1 -1
  294. package/lib/msal-browser.js +943 -278
  295. package/lib/msal-browser.js.map +1 -1
  296. package/lib/msal-browser.min.js +2 -2
  297. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  298. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  299. package/lib/popup-relay/msal-popup-relay.js +2 -2
  300. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  301. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  302. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  303. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  304. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  305. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  306. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  307. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
  308. package/package.json +2 -2
  309. package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +15 -0
  310. package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +6 -21
  311. package/src/broker/nativeBroker/PlatformAuthProvider.ts +3 -1
  312. package/src/broker/nativeBroker/PlatformAuthRequest.ts +12 -8
  313. package/src/broker/nativeBroker/PlatformAuthResponse.ts +31 -0
  314. package/src/cache/AsyncMemoryStorage.ts +16 -0
  315. package/src/cache/BrowserCacheManager.ts +19 -1
  316. package/src/controllers/StandardController.ts +107 -11
  317. package/src/crypto/TokenBindingKeyManager.ts +21 -0
  318. package/src/custom_auth/CustomAuthActionInputs.ts +12 -5
  319. package/src/custom_auth/CustomAuthPublicClientApplication.ts +5 -3
  320. package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +5 -3
  321. package/src/custom_auth/controller/CustomAuthStandardController.ts +79 -92
  322. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +14 -0
  323. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +1 -4
  324. package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +5 -4
  325. package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +28 -16
  326. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +6 -0
  327. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +83 -72
  328. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +23 -0
  329. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +28 -0
  330. package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +10 -6
  331. package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +9 -6
  332. package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +4 -6
  333. package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +36 -0
  334. package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +8 -8
  335. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +94 -0
  336. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +68 -14
  337. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +150 -0
  338. package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +8 -2
  339. package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +48 -24
  340. package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +1 -3
  341. package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +24 -2
  342. package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +1 -2
  343. package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +34 -9
  344. package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +179 -0
  345. package/src/custom_auth/core/error/InvalidArgumentError.ts +1 -1
  346. package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +13 -12
  347. package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +771 -261
  348. package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +2 -6
  349. package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +27 -15
  350. package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +97 -26
  351. package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +9 -6
  352. package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +330 -63
  353. package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +51 -15
  354. package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +25 -6
  355. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +0 -6
  356. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +48 -48
  357. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +44 -37
  358. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +32 -15
  359. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +14 -10
  360. package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +24 -1
  361. package/src/custom_auth/core/telemetry/PublicApiId.ts +7 -0
  362. package/src/custom_auth/core/utils/ArgumentValidator.ts +26 -0
  363. package/src/custom_auth/index.ts +21 -11
  364. package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +8 -10
  365. package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +71 -16
  366. package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.ts +30 -0
  367. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +4 -8
  368. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +4 -5
  369. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +3 -6
  370. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +0 -3
  371. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +2 -3
  372. package/src/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.ts +49 -0
  373. package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +8 -4
  374. package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +18 -4
  375. package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +26 -5
  376. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.ts +101 -0
  377. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.ts +53 -0
  378. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.ts +97 -0
  379. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +0 -6
  380. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +33 -43
  381. package/src/interaction_client/PlatformAuthInteractionClient.ts +886 -148
  382. package/src/interaction_client/PopupClient.ts +104 -83
  383. package/src/interaction_client/RedirectClient.ts +88 -34
  384. package/src/interaction_client/SilentIframeClient.ts +121 -95
  385. package/src/packageMetadata.ts +1 -1
  386. package/src/protocol/Authorize.ts +46 -18
  387. package/src/request/RequestHelpers.ts +64 -11
  388. package/src/request/SilentRequestHelpers.ts +8 -9
  389. package/src/telemetry/BrowserPerformanceEvents.ts +1 -0
  390. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
  391. package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
  392. package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
  393. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +6 -1
  394. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
  395. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +21 -0
  396. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
  397. package/types/cache/AsyncMemoryStorage.d.ts +5 -0
  398. package/types/cache/AsyncMemoryStorage.d.ts.map +1 -1
  399. package/types/cache/BrowserCacheManager.d.ts +4 -0
  400. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  401. package/types/controllers/StandardController.d.ts +5 -0
  402. package/types/controllers/StandardController.d.ts.map +1 -1
  403. package/types/crypto/TokenBindingKeyManager.d.ts +9 -0
  404. package/types/crypto/TokenBindingKeyManager.d.ts.map +1 -1
  405. package/types/custom_auth/CustomAuthActionInputs.d.ts +12 -5
  406. package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
  407. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  408. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +5 -3
  409. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
  410. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +5 -3
  411. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
  412. package/types/custom_auth/controller/CustomAuthStandardController.d.ts +2 -0
  413. package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
  414. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +10 -0
  415. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -0
  416. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +1 -4
  417. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
  418. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +5 -4
  419. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
  420. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +17 -8
  421. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
  422. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +6 -0
  423. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -1
  424. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +23 -44
  425. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
  426. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +14 -0
  427. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -0
  428. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +16 -0
  429. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -0
  430. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +7 -6
  431. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
  432. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +8 -7
  433. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
  434. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +4 -6
  435. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
  436. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +20 -0
  437. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
  438. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +7 -8
  439. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
  440. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +22 -0
  441. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -0
  442. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +3 -6
  443. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
  444. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +28 -0
  445. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -0
  446. package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +3 -2
  447. package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -1
  448. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +6 -8
  449. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
  450. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +1 -3
  451. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
  452. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +18 -2
  453. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
  454. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +1 -2
  455. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
  456. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +5 -6
  457. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
  458. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +23 -0
  459. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
  460. package/types/custom_auth/core/error/InvalidArgumentError.d.ts +1 -0
  461. package/types/custom_auth/core/error/InvalidArgumentError.d.ts.map +1 -1
  462. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +9 -1
  463. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
  464. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +19 -10
  465. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
  466. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +1 -1
  467. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -1
  468. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +19 -5
  469. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
  470. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +39 -4
  471. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
  472. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +8 -0
  473. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -1
  474. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +8 -2
  475. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
  476. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +4 -3
  477. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -1
  478. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +13 -1
  479. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
  480. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -1
  481. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +36 -9
  482. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
  483. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +30 -17
  484. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
  485. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +18 -4
  486. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
  487. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +8 -11
  488. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
  489. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +2 -1
  490. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
  491. package/types/custom_auth/core/telemetry/PublicApiId.d.ts +7 -0
  492. package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
  493. package/types/custom_auth/core/utils/ArgumentValidator.d.ts +3 -0
  494. package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
  495. package/types/custom_auth/index.d.ts +10 -5
  496. package/types/custom_auth/index.d.ts.map +1 -1
  497. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +7 -11
  498. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
  499. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +7 -5
  500. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
  501. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts +7 -0
  502. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts.map +1 -0
  503. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -8
  504. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
  505. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +5 -5
  506. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
  507. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +3 -6
  508. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
  509. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +0 -1
  510. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -1
  511. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts +3 -2
  512. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -1
  513. package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts +27 -0
  514. package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts.map +1 -0
  515. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +6 -3
  516. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
  517. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +13 -3
  518. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
  519. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +8 -3
  520. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
  521. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts +24 -0
  522. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts.map +1 -0
  523. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts +18 -0
  524. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts.map +1 -0
  525. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts +7 -0
  526. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts.map +1 -0
  527. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +0 -4
  528. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -1
  529. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +5 -4
  530. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -1
  531. package/types/interaction_client/PlatformAuthInteractionClient.d.ts +110 -8
  532. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  533. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  534. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  535. package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  536. package/types/packageMetadata.d.ts +1 -1
  537. package/types/protocol/Authorize.d.ts +4 -4
  538. package/types/protocol/Authorize.d.ts.map +1 -1
  539. package/types/request/RequestHelpers.d.ts +21 -3
  540. package/types/request/RequestHelpers.d.ts.map +1 -1
  541. package/types/request/SilentRequestHelpers.d.ts.map +1 -1
  542. package/types/telemetry/BrowserPerformanceEvents.d.ts +1 -0
  543. package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
  544. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +0 -70
  545. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +0 -1
  546. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +0 -25
  547. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +0 -1
  548. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +0 -45
  549. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +0 -1
  550. package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +0 -23
  551. package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +0 -19
  552. package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -20
  553. package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +0 -97
  554. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +0 -34
  555. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -61
  556. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +0 -14
  557. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +0 -1
  558. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts +0 -13
  559. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +0 -1
  560. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -8
  561. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +0 -1
  562. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -17
  563. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +0 -1
  564. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +0 -11
  565. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +0 -1
  566. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +0 -19
  567. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +0 -1
@@ -6,24 +6,29 @@
6
6
  import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
7
7
  import type { MFAVerificationRequiredStateParametersV2 } from "./CustomAuthStateParametersV2.js";
8
8
  import type { MFASubmitChallengeResultV2 } from "../result/MFASubmitChallengeResultV2.js";
9
- import type { MFAResendChallengeResultV2 } from "../result/MFAResendChallengeResultV2.js";
9
+ import type { RequestChallengeResultV2 } from "../result/RequestChallengeResultV2.js";
10
10
  import { CompletedStateV2 } from "./CompletedStateV2.js";
11
11
  import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
12
- import { FLOW_COMPLETED_V2 } from "../../../interaction_client/v2/result/FlowActionResultV2.js";
12
+ import {
13
+ FLOW_COMPLETED_V2,
14
+ FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2,
15
+ } from "../../../interaction_client/v2/result/FlowActionResultV2.js";
16
+ import { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
13
17
  import { CustomAuthError } from "../../../error/CustomAuthError.js";
14
18
  import { UNSUPPORTED_FLOW_TRANSITION } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
15
19
  import { ChallengeVerificationStateBaseV2 } from "./ChallengeVerificationStateBaseV2.js";
20
+ import { AuthenticationFactorV2 } from "../../../network_client/custom_auth_api/v2/result/BaseResultsV2.js";
16
21
 
17
22
  /**
18
- * State returned when sign-in requires verification of an email or SMS MFA
23
+ * State returned when authentication requires verification of an email or SMS MFA
19
24
  * challenge. It allows the app to submit the challenge or request a replacement.
25
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
20
26
  */
21
27
  export class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBaseV2<MFAVerificationRequiredStateParametersV2> {
22
28
  readonly stateType = "mfaVerificationRequired";
23
29
 
24
30
  /**
25
31
  * Submits the email or SMS challenge as the second authentication factor.
26
- * Successful verification completes sign-in.
27
32
  * @param challenge - The challenge value to submit.
28
33
  * @returns The result of submitting the MFA challenge.
29
34
  */
@@ -35,7 +40,25 @@ export class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBa
35
40
 
36
41
  try {
37
42
  logger.verbose("Submitting V2 MFA challenge.", correlationId);
38
- const result = await this.submitCodeCore(challenge);
43
+ const result = await this.submitCodeCore(
44
+ challenge,
45
+ AuthenticationFactorV2.MULTI_FACTOR
46
+ );
47
+
48
+ if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
49
+ return new CustomAuthResultV2(
50
+ new SignInContinuationStateV2({
51
+ correlationId: result.correlationId,
52
+ logger,
53
+ config: this.stateParameters.config,
54
+ flowClient: this.stateParameters.flowClient,
55
+ continuationState: result.continuationState,
56
+ cacheClient: this.stateParameters.cacheClient,
57
+ }),
58
+ undefined,
59
+ result.continuationState.scenario
60
+ );
61
+ }
39
62
 
40
63
  if (result.type !== FLOW_COMPLETED_V2) {
41
64
  throw new CustomAuthError(
@@ -67,22 +90,24 @@ export class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBa
67
90
  return CustomAuthResultV2.createWithError(error, {
68
91
  scenario: continuationState.scenario,
69
92
  correlationId,
93
+ errorContext: "mfaVerification",
70
94
  });
71
95
  }
72
96
  }
73
97
 
74
98
  /**
75
- * Requests a replacement challenge for the selected MFA method. The
76
- * returned state contains the refreshed email or SMS challenge metadata.
99
+ * Requests a replacement challenge for the selected MFA method.
77
100
  * @returns The result of requesting a replacement MFA challenge.
78
101
  */
79
- async resendChallenge(): Promise<MFAResendChallengeResultV2> {
102
+ async resendChallenge(): Promise<RequestChallengeResultV2> {
80
103
  const { correlationId, logger, continuationState } =
81
104
  this.stateParameters;
82
105
 
83
106
  try {
84
107
  logger.verbose("Resending V2 MFA challenge.", correlationId);
85
- const result = await this.resendCodeCore();
108
+ const result = await this.resendCodeCore(
109
+ AuthenticationFactorV2.MULTI_FACTOR
110
+ );
86
111
 
87
112
  return new CustomAuthResultV2(
88
113
  new MFAVerificationRequiredStateV2({
@@ -0,0 +1,179 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { AuthFlowActionRequiredStateBase } from "../../AuthFlowState.js";
7
+ import type { PasswordRequiredStateParametersV2 } from "./CustomAuthStateParametersV2.js";
8
+ import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
9
+ import { CompletedStateV2 } from "./CompletedStateV2.js";
10
+ import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
11
+ import type { SubmitPasswordResultV2 } from "../result/SubmitPasswordResultV2.js";
12
+ import { AuthMethodSelectionRequiredStateV2 } from "./AuthMethodSelectionRequiredStateV2.js";
13
+ import {
14
+ FLOW_COMPLETED_V2,
15
+ FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
16
+ FLOW_MFA_REQUIRED_V2,
17
+ } from "../../../interaction_client/v2/result/FlowActionResultV2.js";
18
+ import { CustomAuthError } from "../../../error/CustomAuthError.js";
19
+ import { UnexpectedError } from "../../../error/UnexpectedError.js";
20
+ import { UNSUPPORTED_FLOW_TRANSITION } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
21
+ import { AuthenticationFactorV2 } from "../../../network_client/custom_auth_api/v2/result/BaseResultsV2.js";
22
+ import { AuthMethodRegistrationRequiredStateV2 } from "./AuthMethodRegistrationRequiredStateV2.js";
23
+ import { CustomAuthFlowScenarioV2 } from "../CustomAuthFlowScenarioV2.js";
24
+ import type { SignUpAttributeV2 } from "../../../network_client/custom_auth_api/v2/result/SignUpResultsV2.js";
25
+ import type { SubmitAttributesResultV2 } from "../../../../sign_up/auth_flow/v2/result/SubmitAttributesResultV2.js";
26
+
27
+ /**
28
+ * State returned when sign-in or sign-up requires a password.
29
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
30
+ */
31
+ export class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<PasswordRequiredStateParametersV2> {
32
+ readonly stateType = "passwordRequired";
33
+
34
+ readonly requestedPasswordAttribute?: SignUpAttributeV2;
35
+
36
+ constructor(stateParameters: PasswordRequiredStateParametersV2) {
37
+ super(stateParameters);
38
+ this.requestedPasswordAttribute =
39
+ stateParameters.requestedPasswordAttribute;
40
+ }
41
+
42
+ /**
43
+ * Submits the password and advances the active flow. Use the returned result
44
+ * to continue the flow.
45
+ * @param password - The account password.
46
+ * @returns The result containing the next state or an error.
47
+ */
48
+ async submitPassword(password: string): Promise<SubmitPasswordResultV2> {
49
+ const { correlationId, logger, continuationState } =
50
+ this.stateParameters;
51
+
52
+ try {
53
+ this.ensurePasswordIsNotEmpty(password);
54
+
55
+ if (
56
+ continuationState.scenario === CustomAuthFlowScenarioV2.SignUp
57
+ ) {
58
+ return await this.submitSignUpPassword(password);
59
+ }
60
+
61
+ if (
62
+ continuationState.scenario === CustomAuthFlowScenarioV2.SignIn
63
+ ) {
64
+ return await this.submitSignInPassword(password);
65
+ }
66
+
67
+ throw new CustomAuthError(
68
+ UNSUPPORTED_FLOW_TRANSITION,
69
+ `Password submission is not supported for the '${continuationState.scenario}' flow.`,
70
+ correlationId
71
+ );
72
+ } catch (error) {
73
+ logger.errorPii(
74
+ `Failed to submit V2 password. Error: '${error}'.`,
75
+ correlationId
76
+ );
77
+
78
+ return CustomAuthResultV2.createWithError(error, {
79
+ scenario: continuationState.scenario,
80
+ correlationId,
81
+ });
82
+ }
83
+ }
84
+
85
+ private async submitSignUpPassword(
86
+ password: string
87
+ ): Promise<SubmitAttributesResultV2> {
88
+ const { correlationId, continuationState, flowClient } =
89
+ this.stateParameters;
90
+ const signUpStateTransitionHandler =
91
+ this.stateParameters.signUpStateTransitionHandler;
92
+
93
+ if (!signUpStateTransitionHandler) {
94
+ throw new UnexpectedError(
95
+ "Sign-up state transition handler is missing.",
96
+ correlationId
97
+ );
98
+ }
99
+
100
+ const result = await flowClient.submitSignUpAttributes({
101
+ correlationId,
102
+ continuationState,
103
+ attributes: { password },
104
+ });
105
+ return signUpStateTransitionHandler.handleAttributeSubmission(
106
+ result,
107
+ { ...this.stateParameters, signUpStateTransitionHandler },
108
+ "password"
109
+ );
110
+ }
111
+
112
+ private async submitSignInPassword(
113
+ password: string
114
+ ): Promise<SubmitPasswordResultV2> {
115
+ const { correlationId, logger, continuationState, flowClient } =
116
+ this.stateParameters;
117
+ const result = await flowClient.submitSignInPassword({
118
+ correlationId,
119
+ continuationState,
120
+ password,
121
+ });
122
+ const resultType: string = result.type;
123
+
124
+ if (result.type === FLOW_COMPLETED_V2) {
125
+ const account = new CustomAuthAccountData(
126
+ result.authenticationResult.account,
127
+ this.stateParameters.config,
128
+ this.stateParameters.cacheClient,
129
+ logger,
130
+ correlationId
131
+ );
132
+
133
+ return new CustomAuthResultV2(
134
+ new CompletedStateV2(),
135
+ account,
136
+ continuationState.scenario
137
+ );
138
+ }
139
+
140
+ if (result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2) {
141
+ return new CustomAuthResultV2(
142
+ new AuthMethodRegistrationRequiredStateV2({
143
+ correlationId: result.correlationId,
144
+ logger,
145
+ config: this.stateParameters.config,
146
+ flowClient,
147
+ continuationState: result.continuationState,
148
+ cacheClient: this.stateParameters.cacheClient,
149
+ methods: result.methods,
150
+ }),
151
+ undefined,
152
+ result.continuationState.scenario
153
+ );
154
+ }
155
+
156
+ if (result.type === FLOW_MFA_REQUIRED_V2) {
157
+ return new CustomAuthResultV2(
158
+ new AuthMethodSelectionRequiredStateV2({
159
+ correlationId: result.correlationId,
160
+ logger,
161
+ config: this.stateParameters.config,
162
+ flowClient,
163
+ continuationState: result.continuationState,
164
+ cacheClient: this.stateParameters.cacheClient,
165
+ methods: result.methods,
166
+ authenticationFactor: AuthenticationFactorV2.MULTI_FACTOR,
167
+ }),
168
+ undefined,
169
+ result.continuationState.scenario
170
+ );
171
+ }
172
+
173
+ throw new CustomAuthError(
174
+ UNSUPPORTED_FLOW_TRANSITION,
175
+ `Password verification result type '${resultType}' is not supported.`,
176
+ correlationId
177
+ );
178
+ }
179
+ }
@@ -6,7 +6,7 @@
6
6
  import { CustomAuthError } from "./CustomAuthError.js";
7
7
 
8
8
  export class InvalidArgumentError extends CustomAuthError {
9
- constructor(argName: string, correlationId?: string) {
9
+ constructor(public readonly argName: string, correlationId?: string) {
10
10
  const errorDescription = `The argument '${argName}' is invalid.`;
11
11
 
12
12
  super("invalid_argument", errorDescription, correlationId);
@@ -4,31 +4,32 @@
4
4
  */
5
5
 
6
6
  import { CustomAuthFlowScenarioV2 } from "../../auth_flow/v2/CustomAuthFlowScenarioV2.js";
7
+ import type { UserAccountAttributes } from "../../../UserAccountAttributes.js";
7
8
 
8
- /*
9
- * Server-provided `_links` hrefs used to continue a flow. Each response supplies
10
- * the links needed for the next action.
11
- */
12
9
  export interface FlowLinksV2 {
13
10
  challenge?: string;
14
11
  verify?: string;
12
+ activate?: string;
15
13
  resend?: string;
16
14
  update?: string;
17
15
  poll?: string;
18
16
  submitAttributes?: string;
19
17
  }
20
18
 
21
- /*
22
- * Opaque state used to resume a server-driven flow. It carries the continuation
23
- * token, scenario, normalized entry scopes, and server-provided links without
24
- * exposing them to the app.
25
- */
26
19
  export interface FlowContinuationStateV2 {
27
20
  continuationToken: string;
28
21
  scenario: CustomAuthFlowScenarioV2;
29
22
  scopes: string[];
30
23
  links: FlowLinksV2;
31
- signUp?: {
32
- passwordWasSupplied: boolean;
33
- };
24
+ signUp?:
25
+ | {
26
+ purpose: "existingAccount";
27
+ pendingProfileAttributes?: never;
28
+ submittedAttributeIds?: never;
29
+ }
30
+ | {
31
+ purpose: "newAccount";
32
+ pendingProfileAttributes?: Readonly<UserAccountAttributes>;
33
+ submittedAttributeIds: readonly string[];
34
+ };
34
35
  }