@azure/msal-browser 5.28.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 (501) 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 +1 -1
  5. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthRequest.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/NestedAppAuthController.mjs +1 -1
  22. package/dist/controllers/StandardController.mjs +1 -1
  23. package/dist/crypto/BrowserCrypto.mjs +1 -1
  24. package/dist/crypto/CryptoOps.mjs +1 -1
  25. package/dist/crypto/PkceGenerator.mjs +1 -1
  26. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  27. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  28. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  29. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +6 -4
  30. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  31. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +58 -62
  32. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  33. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  34. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  35. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  36. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  37. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  38. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  39. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +3 -5
  51. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
  52. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +19 -13
  53. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
  54. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +8 -2
  55. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -1
  56. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +58 -69
  57. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
  58. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +3 -3
  59. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +42 -15
  60. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
  61. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +17 -4
  62. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -1
  63. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
  64. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +14 -18
  65. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
  66. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +2 -4
  67. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
  68. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +2 -3
  69. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
  70. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +17 -6
  71. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
  72. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +110 -0
  73. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
  74. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  75. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  76. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  77. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  78. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +2 -1
  79. package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
  80. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  81. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  82. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  83. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  84. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  85. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  86. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  87. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  88. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  89. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  90. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  91. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  92. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  93. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  94. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  95. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  96. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  97. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +256 -150
  98. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
  99. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +2 -6
  100. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
  101. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +10 -3
  102. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -1
  103. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  104. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  105. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  106. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  107. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  108. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  109. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  110. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  111. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  112. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -7
  113. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -1
  114. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
  115. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +35 -19
  116. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -1
  117. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
  118. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
  119. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +20 -9
  120. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -1
  121. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
  122. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
  123. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
  124. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -2
  125. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -1
  126. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  127. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  128. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +5 -7
  129. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
  130. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +3 -2
  131. package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
  132. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +17 -2
  133. package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
  134. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  135. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  136. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  137. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  138. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  139. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  140. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  141. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  142. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  143. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  144. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  145. package/dist/custom_auth/index.mjs +4 -3
  146. package/dist/custom_auth/index.mjs.map +1 -1
  147. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  148. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  149. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  150. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  151. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  152. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  153. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  154. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  155. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  156. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  157. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  158. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +23 -7
  159. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
  160. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +24 -0
  161. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs.map +1 -0
  162. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  163. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  164. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  165. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  166. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  167. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  168. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  169. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  170. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  171. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  172. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  173. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  174. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  175. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +4 -7
  176. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
  177. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +2 -2
  178. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -1
  179. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  180. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  181. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  182. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  183. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  184. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  185. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  186. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  187. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  188. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  189. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  190. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  191. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  192. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  193. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +17 -8
  194. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
  195. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +78 -0
  196. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs.map +1 -0
  197. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +48 -0
  198. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs.map +1 -0
  199. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +49 -0
  200. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs.map +1 -0
  201. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +17 -24
  202. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -1
  203. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  204. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  205. package/dist/encode/Base64Decode.mjs +1 -1
  206. package/dist/encode/Base64Encode.mjs +1 -1
  207. package/dist/error/BrowserAuthError.mjs +1 -1
  208. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  209. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  210. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  211. package/dist/error/NativeAuthError.mjs +1 -1
  212. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  213. package/dist/error/NestedAppAuthError.mjs +1 -1
  214. package/dist/event/EventHandler.mjs +1 -1
  215. package/dist/event/EventMessage.mjs +1 -1
  216. package/dist/event/EventType.mjs +1 -1
  217. package/dist/index.mjs +1 -1
  218. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  219. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  220. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +38 -31
  221. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  222. package/dist/interaction_client/PopupClient.mjs +1 -1
  223. package/dist/interaction_client/RedirectClient.mjs +1 -1
  224. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  225. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  226. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  227. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  228. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  229. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  230. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  231. package/dist/log-strings-mapping.json +21 -9
  232. package/dist/naa/BridgeError.mjs +1 -1
  233. package/dist/naa/BridgeProxy.mjs +1 -1
  234. package/dist/naa/BridgeStatusCode.mjs +1 -1
  235. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  236. package/dist/navigation/NavigationClient.mjs +1 -1
  237. package/dist/network/FetchClient.mjs +1 -1
  238. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  239. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  240. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  241. package/dist/packageMetadata.mjs +2 -2
  242. package/dist/popup_relay/constants.mjs +1 -1
  243. package/dist/popup_relay/index.mjs +1 -1
  244. package/dist/popup_relay/relayClient.mjs +1 -1
  245. package/dist/protocol/Authorize.mjs +1 -1
  246. package/dist/redirect_bridge/index.mjs +1 -1
  247. package/dist/request/RequestHelpers.mjs +1 -1
  248. package/dist/request/SilentRequestHelpers.mjs +1 -1
  249. package/dist/response/ResponseHandler.mjs +1 -1
  250. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  251. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  252. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  253. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  254. package/dist/utils/BrowserConstants.mjs +1 -1
  255. package/dist/utils/BrowserDetection.mjs +1 -1
  256. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  257. package/dist/utils/BrowserUtils.mjs +1 -1
  258. package/dist/utils/Helpers.mjs +1 -1
  259. package/dist/utils/IframeMonitor.mjs +1 -1
  260. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  261. package/dist/utils/PopupMonitor.mjs +1 -1
  262. package/dist/utils/PopupOriginCheck.mjs +1 -1
  263. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  264. package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
  265. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  266. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  267. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  268. package/dist/webBrokerBridge/index.mjs +1 -1
  269. package/lib/custom-auth-path/log-strings-mapping.json +21 -9
  270. package/lib/custom-auth-path/msal-custom-auth.cjs +1100 -765
  271. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  272. package/lib/custom-auth-path/msal-custom-auth.js +1100 -765
  273. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  274. package/lib/log-strings-mapping.json +7 -3
  275. package/lib/msal-browser.cjs +117 -107
  276. package/lib/msal-browser.cjs.map +1 -1
  277. package/lib/msal-browser.js +117 -107
  278. package/lib/msal-browser.js.map +1 -1
  279. package/lib/msal-browser.min.js +2 -2
  280. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  281. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  282. package/lib/popup-relay/msal-popup-relay.js +2 -2
  283. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  284. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  285. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  286. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  287. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  288. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  289. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  290. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
  291. package/package.json +2 -2
  292. package/src/custom_auth/CustomAuthActionInputs.ts +12 -5
  293. package/src/custom_auth/CustomAuthPublicClientApplication.ts +5 -3
  294. package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +5 -3
  295. package/src/custom_auth/controller/CustomAuthStandardController.ts +79 -110
  296. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +1 -2
  297. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +1 -4
  298. package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +5 -4
  299. package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +28 -16
  300. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +6 -0
  301. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +83 -72
  302. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +3 -3
  303. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +7 -5
  304. package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +10 -6
  305. package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +9 -6
  306. package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +4 -6
  307. package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +36 -0
  308. package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +6 -8
  309. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +2 -2
  310. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +61 -12
  311. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +21 -3
  312. package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +30 -24
  313. package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +1 -3
  314. package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +11 -2
  315. package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +1 -2
  316. package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +26 -7
  317. package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +179 -0
  318. package/src/custom_auth/core/error/InvalidArgumentError.ts +1 -1
  319. package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +12 -12
  320. package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +394 -238
  321. package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +2 -6
  322. package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +2 -15
  323. package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +63 -26
  324. package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +0 -6
  325. package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +74 -26
  326. package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +48 -9
  327. package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +4 -6
  328. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +0 -6
  329. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +14 -53
  330. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +0 -18
  331. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +32 -13
  332. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +8 -9
  333. package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +4 -5
  334. package/src/custom_auth/core/telemetry/PublicApiId.ts +1 -0
  335. package/src/custom_auth/core/utils/ArgumentValidator.ts +26 -0
  336. package/src/custom_auth/index.ts +10 -11
  337. package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +6 -7
  338. package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +28 -5
  339. package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.ts +30 -0
  340. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +4 -8
  341. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +4 -7
  342. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +3 -6
  343. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +0 -3
  344. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +2 -3
  345. package/src/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.ts +49 -0
  346. package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +8 -4
  347. package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +16 -4
  348. package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +26 -5
  349. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.ts +101 -0
  350. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.ts +53 -0
  351. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.ts +97 -0
  352. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +0 -6
  353. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +25 -48
  354. package/src/interaction_client/PlatformAuthInteractionClient.ts +53 -38
  355. package/src/packageMetadata.ts +1 -1
  356. package/types/custom_auth/CustomAuthActionInputs.d.ts +12 -5
  357. package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
  358. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  359. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +5 -3
  360. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
  361. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +5 -3
  362. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
  363. package/types/custom_auth/controller/CustomAuthStandardController.d.ts +2 -0
  364. package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
  365. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +1 -2
  366. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -1
  367. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +1 -4
  368. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
  369. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +5 -4
  370. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
  371. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +17 -8
  372. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
  373. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +6 -0
  374. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -1
  375. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +23 -44
  376. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
  377. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +3 -3
  378. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +7 -6
  379. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -1
  380. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +7 -6
  381. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
  382. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +8 -7
  383. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
  384. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +4 -6
  385. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
  386. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +20 -0
  387. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
  388. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +6 -8
  389. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
  390. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +2 -2
  391. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +3 -6
  392. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
  393. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +3 -3
  394. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -1
  395. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +6 -8
  396. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
  397. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +1 -3
  398. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
  399. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +9 -2
  400. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
  401. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +1 -2
  402. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
  403. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +5 -6
  404. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
  405. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +23 -0
  406. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
  407. package/types/custom_auth/core/error/InvalidArgumentError.d.ts +1 -0
  408. package/types/custom_auth/core/error/InvalidArgumentError.d.ts.map +1 -1
  409. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +8 -1
  410. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
  411. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +12 -10
  412. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
  413. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +1 -1
  414. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -1
  415. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +2 -5
  416. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
  417. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +22 -3
  418. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
  419. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -1
  420. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
  421. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +2 -1
  422. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -1
  423. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +1 -1
  424. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
  425. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -1
  426. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +8 -8
  427. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
  428. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
  429. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +18 -6
  430. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
  431. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +6 -10
  432. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
  433. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +0 -4
  434. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
  435. package/types/custom_auth/core/telemetry/PublicApiId.d.ts +1 -0
  436. package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
  437. package/types/custom_auth/core/utils/ArgumentValidator.d.ts +3 -0
  438. package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
  439. package/types/custom_auth/index.d.ts +5 -5
  440. package/types/custom_auth/index.d.ts.map +1 -1
  441. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +6 -8
  442. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
  443. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +7 -5
  444. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
  445. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts +7 -0
  446. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts.map +1 -0
  447. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -8
  448. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
  449. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +5 -6
  450. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
  451. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +3 -6
  452. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
  453. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +0 -1
  454. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -1
  455. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts +3 -2
  456. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -1
  457. package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts +27 -0
  458. package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts.map +1 -0
  459. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +6 -3
  460. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
  461. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +12 -3
  462. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
  463. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +8 -3
  464. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
  465. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts +24 -0
  466. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts.map +1 -0
  467. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts +18 -0
  468. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts.map +1 -0
  469. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts +7 -0
  470. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts.map +1 -0
  471. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +0 -4
  472. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -1
  473. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +5 -4
  474. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -1
  475. package/types/interaction_client/PlatformAuthInteractionClient.d.ts +4 -3
  476. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  477. package/types/packageMetadata.d.ts +1 -1
  478. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +0 -82
  479. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +0 -1
  480. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +0 -25
  481. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +0 -1
  482. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +0 -45
  483. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +0 -1
  484. package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +0 -23
  485. package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +0 -19
  486. package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -22
  487. package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +0 -115
  488. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +0 -34
  489. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -61
  490. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +0 -14
  491. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +0 -1
  492. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts +0 -13
  493. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +0 -1
  494. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -9
  495. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +0 -1
  496. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -17
  497. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +0 -1
  498. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +0 -11
  499. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +0 -1
  500. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +0 -19
  501. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +0 -1
@@ -5,11 +5,11 @@
5
5
 
6
6
  import { OAuthErrorResponseV2, ServerErrorV2 } from "./ErrorResponsesV2.js";
7
7
  import { HalLink, HalResource } from "./HalResource.js";
8
+ import {
9
+ CHALLENGE_RELATION,
10
+ VERIFY_RELATION,
11
+ } from "../ApiClientConstantsV2.js";
8
12
 
9
- /*
10
- * Envelope shared by every JSON HAL response. `correlationId` is not on the HAL body -
11
- * it is injected by the api-client from the response header; the rest are server body fields.
12
- */
13
13
  export interface HalResponseBaseV2 extends HalResource {
14
14
  continuationToken?: string;
15
15
  state?: string;
@@ -21,9 +21,6 @@ export interface HalResponseBaseV2 extends HalResource {
21
21
  correlationId?: string;
22
22
  }
23
23
 
24
- /*
25
- * A method embedded under `_embedded.methods[]`.
26
- */
27
24
  export interface EmbeddedMethodV2 extends Omit<HalResource, "_links"> {
28
25
  id?: string;
29
26
  type?: string;
@@ -33,12 +30,6 @@ export interface EmbeddedMethodV2 extends Omit<HalResource, "_links"> {
33
30
  };
34
31
  }
35
32
 
36
- /*
37
- * An enrollment option embedded under `_embedded.methods[]`. Enrollment
38
- * methods intentionally remain distinct from challenge methods because they
39
- * have no server-issued id and advertise an `enroll` link rather than a
40
- * `challenge` link.
41
- */
42
33
  export interface EmbeddedEnrollmentMethodV2
43
34
  extends Omit<HalResource, "_links"> {
44
35
  type?: string;
@@ -55,18 +46,10 @@ export interface EnrollmentRequiredResponseV2
55
46
  };
56
47
  }
57
48
 
58
- /*
59
- * Authorize-challenge continuation response containing the authorization code
60
- * that is redeemed at the token endpoint.
61
- */
62
49
  export interface AuthorizeChallengeContinueResponseV2 {
63
50
  code?: string;
64
51
  }
65
52
 
66
- /*
67
- * Authorize-challenge entry response. Success is indicated by a continuation
68
- * token and flat flow hrefs rather than the HTTP status or HAL links.
69
- */
70
53
  export interface AuthorizeChallengeEntryResponseV2
71
54
  extends OAuthErrorResponseV2 {
72
55
  continuation_token?: string;
@@ -75,13 +58,10 @@ export interface AuthorizeChallengeEntryResponseV2
75
58
  sign_up?: string;
76
59
  }
77
60
 
78
- /*
79
- * Start response containing the available authentication
80
- * methods. Each method provides the challenge link used after selection.
81
- */
82
61
  interface StartResponseV2 extends Omit<HalResponseBaseV2, "_embedded"> {
83
- _embedded?: {
84
- methods?: EmbeddedMethodV2[];
62
+ action: typeof CHALLENGE_RELATION;
63
+ _embedded: {
64
+ methods: EmbeddedMethodV2[];
85
65
  };
86
66
  }
87
67
 
@@ -98,14 +78,14 @@ export interface SignUpAttributeResponseV2 {
98
78
  confirmationInput?: string;
99
79
  }
100
80
 
101
- export interface SignUpStartResponseV2
102
- extends Omit<HalResponseBaseV2, "_links"> {
103
- attributes?: SignUpAttributeResponseV2[];
104
- _links?: {
105
- submitAttributes?: HalLink;
106
- };
81
+ export interface SignUpStartVerifyResponseV2 extends CodeChallengeResponseV2 {
82
+ action: typeof VERIFY_RELATION;
107
83
  }
108
84
 
85
+ export type SignUpStartResponseV2 =
86
+ | SignUpStartVerifyResponseV2
87
+ | SignInStartResponseV2;
88
+
109
89
  interface ChallengeResponseBaseV2 extends Omit<HalResponseBaseV2, "_links"> {
110
90
  id?: string;
111
91
  type?: string;
@@ -157,10 +137,6 @@ export interface SignUpSubmitAttributesResponseV2
157
137
  };
158
138
  }
159
139
 
160
- /*
161
- * Credential-verification response. For password reset, the `update` relation
162
- * identifies where the new password is submitted.
163
- */
164
140
  export interface VerifyResponseV2 extends Omit<HalResponseBaseV2, "_links"> {
165
141
  id?: string;
166
142
  type?: string;
@@ -186,10 +162,6 @@ export interface EnrollmentResponseV2
186
162
  };
187
163
  }
188
164
 
189
- /*
190
- * Password-update response for the reset-password flow. The `poll` relation
191
- * identifies where the client checks for completion.
192
- */
193
165
  export interface UpdatePasswordResponseV2
194
166
  extends Omit<HalResponseBaseV2, "_links"> {
195
167
  id?: string;
@@ -200,22 +172,15 @@ export interface UpdatePasswordResponseV2
200
172
  };
201
173
  }
202
174
 
203
- /*
204
- * Password-reset polling response.
205
- */
206
175
  export interface PollResponseV2 extends Omit<HalResponseBaseV2, "_links"> {
207
176
  _links?: {
208
177
  poll?: HalLink;
209
178
  };
210
179
  _embedded?: {
211
- methods?: EmbeddedEnrollmentMethodV2[];
180
+ methods?: (EmbeddedMethodV2 | EmbeddedEnrollmentMethodV2)[];
212
181
  };
213
182
  }
214
183
 
215
- /*
216
- * Flat OAuth token response containing the standard token fields observed on
217
- * the wire. Token errors use `OAuthErrorResponseV2`.
218
- */
219
184
  export interface TokenResponseV2 {
220
185
  token_type: string;
221
186
  expires_in: number;
@@ -227,10 +192,6 @@ export interface TokenResponseV2 {
227
192
  ext_expires_in?: number;
228
193
  }
229
194
 
230
- /*
231
- * Parsed envelope produced by the response handler. It carries the typed body
232
- * together with normalized HTTP metadata and error information.
233
- */
234
195
  export interface ParsedResponseV2<T> {
235
196
  statusCode: number;
236
197
  correlationId: string;
@@ -3,10 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- /*
7
- * Return contracts of the shared V2 base client (BaseApiClientV2), flow-agnostic and reused by
8
- * every V2 flow. Distinct from the per-flow result DTOs (e.g. ResetPasswordResultsV2).
9
- */
10
6
  import type { SignUpAttributeV2 } from "./SignUpResultsV2.js";
11
7
  import {
12
8
  ACTIVATE_RELATION,
@@ -19,7 +15,6 @@ import {
19
15
  ResponseStateV2,
20
16
  } from "../ApiClientConstantsV2.js";
21
17
 
22
- // Initial continuation token and available flow links.
23
18
  export interface AuthorizeChallengeEntryResultV2 {
24
19
  continuationToken: string;
25
20
  resetPasswordHref?: string;
@@ -27,11 +22,6 @@ export interface AuthorizeChallengeEntryResultV2 {
27
22
  signUpHref?: string;
28
23
  }
29
24
 
30
- /*
31
- * A selectable authentication method surfaced by a flow-start response, resolved from
32
- * `_embedded.methods[]`. `challengeHref` is the per-method `challenge` link to POST to send the
33
- * code to that method; `id`/`type`/`hint` are display/selection metadata.
34
- */
35
25
  export interface StartMethodV2 {
36
26
  id: string;
37
27
  type?: string;
@@ -73,10 +63,6 @@ export const AuthenticationFactorV2 = {
73
63
  export type AuthenticationFactorV2 =
74
64
  (typeof AuthenticationFactorV2)[keyof typeof AuthenticationFactorV2];
75
65
 
76
- /*
77
- * Result of starting a flow. It contains the continuation token, available
78
- * authentication methods, authentication factor, and optional server scenario.
79
- */
80
66
  export interface StartResultV2 {
81
67
  continuationToken: string;
82
68
  methods: StartMethodV2[];
@@ -107,10 +93,6 @@ export type ChallengeResultV2 =
107
93
  | ChallengeVerificationResultV2
108
94
  | RiskVerificationRequiredResultV2;
109
95
 
110
- /*
111
- * Result of verifying a credential. The discriminated union identifies whether
112
- * another update is required or token redemption can continue.
113
- */
114
96
  export type VerifyResultV2 =
115
97
  | {
116
98
  nextAction: typeof UPDATE_RELATION;
@@ -3,22 +3,41 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import type { EnrollmentMethodV2 } from "./BaseResultsV2.js";
6
+ import type {
7
+ AuthenticationFactorV2,
8
+ EnrollmentMethodV2,
9
+ StartMethodV2,
10
+ } from "./BaseResultsV2.js";
11
+ import {
12
+ CHALLENGE_RELATION,
13
+ ENROLL_RELATION,
14
+ POLL_RELATION,
15
+ ResponseStateV2,
16
+ } from "../ApiClientConstantsV2.js";
7
17
 
8
- /*
9
- * Reset-password response contracts used by the controller. Shared response
10
- * contracts are defined in `BaseResultsV2`.
11
- */
12
-
13
- // Result of submitting the new password: where to poll for completion.
14
18
  export interface ResetPasswordUpdateResultV2 {
15
19
  continuationToken: string;
16
20
  pollHref: string;
17
21
  }
18
22
 
19
- export interface ResetPasswordPollResultV2 {
20
- continuationToken: string;
21
- nextAction: string;
22
- pollHref?: string;
23
- enrollmentMethods?: EnrollmentMethodV2[];
24
- }
23
+ export type ResetPasswordPollResultV2 =
24
+ | {
25
+ nextAction: typeof POLL_RELATION;
26
+ continuationToken: string;
27
+ pollHref: string;
28
+ }
29
+ | {
30
+ nextAction: typeof ENROLL_RELATION;
31
+ continuationToken: string;
32
+ methods: EnrollmentMethodV2[];
33
+ }
34
+ | {
35
+ nextAction: typeof CHALLENGE_RELATION;
36
+ continuationToken: string;
37
+ authenticationFactor: AuthenticationFactorV2;
38
+ methods: StartMethodV2[];
39
+ }
40
+ | {
41
+ nextAction: typeof ResponseStateV2.CONTINUE;
42
+ continuationToken: string;
43
+ };
@@ -6,7 +6,9 @@
6
6
  import type {
7
7
  ChallengeVerificationResultV2,
8
8
  EnrollmentRequiredResultV2,
9
+ StartResultV2,
9
10
  } from "./BaseResultsV2.js";
11
+ import { CHALLENGE_RELATION } from "../ApiClientConstantsV2.js";
10
12
 
11
13
  export interface SignUpAttributeV2 {
12
14
  attributeId: string;
@@ -18,24 +20,21 @@ export interface SignUpAttributeV2 {
18
20
  confirmationInput?: string;
19
21
  }
20
22
 
21
- export interface SignUpStartApiResultV2 {
22
- continuationToken: string;
23
- submitAttributesHref: string;
24
- attributes?: SignUpAttributeV2[];
23
+ export interface SignUpStartExistingAccountApiResultV2 extends StartResultV2 {
24
+ nextAction: typeof CHALLENGE_RELATION;
25
25
  }
26
26
 
27
+ export type SignUpStartApiResultV2 =
28
+ | ChallengeVerificationResultV2
29
+ | SignUpStartExistingAccountApiResultV2;
30
+
27
31
  export const SignUpSubmitAttributesNextActionV2 = {
28
- VERIFY: "verify",
29
32
  COLLECT_ATTRIBUTES: "collectAttributes",
30
33
  CONTINUE: "continue",
31
34
  ENROLL: "enroll",
32
35
  } as const;
33
36
 
34
37
  export type SignUpSubmitAttributesApiResultV2 =
35
- | (ChallengeVerificationResultV2 & {
36
- nextAction: typeof SignUpSubmitAttributesNextActionV2.VERIFY;
37
- attributes?: SignUpAttributeV2[];
38
- })
39
38
  | {
40
39
  nextAction: typeof SignUpSubmitAttributesNextActionV2.COLLECT_ATTRIBUTES;
41
40
  continuationToken: string;
@@ -23,6 +23,7 @@ import {
23
23
  SIGN_UP_V2_RESEND_CODE,
24
24
  SIGN_UP_V2_SUBMIT_ATTRIBUTES,
25
25
  SIGN_UP_V2_SUBMIT_CODE,
26
+ SIGN_UP_V2_SUBMIT_PASSWORD,
26
27
  } from "./PublicApiId.js";
27
28
 
28
29
  export type FlowStepV2 =
@@ -54,6 +55,7 @@ const FLOW_STEP_API_IDS_V2: Partial<
54
55
  [CustomAuthFlowScenarioV2.SignUp]: {
55
56
  requestChallenge: SIGN_UP_V2_CHALLENGE,
56
57
  submitCode: SIGN_UP_V2_SUBMIT_CODE,
58
+ submitPassword: SIGN_UP_V2_SUBMIT_PASSWORD,
57
59
  resendCode: SIGN_UP_V2_RESEND_CODE,
58
60
  submitAttributes: SIGN_UP_V2_SUBMIT_ATTRIBUTES,
59
61
  signInWithContinuation: SIGN_UP_V2_COMPLETE,
@@ -66,17 +68,14 @@ const MFA_STEP_API_IDS_V2: Partial<Record<FlowStepV2, number>> = {
66
68
  resendCode: MFA_V2_RESEND_CHALLENGE,
67
69
  };
68
70
 
69
- /**
70
- * Resolves the telemetry API ID for a flow step. MFA challenge operations use
71
- * distinct IDs when the sign-in caller identifies the second factor.
72
- */
73
71
  export function getPublicApiIdV2(
74
72
  scenario: CustomAuthFlowScenarioV2,
75
73
  step: FlowStepV2,
76
74
  authenticationFactor?: AuthenticationFactorV2
77
75
  ): number | undefined {
78
76
  if (
79
- scenario === CustomAuthFlowScenarioV2.SignIn &&
77
+ (scenario === CustomAuthFlowScenarioV2.SignIn ||
78
+ scenario === CustomAuthFlowScenarioV2.PasswordReset) &&
80
79
  authenticationFactor === AuthenticationFactorV2.MULTI_FACTOR
81
80
  ) {
82
81
  return (
@@ -57,6 +57,7 @@ export const SIGN_IN_V2_COMPLETE = 100209;
57
57
  export const SIGN_IN_V2_SUBMIT_CODE = 100210;
58
58
  export const SIGN_UP_V2_START = 100211;
59
59
  export const SIGN_UP_V2_CHALLENGE = 100212;
60
+ export const SIGN_UP_V2_SUBMIT_PASSWORD = 100223;
60
61
  export const SIGN_UP_V2_SUBMIT_CODE = 100213;
61
62
  export const SIGN_UP_V2_SUBMIT_ATTRIBUTES = 100214;
62
63
  export const SIGN_UP_V2_RESEND_CODE = 100215;
@@ -3,6 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import type { Logger } from "@azure/msal-common/browser";
7
+ import type { UserAccountAttributes } from "../../UserAccountAttributes.js";
6
8
  import { InvalidArgumentError } from "../error/InvalidArgumentError.js";
7
9
 
8
10
  export function ensureArgumentIsNotNullOrUndefined<T>(
@@ -59,3 +61,27 @@ export function ensureArgumentIsStringArray(
59
61
  throw new InvalidArgumentError(argName, correlationId);
60
62
  }
61
63
  }
64
+
65
+ export function filterReservedSignUpAttributesV2(
66
+ attributes: Readonly<UserAccountAttributes> | undefined,
67
+ logger: Logger,
68
+ correlationId: string
69
+ ): UserAccountAttributes {
70
+ const reservedSignUpAttributeNames = new Set(["email", "password"]);
71
+ const reservedSignUpAttributeWarning =
72
+ "Ignoring app-supplied sign-up attribute because it uses a reserved SDK attribute name.";
73
+ const filteredAttributes: Array<[string, string]> = [];
74
+
75
+ for (const [attributeId, value] of Object.entries(attributes ?? {})) {
76
+ if (reservedSignUpAttributeNames.has(attributeId.toLowerCase())) {
77
+ logger.warning(reservedSignUpAttributeWarning, correlationId);
78
+ continue;
79
+ }
80
+
81
+ if (value !== undefined) {
82
+ filteredAttributes.push([attributeId, value]);
83
+ }
84
+ }
85
+
86
+ return Object.fromEntries(filteredAttributes);
87
+ }
@@ -272,10 +272,11 @@ export { MFAVerificationRequiredStateV2 } from "./core/auth_flow/v2/state/MFAVer
272
272
  export { AuthMethodSelectionRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
273
273
  export { AuthMethodRegistrationRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
274
274
  export { AuthMethodVerificationRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.js";
275
- export { PasswordRequiredStateV2 } from "./sign_in/auth_flow/v2/state/PasswordRequiredStateV2.js";
275
+ export { PasswordRequiredStateV2 } from "./core/auth_flow/v2/state/PasswordRequiredStateV2.js";
276
276
  export { SignInContinuationStateV2 } from "./sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
277
277
  export { AttributesRequiredStateV2 } from "./sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
278
- export { SignUpPasswordRequiredStateV2 } from "./sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.js";
278
+ export { ExistingAccountCodeRequiredStateV2 } from "./sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.js";
279
+ export { ExistingAccountPasswordRequiredStateV2 } from "./sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.js";
279
280
 
280
281
  // Native Auth V2 Results
281
282
  export {
@@ -294,18 +295,10 @@ export {
294
295
  RequestChallengeResultV2,
295
296
  RequestChallengeResultStateV2,
296
297
  } from "./core/auth_flow/v2/result/RequestChallengeResultV2.js";
297
- export {
298
- ResendCodeResultV2,
299
- ResendCodeResultStateV2,
300
- } from "./core/auth_flow/v2/result/ResendCodeResultV2.js";
301
298
  export {
302
299
  MFASubmitChallengeResultV2,
303
300
  MFASubmitChallengeResultStateV2,
304
301
  } from "./core/auth_flow/v2/result/MFASubmitChallengeResultV2.js";
305
- export {
306
- MFAResendChallengeResultV2,
307
- MFAResendChallengeResultStateV2,
308
- } from "./core/auth_flow/v2/result/MFAResendChallengeResultV2.js";
309
302
  export type {
310
303
  AuthMethodRegistrationChallengeResultV2,
311
304
  AuthMethodRegistrationChallengeResultStateV2,
@@ -329,11 +322,17 @@ export {
329
322
  export {
330
323
  SubmitPasswordResultV2,
331
324
  SubmitPasswordResultStateV2,
332
- } from "./sign_in/auth_flow/v2/result/SubmitPasswordResultV2.js";
325
+ } from "./core/auth_flow/v2/result/SubmitPasswordResultV2.js";
333
326
  export {
334
327
  SubmitAttributesResultV2,
335
328
  SubmitAttributesResultStateV2,
336
329
  } from "./sign_up/auth_flow/v2/result/SubmitAttributesResultV2.js";
330
+ export type {
331
+ ExistingAccountSubmitCodeResultV2,
332
+ ExistingAccountSubmitCodeResultStateV2,
333
+ ExistingAccountSubmitPasswordResultV2,
334
+ ExistingAccountSubmitPasswordResultStateV2,
335
+ } from "./sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.js";
337
336
 
338
337
  // Components from msal_browser
339
338
  export { LogLevel } from "@azure/msal-common/browser";
@@ -7,22 +7,21 @@ import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResu
7
7
  import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
8
8
  import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
9
9
  import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
10
+ import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
10
11
 
11
12
  /**
12
- * The states a submit-new-password action can resolve to. Submitting the new
13
- * password can require method registration after the update completes.
14
- * Without enrollment, the flow returns a continuation for explicit sign-in.
13
+ * States returned after submitting a new password.
14
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
15
15
  */
16
16
  export type SubmitNewPasswordResultStateV2 =
17
17
  | SignInContinuationStateV2
18
18
  | AuthMethodRegistrationRequiredStateV2
19
+ | AuthMethodSelectionRequiredStateV2
19
20
  | FailedStateV2;
20
21
 
21
22
  /**
22
- * Result of submitting a new password. It wraps one of
23
- * {@link SubmitNewPasswordResultStateV2} plus the unified V2 flow error on
24
- * failure. Enrollment, when requested, must be activated before sign-in can
25
- * complete; otherwise the returned continuation can be redeemed explicitly.
23
+ * Result of submitting a new password.
24
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
26
25
  */
27
26
  export type SubmitNewPasswordResultV2 =
28
27
  CustomAuthResultV2<SubmitNewPasswordResultStateV2>;
@@ -6,8 +6,11 @@
6
6
  import { AuthFlowActionRequiredStateBase } from "../../../../core/auth_flow/AuthFlowState.js";
7
7
  import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
8
8
  import { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
9
+ import { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
10
+ import { AuthenticationFactorV2 } from "../../../../core/network_client/custom_auth_api/v2/result/BaseResultsV2.js";
9
11
  import {
10
12
  FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
13
+ FLOW_MFA_REQUIRED_V2,
11
14
  FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2,
12
15
  } from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
13
16
  import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
@@ -17,16 +20,18 @@ import type { NewPasswordRequiredStateParametersV2 } from "./ResetPasswordStateP
17
20
  import type { SubmitNewPasswordResultV2 } from "../result/SubmitNewPasswordResultV2.js";
18
21
 
19
22
  /**
20
- * State returned when the user must supply a new password to complete the flow.
21
- * A successful submission can require registration or return a continuation
22
- * for sign-in.
23
+ * State returned when the user must supply a new password. Submission can
24
+ * require method registration or MFA, and the flow is not complete until any
25
+ * subsequent required actions finish.
26
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
23
27
  */
24
28
  export class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<NewPasswordRequiredStateParametersV2> {
25
29
  readonly stateType = "newPasswordRequired";
26
30
 
27
31
  /**
28
- * Submits the new password to complete the reset. Enrollment may be
29
- * required before sign-in; a rejected password returns an error.
32
+ * Submits the new password. The result can require method registration or
33
+ * MFA, and completion is not final until any subsequent required actions
34
+ * finish.
30
35
  * @param password - The new password to set.
31
36
  * @returns The result of submitting the new password.
32
37
  */
@@ -64,6 +69,24 @@ export class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<
64
69
  );
65
70
  }
66
71
 
72
+ if (result.type === FLOW_MFA_REQUIRED_V2) {
73
+ return new CustomAuthResultV2(
74
+ new AuthMethodSelectionRequiredStateV2({
75
+ correlationId: result.correlationId,
76
+ logger,
77
+ config: this.stateParameters.config,
78
+ flowClient,
79
+ continuationState: result.continuationState,
80
+ cacheClient: this.stateParameters.cacheClient,
81
+ methods: result.methods,
82
+ authenticationFactor:
83
+ AuthenticationFactorV2.MULTI_FACTOR,
84
+ }),
85
+ undefined,
86
+ result.continuationState.scenario
87
+ );
88
+ }
89
+
67
90
  if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
68
91
  return new CustomAuthResultV2(
69
92
  new SignInContinuationStateV2({
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
7
+ import type { VerifyChallengeResultV2 } from "../../../../core/auth_flow/v2/result/VerifyChallengeResultV2.js";
8
+ import type { CustomAuthActionRequiredStateParametersV2 } from "../../../../core/auth_flow/v2/state/CustomAuthStateParametersV2.js";
9
+ import type { FlowNewPasswordRequiredResultV2 } from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
10
+ import { NewPasswordRequiredStateV2 } from "./NewPasswordRequiredStateV2.js";
11
+
12
+ export class ResetPasswordStateTransitionHandlerV2 {
13
+ handleNewPasswordRequired(
14
+ result: FlowNewPasswordRequiredResultV2,
15
+ stateParameters: CustomAuthActionRequiredStateParametersV2
16
+ ): VerifyChallengeResultV2 {
17
+ return new CustomAuthResultV2(
18
+ new NewPasswordRequiredStateV2({
19
+ correlationId: result.correlationId,
20
+ logger: stateParameters.logger,
21
+ config: stateParameters.config,
22
+ flowClient: stateParameters.flowClient,
23
+ continuationState: result.continuationState,
24
+ cacheClient: stateParameters.cacheClient,
25
+ }),
26
+ undefined,
27
+ result.continuationState.scenario
28
+ );
29
+ }
30
+ }
@@ -9,18 +9,14 @@ import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedSt
9
9
  import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
10
10
 
11
11
  /**
12
- * The states a V2 continuation sign-in can resolve to. Signing in redeems the
13
- * flow continuation for tokens, so the terminal
14
- * `CompletedStateV2` carries `CustomAuthAccountData`. `CompletedStateV2` and the
15
- * account payload are declared together because they always occur together.
12
+ * States returned when signing in from a V2 continuation.
13
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
16
14
  */
17
15
  export type SignInContinuationResultStateV2 = CompletedStateV2 | FailedStateV2;
18
16
 
19
17
  /**
20
- * Result of signing the user in from a V2 continuation. It wraps one of
21
- * {@link SignInContinuationResultStateV2} plus the unified V2 flow error on
22
- * failure and signed-in account data on success. This is the flow's completion
23
- * point, so a successful result reaches `CompletedStateV2`.
18
+ * Result of signing the user in from a V2 continuation.
19
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
24
20
  */
25
21
  export type SignInContinuationResultV2 = CustomAuthResultV2<
26
22
  SignInContinuationResultStateV2,
@@ -5,28 +5,25 @@
5
5
 
6
6
  import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
7
7
  import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
8
- import type { CompletedStateV2 } from "../../../../core/auth_flow/v2/state/CompletedStateV2.js";
9
- import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
10
- import type { PasswordRequiredStateV2 } from "../state/PasswordRequiredStateV2.js";
8
+ import type { PasswordRequiredStateV2 } from "../../../../core/auth_flow/v2/state/PasswordRequiredStateV2.js";
11
9
  import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
12
10
  import type { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
13
- import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
14
11
 
15
12
  /**
16
13
  * States returned when native auth V2 sign-in starts.
14
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17
15
  */
18
16
  export type SignInStartResultStateV2 =
19
17
  | PasswordRequiredStateV2
20
18
  | CodeRequiredStateV2
21
19
  | AuthMethodSelectionRequiredStateV2
22
- | AuthMethodRegistrationRequiredStateV2
23
- | CompletedStateV2
24
20
  | FailedStateV2;
25
21
 
26
22
  /**
27
23
  * Result of starting native auth V2 sign-in.
24
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
28
25
  */
29
26
  export type SignInStartResultV2 = CustomAuthResultV2<
30
27
  SignInStartResultStateV2,
31
- CustomAuthAccountData | undefined
28
+ undefined
32
29
  >;
@@ -11,17 +11,14 @@ import type { SignInContinuationStateParametersV2 } from "./SignInStateParameter
11
11
  import type { SignInContinuationResultV2 } from "../result/SignInContinuationResultV2.js";
12
12
 
13
13
  /**
14
- * Shared state returned when a completed V2 flow can sign the user in by
15
- * redeeming its continuation. Password reset and sign-up can both surface this
16
- * state without duplicating the token-acquisition behavior.
14
+ * State returned when a completed V2 flow can sign the user in.
15
+ * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17
16
  */
18
17
  export class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase<SignInContinuationStateParametersV2> {
19
18
  readonly stateType = "signInContinuation";
20
19
 
21
20
  /**
22
- * Signs the user in using the continuation established by the completed V2
23
- * flow. The result either reaches the completed state with the signed-in
24
- * account data or reports why the follow-up sign-in could not complete.
21
+ * Signs the user in after completing the V2 flow.
25
22
  * @returns The result of completing the continuation sign-in.
26
23
  */
27
24
  async signIn(): Promise<SignInContinuationResultV2> {
@@ -7,6 +7,3 @@ import type { CustomAuthActionRequiredStateParametersV2 } from "../../../../core
7
7
 
8
8
  export type SignInContinuationStateParametersV2 =
9
9
  CustomAuthActionRequiredStateParametersV2;
10
-
11
- export type PasswordRequiredStateParametersV2 =
12
- CustomAuthActionRequiredStateParametersV2;