@azure/msal-browser 5.22.0 → 5.24.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 (574) 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 +133 -29
  5. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +178 -64
  7. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
  8. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +61 -22
  9. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
  10. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +49 -0
  11. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -0
  12. package/dist/cache/AccountManager.mjs +1 -1
  13. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  14. package/dist/cache/BrowserCacheManager.mjs +1 -1
  15. package/dist/cache/CacheHelpers.mjs +1 -1
  16. package/dist/cache/CacheKeys.mjs +1 -1
  17. package/dist/cache/CookieStorage.mjs +1 -1
  18. package/dist/cache/DatabaseStorage.mjs +1 -1
  19. package/dist/cache/EncryptedData.mjs +1 -1
  20. package/dist/cache/LocalStorage.mjs +97 -29
  21. package/dist/cache/LocalStorage.mjs.map +1 -1
  22. package/dist/cache/MemoryStorage.mjs +1 -1
  23. package/dist/cache/SessionStorage.mjs +1 -1
  24. package/dist/cache/TokenCache.mjs +1 -1
  25. package/dist/config/Configuration.mjs +1 -1
  26. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  27. package/dist/controllers/StandardController.mjs +10 -10
  28. package/dist/controllers/StandardController.mjs.map +1 -1
  29. package/dist/crypto/BrowserCrypto.mjs +1 -1
  30. package/dist/crypto/CryptoOps.mjs +1 -1
  31. package/dist/crypto/PkceGenerator.mjs +1 -1
  32. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  33. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  34. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  35. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +27 -2
  36. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  37. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +192 -2
  38. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  39. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  51. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  52. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  53. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  54. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  55. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  56. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +21 -0
  57. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -0
  58. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +80 -0
  59. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -0
  60. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs +102 -0
  61. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs.map +1 -0
  62. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +12 -0
  63. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -0
  64. package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs +20 -0
  65. package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs.map +1 -0
  66. package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs +36 -0
  67. package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs.map +1 -0
  68. package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs +29 -0
  69. package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs.map +1 -0
  70. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +76 -0
  71. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -0
  72. package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs +36 -0
  73. package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs.map +1 -0
  74. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +36 -0
  75. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -0
  76. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +134 -0
  77. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -0
  78. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +23 -0
  79. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -0
  80. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +22 -0
  81. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -0
  82. package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs +61 -0
  83. package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs.map +1 -0
  84. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +87 -0
  85. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -0
  86. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +3 -2
  87. package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +1 -1
  88. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  89. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  90. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  91. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  92. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  93. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  94. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  95. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  96. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  97. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  98. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  99. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  100. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  101. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  102. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  103. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  104. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  105. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  106. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  107. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  108. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  109. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +602 -0
  110. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -0
  111. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +67 -0
  112. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -0
  113. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +46 -0
  114. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -0
  115. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  116. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  117. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +3 -2
  118. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs.map +1 -1
  119. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  120. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  121. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  122. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  123. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  124. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  125. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +30 -0
  126. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -0
  127. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +193 -0
  128. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -0
  129. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +236 -0
  130. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -0
  131. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +26 -0
  132. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs.map +1 -0
  133. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +66 -0
  134. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -0
  135. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +97 -0
  136. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -0
  137. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +56 -0
  138. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs.map +1 -0
  139. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +23 -0
  140. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -0
  141. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +14 -0
  142. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -0
  143. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  144. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +3 -2
  145. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs.map +1 -1
  146. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +38 -0
  147. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -0
  148. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +20 -3
  149. package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
  150. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  151. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  152. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  153. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  154. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  155. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  156. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  157. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  158. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  159. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  160. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  161. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  162. package/dist/custom_auth/index.mjs +23 -1
  163. package/dist/custom_auth/index.mjs.map +1 -1
  164. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  165. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  166. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  167. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  168. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  169. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  170. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  171. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  172. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  173. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  174. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  175. package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs +29 -0
  176. package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs.map +1 -0
  177. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +59 -0
  178. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -0
  179. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  180. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  181. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  182. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  183. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  184. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  185. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  186. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  187. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  188. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  189. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  190. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  191. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  192. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs +18 -0
  193. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs.map +1 -0
  194. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs +37 -0
  195. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs.map +1 -0
  196. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs +23 -0
  197. package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs.map +1 -0
  198. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +70 -0
  199. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
  200. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +61 -0
  201. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -0
  202. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  203. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  204. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  205. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  206. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  207. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  208. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  209. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  210. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  211. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  212. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  213. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  214. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  215. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  216. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs +25 -0
  217. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs.map +1 -0
  218. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs +33 -0
  219. package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs.map +1 -0
  220. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +40 -0
  221. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -0
  222. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +25 -0
  223. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +1 -0
  224. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +47 -0
  225. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +1 -0
  226. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +60 -0
  227. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -0
  228. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  229. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  230. package/dist/encode/Base64Decode.mjs +1 -1
  231. package/dist/encode/Base64Encode.mjs +1 -1
  232. package/dist/error/BrowserAuthError.mjs +1 -1
  233. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  234. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  235. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  236. package/dist/error/NativeAuthError.mjs +1 -1
  237. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  238. package/dist/error/NestedAppAuthError.mjs +1 -1
  239. package/dist/event/EventHandler.mjs +1 -1
  240. package/dist/event/EventMessage.mjs +1 -1
  241. package/dist/event/EventType.mjs +1 -1
  242. package/dist/index.mjs +1 -1
  243. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  244. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  245. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +21 -14
  246. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  247. package/dist/interaction_client/PopupClient.mjs +1 -1
  248. package/dist/interaction_client/RedirectClient.mjs +11 -8
  249. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  250. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  251. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  252. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  253. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  254. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  255. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  256. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  257. package/dist/log-strings-mapping.json +1381 -1185
  258. package/dist/naa/BridgeError.mjs +1 -1
  259. package/dist/naa/BridgeProxy.mjs +1 -1
  260. package/dist/naa/BridgeStatusCode.mjs +1 -1
  261. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  262. package/dist/navigation/NavigationClient.mjs +1 -1
  263. package/dist/network/FetchClient.mjs +1 -1
  264. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  265. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  266. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  267. package/dist/packageMetadata.mjs +2 -2
  268. package/dist/popup_relay/constants.mjs +1 -1
  269. package/dist/popup_relay/index.mjs +1 -1
  270. package/dist/popup_relay/relayClient.mjs +1 -1
  271. package/dist/protocol/Authorize.mjs +1 -1
  272. package/dist/redirect_bridge/index.mjs +1 -1
  273. package/dist/request/RequestHelpers.mjs +1 -1
  274. package/dist/response/ResponseHandler.mjs +1 -1
  275. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  276. package/dist/telemetry/BrowserPerformanceEvents.mjs +16 -2
  277. package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
  278. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  279. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  280. package/dist/utils/BrowserConstants.mjs +1 -1
  281. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  282. package/dist/utils/BrowserUtils.mjs +1 -1
  283. package/dist/utils/Helpers.mjs +1 -1
  284. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  285. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  286. package/dist/webBrokerBridge/PerfEventNames.mjs +38 -0
  287. package/dist/webBrokerBridge/PerfEventNames.mjs.map +1 -0
  288. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  289. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  290. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  291. package/dist/webBrokerBridge/index.mjs +2 -1
  292. package/dist/webBrokerBridge/index.mjs.map +1 -1
  293. package/lib/custom-auth-path/log-strings-mapping.json +215 -19
  294. package/lib/custom-auth-path/msal-custom-auth.cjs +3571 -479
  295. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  296. package/lib/custom-auth-path/msal-custom-auth.js +3571 -479
  297. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  298. package/lib/log-strings-mapping.json +23 -11
  299. package/lib/msal-browser.cjs +622 -233
  300. package/lib/msal-browser.cjs.map +1 -1
  301. package/lib/msal-browser.js +622 -233
  302. package/lib/msal-browser.js.map +1 -1
  303. package/lib/msal-browser.min.js +2 -2
  304. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  305. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  306. package/lib/popup-relay/msal-popup-relay.js +2 -2
  307. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  308. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  309. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  310. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  311. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  312. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  313. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  314. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +59 -1
  315. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs.map +1 -1
  316. package/package.json +3 -3
  317. package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +217 -45
  318. package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +261 -107
  319. package/src/broker/nativeBroker/PlatformAuthProvider.ts +92 -37
  320. package/src/broker/nativeBroker/PlatformAuthRequest.ts +118 -6
  321. package/src/broker/nativeBroker/PlatformAuthResponse.ts +14 -1
  322. package/src/cache/LocalStorage.ts +135 -28
  323. package/src/controllers/StandardController.ts +17 -23
  324. package/src/custom_auth/CustomAuthActionInputs.ts +11 -0
  325. package/src/custom_auth/CustomAuthPublicClientApplication.ts +40 -4
  326. package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +44 -0
  327. package/src/custom_auth/controller/CustomAuthStandardController.ts +360 -1
  328. package/src/custom_auth/controller/ICustomAuthStandardController.ts +14 -0
  329. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +18 -0
  330. package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +20 -0
  331. package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +133 -0
  332. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.ts +146 -0
  333. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +8 -0
  334. package/src/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.ts +15 -0
  335. package/src/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.ts +33 -0
  336. package/src/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.ts +25 -0
  337. package/src/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.ts +18 -0
  338. package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +26 -0
  339. package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +26 -0
  340. package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +25 -0
  341. package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +30 -0
  342. package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +40 -0
  343. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +100 -0
  344. package/src/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.ts +59 -0
  345. package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +53 -0
  346. package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +196 -0
  347. package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +16 -0
  348. package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +44 -0
  349. package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +15 -0
  350. package/src/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.ts +76 -0
  351. package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +119 -0
  352. package/src/custom_auth/core/error/CustomAuthApiError.ts +3 -1
  353. package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +35 -0
  354. package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +1145 -0
  355. package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +150 -0
  356. package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +66 -0
  357. package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +185 -0
  358. package/src/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.ts +1 -0
  359. package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +30 -0
  360. package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +423 -0
  361. package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +553 -0
  362. package/src/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.ts +24 -0
  363. package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +81 -0
  364. package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +177 -0
  365. package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +129 -0
  366. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.ts +68 -0
  367. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +50 -0
  368. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.ts +20 -0
  369. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +202 -0
  370. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +111 -0
  371. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +26 -0
  372. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +44 -0
  373. package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +64 -0
  374. package/src/custom_auth/core/telemetry/PublicApiId.ts +18 -0
  375. package/src/custom_auth/index.ts +96 -0
  376. package/src/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.ts +25 -0
  377. package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +33 -0
  378. package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +69 -0
  379. package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.ts +9 -0
  380. package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.ts +13 -0
  381. package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.ts +35 -0
  382. package/src/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.ts +19 -0
  383. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +31 -0
  384. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +32 -0
  385. package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +22 -0
  386. package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +96 -0
  387. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +83 -0
  388. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +12 -0
  389. package/src/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.ts +21 -0
  390. package/src/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.ts +32 -0
  391. package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +28 -0
  392. package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +20 -0
  393. package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +48 -0
  394. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +34 -0
  395. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +63 -0
  396. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +24 -0
  397. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +112 -0
  398. package/src/interaction_client/PlatformAuthInteractionClient.ts +79 -17
  399. package/src/interaction_client/RedirectClient.ts +15 -5
  400. package/src/packageMetadata.ts +1 -1
  401. package/src/telemetry/BrowserPerformanceEvents.ts +20 -0
  402. package/src/webBrokerBridge/PerfEventNames.ts +43 -0
  403. package/src/webBrokerBridge/index.ts +26 -0
  404. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +3 -1
  405. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
  406. package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts +3 -1
  407. package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
  408. package/types/broker/nativeBroker/PlatformAuthProvider.d.ts +1 -1
  409. package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
  410. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +68 -5
  411. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
  412. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +12 -1
  413. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
  414. package/types/cache/LocalStorage.d.ts +4 -5
  415. package/types/cache/LocalStorage.d.ts.map +1 -1
  416. package/types/controllers/StandardController.d.ts.map +1 -1
  417. package/types/custom_auth/CustomAuthActionInputs.d.ts +7 -0
  418. package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
  419. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  420. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +27 -5
  421. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
  422. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +30 -0
  423. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -0
  424. package/types/custom_auth/controller/CustomAuthStandardController.d.ts +11 -2
  425. package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
  426. package/types/custom_auth/controller/ICustomAuthStandardController.d.ts +7 -1
  427. package/types/custom_auth/controller/ICustomAuthStandardController.d.ts.map +1 -1
  428. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +14 -0
  429. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -0
  430. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +14 -0
  431. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -0
  432. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +53 -0
  433. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -0
  434. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts +40 -0
  435. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts.map +1 -0
  436. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +4 -0
  437. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -0
  438. package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts +11 -0
  439. package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts.map +1 -0
  440. package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts +23 -0
  441. package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts.map +1 -0
  442. package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts +18 -0
  443. package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts.map +1 -0
  444. package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts +7 -0
  445. package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts.map +1 -0
  446. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +15 -0
  447. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +1 -0
  448. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +16 -0
  449. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -0
  450. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +16 -0
  451. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -0
  452. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +18 -0
  453. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -0
  454. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +23 -0
  455. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -0
  456. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +21 -0
  457. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -0
  458. package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts +17 -0
  459. package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts.map +1 -0
  460. package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +14 -0
  461. package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -0
  462. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +25 -0
  463. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -0
  464. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +11 -0
  465. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -0
  466. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +28 -0
  467. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -0
  468. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +10 -0
  469. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -0
  470. package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts +18 -0
  471. package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts.map +1 -0
  472. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +25 -0
  473. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -0
  474. package/types/custom_auth/core/error/CustomAuthApiError.d.ts +3 -1
  475. package/types/custom_auth/core/error/CustomAuthApiError.d.ts.map +1 -1
  476. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +21 -0
  477. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -0
  478. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +35 -0
  479. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -0
  480. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +26 -0
  481. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -0
  482. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +43 -0
  483. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -0
  484. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +80 -0
  485. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -0
  486. package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts +1 -0
  487. package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts.map +1 -1
  488. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +17 -0
  489. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -0
  490. package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts +31 -0
  491. package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -0
  492. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +23 -0
  493. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -0
  494. package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts +19 -0
  495. package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts.map +1 -0
  496. package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts +2 -0
  497. package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts.map +1 -0
  498. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +15 -0
  499. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -0
  500. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +52 -0
  501. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -0
  502. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts +3 -0
  503. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts.map +1 -0
  504. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts +37 -0
  505. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -0
  506. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts +12 -0
  507. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts.map +1 -0
  508. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +133 -0
  509. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -0
  510. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +70 -0
  511. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -0
  512. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +10 -0
  513. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -0
  514. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +33 -0
  515. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -0
  516. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +4 -0
  517. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -0
  518. package/types/custom_auth/core/telemetry/PublicApiId.d.ts +16 -0
  519. package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
  520. package/types/custom_auth/index.d.ts +37 -0
  521. package/types/custom_auth/index.d.ts.map +1 -1
  522. package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts +18 -0
  523. package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts.map +1 -0
  524. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +22 -0
  525. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -0
  526. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +19 -0
  527. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -0
  528. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts +3 -0
  529. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts.map +1 -0
  530. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts +9 -0
  531. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts.map +1 -0
  532. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts +22 -0
  533. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts.map +1 -0
  534. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts +12 -0
  535. package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts.map +1 -0
  536. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +21 -0
  537. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -0
  538. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +17 -0
  539. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -0
  540. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +9 -0
  541. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
  542. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +17 -0
  543. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
  544. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +24 -0
  545. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -0
  546. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +4 -0
  547. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -0
  548. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts +14 -0
  549. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts.map +1 -0
  550. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts +20 -0
  551. package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts.map +1 -0
  552. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +15 -0
  553. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -0
  554. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +8 -0
  555. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -0
  556. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +15 -0
  557. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -0
  558. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +11 -0
  559. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +1 -0
  560. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +19 -0
  561. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +1 -0
  562. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +14 -0
  563. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -0
  564. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +10 -0
  565. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -0
  566. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  567. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  568. package/types/packageMetadata.d.ts +1 -1
  569. package/types/telemetry/BrowserPerformanceEvents.d.ts +13 -0
  570. package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
  571. package/types/webBrokerBridge/PerfEventNames.d.ts +30 -0
  572. package/types/webBrokerBridge/PerfEventNames.d.ts.map +1 -0
  573. package/types/webBrokerBridge/index.d.ts +1 -0
  574. package/types/webBrokerBridge/index.d.ts.map +1 -1
@@ -0,0 +1,602 @@
1
+ /*! @azure/msal-browser v5.24.0 2026-10-02 */
2
+ 'use strict';
3
+ import { InteractionClientBaseV2 } from './InteractionClientBaseV2.mjs';
4
+ import { FLOW_CODE_REQUIRED_V2, FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2, createFlowMethodSelectionRequiredResultV2, createFlowPasswordRequiredResultV2, createFlowCodeRequiredResultV2, createFlowNewPasswordRequiredResultV2, createFlowSignUpPasswordRequiredResultV2, createFlowAttributesRequiredResultV2, createFlowSignInContinuationRequiredResultV2, createFlowCompletedResultV2, createFlowMFARequiredResultV2 } from './result/FlowActionResultV2.mjs';
5
+ import { CustomAuthError } from '../../error/CustomAuthError.mjs';
6
+ import { SIGN_IN_UNSUPPORTED, SIGN_UP_UNSUPPORTED, UNSUPPORTED_FLOW_TRANSITION, RESET_PASSWORD_UNSUPPORTED, RESET_PASSWORD_TIMEOUT, UNSUPPORTED_FLOW_STEP, CONTINUATION_LINK_MISSING } from '../../network_client/custom_auth_api/v2/ErrorCodesV2.mjs';
7
+ import { CustomAuthFlowScenarioV2 } from '../../auth_flow/v2/CustomAuthFlowScenarioV2.mjs';
8
+ import { SIGN_IN_V2_START, SIGN_UP_V2_START, RESET_PASSWORD_V2_START } from '../../telemetry/PublicApiId.mjs';
9
+ import { getPublicApiIdV2 } from '../../telemetry/FlowApiIdHelperV2.mjs';
10
+ import { AuthenticationFactorV2, VerifyNextActionV2, ChallengeNextActionV2 } from '../../network_client/custom_auth_api/v2/result/BaseResultsV2.mjs';
11
+ import { AuthenticationMethodTypeV2 } from '../../network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs';
12
+ import { SignUpSubmitAttributesNextActionV2 } from '../../network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs';
13
+
14
+ /*
15
+ * Copyright (c) Microsoft Corporation. All rights reserved.
16
+ * Licensed under the MIT License.
17
+ */
18
+ /*
19
+ * Polls up to five times for password-update completion, waiting 1.5 seconds
20
+ * between attempts. The first request runs immediately.
21
+ */
22
+ const POLL_MAX_ATTEMPTS = 5;
23
+ // TODO: Replace this fallback with the server-provided polling interval once available.
24
+ const POLL_INTERVAL_MS = 1500;
25
+ const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
26
+ /*
27
+ * Drives server-directed Native Auth V2 flows using opaque continuation state
28
+ * and HAL links. Each operation returns only its valid discriminated results.
29
+ */
30
+ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
31
+ constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, customAuthAuthority, apiClient) {
32
+ super(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, customAuthAuthority);
33
+ this.apiClient = apiClient;
34
+ }
35
+ /*
36
+ * Starts sign-in using the preferred supported method offered by the server.
37
+ */
38
+ async signIn(parameters) {
39
+ const correlationId = parameters.correlationId;
40
+ const context = this.createRequestContext(SIGN_IN_V2_START, correlationId);
41
+ this.logger.verbose("1jeyrn", correlationId);
42
+ const entryResult = await this.apiClient.authorizeChallengeStart(context);
43
+ const startResult = await this.apiClient.signInStart(this.requireLink(correlationId, entryResult.signInHref, {
44
+ code: SIGN_IN_UNSUPPORTED,
45
+ message: "The authorize-challenge entry response did not include a sign-in link.",
46
+ }), {
47
+ continuationToken: entryResult.continuationToken,
48
+ username: parameters.username,
49
+ }, context);
50
+ this.ensureAuthenticationFactor(startResult.authenticationFactor, AuthenticationFactorV2.SINGLE_FACTOR, "sign-in start", correlationId);
51
+ const continuationState = {
52
+ continuationToken: startResult.continuationToken,
53
+ scenario: CustomAuthFlowScenarioV2.SignIn,
54
+ links: {},
55
+ tokenRequest: {
56
+ scopes: parameters.scopes,
57
+ },
58
+ };
59
+ const methods = startResult.methods.map((method) => ({
60
+ id: method.id,
61
+ type: method.type ?? "",
62
+ hint: method.hint,
63
+ challengeHref: method.challengeHref,
64
+ }));
65
+ const selectedMethod = this.selectSignInMethod(methods, parameters.password !== undefined, correlationId);
66
+ const challengeResult = await this.requestChallenge({
67
+ correlationId,
68
+ continuationState: {
69
+ ...continuationState,
70
+ links: {
71
+ ...continuationState.links,
72
+ challenge: selectedMethod.challengeHref,
73
+ },
74
+ },
75
+ });
76
+ if (challengeResult.type === FLOW_CODE_REQUIRED_V2) {
77
+ return {
78
+ ...challengeResult,
79
+ method: selectedMethod,
80
+ };
81
+ }
82
+ if (parameters.password) {
83
+ return this.submitSignInPassword({
84
+ correlationId,
85
+ continuationState: challengeResult.continuationState,
86
+ password: parameters.password,
87
+ });
88
+ }
89
+ return challengeResult;
90
+ }
91
+ /*
92
+ * Starts sign-up and resolves the server-provided attribute-submission transition.
93
+ */
94
+ async signUp(parameters) {
95
+ const correlationId = parameters.correlationId;
96
+ const context = this.createRequestContext(SIGN_UP_V2_START, correlationId);
97
+ this.logger.verbose("19e1ak", correlationId);
98
+ const entryResult = await this.apiClient.authorizeChallengeStart(context, parameters.scopes);
99
+ const startResult = await this.apiClient.signUpStart(this.requireLink(correlationId, entryResult.signUpHref, {
100
+ code: SIGN_UP_UNSUPPORTED,
101
+ message: "The authorize-challenge entry response did not include a sign-up link.",
102
+ }), {
103
+ continuationToken: entryResult.continuationToken,
104
+ }, context);
105
+ const attributes = Object.fromEntries(Object.entries(parameters.attributes ?? {}).filter(([name]) => name.toLowerCase() !== "email" &&
106
+ name.toLowerCase() !== "password"));
107
+ attributes.email = parameters.username;
108
+ if (parameters.password !== undefined) {
109
+ attributes.password = parameters.password;
110
+ }
111
+ const submitResult = await this.apiClient.submitSignUpAttributes(startResult.submitAttributesHref, {
112
+ continuationToken: startResult.continuationToken,
113
+ attributes,
114
+ }, context);
115
+ const continuationState = {
116
+ continuationToken: startResult.continuationToken,
117
+ scenario: CustomAuthFlowScenarioV2.SignUp,
118
+ links: {},
119
+ tokenRequest: {
120
+ scopes: parameters.scopes,
121
+ },
122
+ signUp: {
123
+ passwordWasSupplied: attributes.password !== undefined,
124
+ },
125
+ };
126
+ const result = this.toSignUpActionResult(submitResult, continuationState, correlationId);
127
+ if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
128
+ const message = "Initial sign-up attribute submission cannot complete without code verification or additional attributes.";
129
+ this.logger.error(message, correlationId);
130
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
131
+ }
132
+ return result;
133
+ }
134
+ /*
135
+ * Starts password reset, automatically challenging a sole method or
136
+ * returning multiple methods for selection.
137
+ */
138
+ async resetPassword(parameters) {
139
+ const correlationId = parameters.correlationId;
140
+ const context = this.createRequestContext(RESET_PASSWORD_V2_START, correlationId);
141
+ this.logger.verbose("1en88i", correlationId);
142
+ const entryResult = await this.apiClient.authorizeChallengeStart(context);
143
+ const startResult = await this.apiClient.resetPasswordStart(this.requireLink(correlationId, entryResult.resetPasswordHref, {
144
+ code: RESET_PASSWORD_UNSUPPORTED,
145
+ message: "The authorize-challenge entry response did not include a reset-password link.",
146
+ }), {
147
+ username: parameters.username,
148
+ continuationToken: entryResult.continuationToken,
149
+ }, context);
150
+ this.ensureAuthenticationFactor(startResult.authenticationFactor, AuthenticationFactorV2.SINGLE_FACTOR, "password-reset start", correlationId);
151
+ const continuationState = {
152
+ continuationToken: startResult.continuationToken,
153
+ scenario: CustomAuthFlowScenarioV2.PasswordReset,
154
+ links: {},
155
+ };
156
+ const methods = startResult.methods.map((method) => ({
157
+ id: method.id,
158
+ type: method.type ?? "",
159
+ hint: method.hint,
160
+ challengeHref: method.challengeHref,
161
+ }));
162
+ if (methods.length === 0) {
163
+ const message = "The password-reset start response did not include an authentication method.";
164
+ this.logger.error(message, correlationId);
165
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
166
+ }
167
+ if (methods.length === 1) {
168
+ const selectedMethod = methods[0];
169
+ const challengeResult = await this.requestChallenge({
170
+ correlationId,
171
+ continuationState: {
172
+ ...continuationState,
173
+ links: {
174
+ challenge: selectedMethod.challengeHref,
175
+ },
176
+ },
177
+ });
178
+ if (challengeResult.type === FLOW_CODE_REQUIRED_V2 &&
179
+ (challengeResult.channel?.toLowerCase() ===
180
+ AuthenticationMethodTypeV2.EMAIL ||
181
+ challengeResult.channel?.toLowerCase() ===
182
+ AuthenticationMethodTypeV2.SMS)) {
183
+ return {
184
+ ...challengeResult,
185
+ method: selectedMethod,
186
+ };
187
+ }
188
+ const channel = challengeResult.type === FLOW_CODE_REQUIRED_V2
189
+ ? challengeResult.channel
190
+ : AuthenticationMethodTypeV2.PASSWORD;
191
+ const message = `Challenge type '${challengeResult.type}' with channel '${channel}' is not supported for password reset.`;
192
+ this.logger.error(message, correlationId);
193
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
194
+ }
195
+ this.logger.verbose("0k8yah", correlationId);
196
+ return createFlowMethodSelectionRequiredResultV2({
197
+ correlationId,
198
+ continuationState,
199
+ methods,
200
+ });
201
+ }
202
+ /*
203
+ * Requests a one-time code for the selected authentication method. Returns
204
+ * the continuation state and code metadata needed for verification.
205
+ */
206
+ async requestChallenge(parameters) {
207
+ const challengeResult = await this.sendMethodChallenge(parameters, "requestChallenge");
208
+ const challengeType = challengeResult.type ?? AuthenticationMethodTypeV2.EMAIL;
209
+ const continuationState = this.createChallengeContinuationState(parameters.continuationState, challengeResult);
210
+ if (challengeType.toLowerCase() === AuthenticationMethodTypeV2.PASSWORD) {
211
+ return createFlowPasswordRequiredResultV2({
212
+ correlationId: parameters.correlationId,
213
+ continuationState,
214
+ });
215
+ }
216
+ return createFlowCodeRequiredResultV2({
217
+ correlationId: parameters.correlationId,
218
+ continuationState,
219
+ channel: challengeType,
220
+ sentTo: challengeResult.hint,
221
+ codeLength: challengeResult.codeLength,
222
+ });
223
+ }
224
+ /*
225
+ * Verifies the submitted one-time code using the server-provided link. The
226
+ * response determines the next required action.
227
+ */
228
+ async submitCode(parameters) {
229
+ const continuationState = parameters.continuationState;
230
+ const correlationId = parameters.correlationId;
231
+ const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, "submitCode", correlationId), correlationId);
232
+ this.logger.verbose("16ks6n", correlationId);
233
+ const verifyHref = this.requireLink(correlationId, continuationState.links.verify);
234
+ const verifyRequest = {
235
+ continuationToken: continuationState.continuationToken,
236
+ otp: parameters.code,
237
+ };
238
+ const verifyResult = await this.apiClient.verifyChallenge(verifyHref, verifyRequest, context);
239
+ if (continuationState.scenario ===
240
+ CustomAuthFlowScenarioV2.PasswordReset &&
241
+ verifyResult.nextAction === VerifyNextActionV2.UPDATE) {
242
+ return createFlowNewPasswordRequiredResultV2({
243
+ correlationId,
244
+ continuationState: {
245
+ continuationToken: verifyResult.continuationToken,
246
+ scenario: continuationState.scenario,
247
+ links: { update: verifyResult.updateHref },
248
+ },
249
+ });
250
+ }
251
+ if (continuationState.scenario === CustomAuthFlowScenarioV2.SignIn) {
252
+ return this.handleSignInVerification(continuationState, verifyResult, correlationId);
253
+ }
254
+ if (continuationState.scenario === CustomAuthFlowScenarioV2.SignUp &&
255
+ verifyResult.nextAction === VerifyNextActionV2.COLLECT_ATTRIBUTES) {
256
+ const requiredPasswordAttribute = verifyResult.attributes.find((attribute) => attribute.attributeId.toLowerCase() === "password" &&
257
+ attribute.required === true);
258
+ const nextContinuationState = {
259
+ continuationToken: verifyResult.continuationToken,
260
+ scenario: continuationState.scenario,
261
+ links: {
262
+ submitAttributes: verifyResult.submitAttributesHref,
263
+ },
264
+ tokenRequest: continuationState.tokenRequest,
265
+ signUp: continuationState.signUp,
266
+ };
267
+ const attributes = verifyResult.attributes.filter((attribute) => attribute.attributeId.toLowerCase() !== "password");
268
+ if (requiredPasswordAttribute &&
269
+ continuationState.signUp?.passwordWasSupplied !== true) {
270
+ return createFlowSignUpPasswordRequiredResultV2({
271
+ correlationId,
272
+ continuationState: nextContinuationState,
273
+ attributes,
274
+ requiredPasswordAttribute,
275
+ });
276
+ }
277
+ return createFlowAttributesRequiredResultV2({
278
+ correlationId,
279
+ continuationState: nextContinuationState,
280
+ attributes,
281
+ });
282
+ }
283
+ if (continuationState.scenario === CustomAuthFlowScenarioV2.SignUp &&
284
+ verifyResult.nextAction === VerifyNextActionV2.CONTINUE) {
285
+ return createFlowSignInContinuationRequiredResultV2({
286
+ correlationId,
287
+ continuationState: {
288
+ continuationToken: verifyResult.continuationToken,
289
+ scenario: continuationState.scenario,
290
+ links: {},
291
+ tokenRequest: continuationState.tokenRequest,
292
+ },
293
+ });
294
+ }
295
+ const message = `Verification next action '${verifyResult.nextAction}' is not supported for the '${continuationState.scenario}' flow.`;
296
+ this.logger.error(message, correlationId);
297
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
298
+ }
299
+ /*
300
+ * Requests a new one-time code using the server-provided resend link.
301
+ * Returns refreshed continuation state and code metadata.
302
+ */
303
+ async resendCode(parameters) {
304
+ const challengeResult = await this.sendMethodChallenge(parameters, "resendCode");
305
+ return createFlowCodeRequiredResultV2({
306
+ correlationId: parameters.correlationId,
307
+ continuationState: this.createChallengeContinuationState(parameters.continuationState, challengeResult),
308
+ channel: challengeResult.type,
309
+ sentTo: challengeResult.hint,
310
+ codeLength: challengeResult.codeLength,
311
+ });
312
+ }
313
+ async submitSignUpAttributes(parameters) {
314
+ const { continuationState, correlationId, attributes } = parameters;
315
+ const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, "submitAttributes", correlationId), correlationId);
316
+ this.logger.verbose("0js2ub", correlationId);
317
+ const submitResult = await this.apiClient.submitSignUpAttributes(this.requireLink(correlationId, continuationState.links.submitAttributes), {
318
+ continuationToken: continuationState.continuationToken,
319
+ attributes,
320
+ }, context);
321
+ return this.toSignUpActionResult(submitResult, {
322
+ ...continuationState,
323
+ signUp: {
324
+ passwordWasSupplied: continuationState.signUp?.passwordWasSupplied ===
325
+ true || attributes.password !== undefined,
326
+ },
327
+ }, correlationId);
328
+ }
329
+ /*
330
+ * Submits the new password and polls until the reset completes. The result
331
+ * contains the continuation state required for explicit sign-in.
332
+ */
333
+ async submitNewPassword(parameters) {
334
+ const continuationState = parameters.continuationState;
335
+ const correlationId = parameters.correlationId;
336
+ const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, "submitNewPassword", correlationId), correlationId);
337
+ this.logger.verbose("0ie1qa", correlationId);
338
+ const updateResult = await this.apiClient.submitNewPassword(this.requireLink(correlationId, continuationState.links.update), {
339
+ continuationToken: continuationState.continuationToken,
340
+ newPassword: parameters.newPassword,
341
+ }, context);
342
+ let pollToken = updateResult.continuationToken;
343
+ let pollHref = updateResult.pollHref;
344
+ let completionToken;
345
+ for (let attempt = 1; attempt <= POLL_MAX_ATTEMPTS; attempt++) {
346
+ const pollResult = await this.apiClient.poll(pollHref, { continuationToken: pollToken }, context);
347
+ if (pollResult.isCompleted) {
348
+ completionToken = pollResult.continuationToken;
349
+ break;
350
+ }
351
+ pollToken = pollResult.continuationToken;
352
+ pollHref = pollResult.pollHref ?? pollHref;
353
+ if (attempt < POLL_MAX_ATTEMPTS) {
354
+ await delay(POLL_INTERVAL_MS);
355
+ }
356
+ }
357
+ if (!completionToken) {
358
+ const message = "The password reset did not complete within the allotted number of polling attempts.";
359
+ this.logger.error(message, correlationId);
360
+ throw new CustomAuthError(RESET_PASSWORD_TIMEOUT, message, correlationId);
361
+ }
362
+ this.logger.verbose("0hrwdj", correlationId);
363
+ return createFlowSignInContinuationRequiredResultV2({
364
+ correlationId,
365
+ continuationState: {
366
+ continuationToken: completionToken,
367
+ scenario: continuationState.scenario,
368
+ links: {},
369
+ },
370
+ });
371
+ }
372
+ /*
373
+ * Verifies a sign-in password and returns the next sign-in action.
374
+ */
375
+ async submitSignInPassword(parameters) {
376
+ const verifyResult = await this.verifySignInPassword(parameters);
377
+ return this.handleSignInVerification(parameters.continuationState, verifyResult, parameters.correlationId);
378
+ }
379
+ /*
380
+ * Redeems the completed flow continuation for tokens. Returns the
381
+ * authentication result after validating and caching the response.
382
+ */
383
+ async signInWithContinuation(parameters) {
384
+ const continuationState = parameters.continuationState;
385
+ const correlationId = parameters.correlationId;
386
+ const apiId = this.resolveStepApiId(continuationState.scenario, "signInWithContinuation", correlationId);
387
+ const context = this.createRequestContext(apiId, correlationId);
388
+ this.logger.verbose("09mk3f", correlationId);
389
+ const scopes = this.getScopes(parameters.scopes);
390
+ const tokenResponse = await this.apiClient.completeWithTokens({
391
+ continuationToken: continuationState.continuationToken,
392
+ scopes,
393
+ }, context);
394
+ const authenticationResult = await this.handleTokenResponse(tokenResponse, scopes, correlationId, apiId);
395
+ this.logger.verbose("15nu4j", correlationId);
396
+ return createFlowCompletedResultV2({
397
+ correlationId,
398
+ authenticationResult,
399
+ });
400
+ }
401
+ async handleSignInVerification(continuationState, verifyResult, correlationId) {
402
+ if (verifyResult.nextAction === VerifyNextActionV2.CHALLENGE) {
403
+ this.ensureAuthenticationFactor(verifyResult.authenticationFactor, AuthenticationFactorV2.MULTI_FACTOR, "after sign-in verification", correlationId);
404
+ return createFlowMFARequiredResultV2({
405
+ correlationId,
406
+ continuationState: {
407
+ continuationToken: verifyResult.continuationToken,
408
+ scenario: continuationState.scenario,
409
+ links: {},
410
+ tokenRequest: continuationState.tokenRequest,
411
+ },
412
+ methods: verifyResult.methods.map((method) => ({
413
+ id: method.id,
414
+ type: method.type ?? "",
415
+ hint: method.hint,
416
+ challengeHref: method.challengeHref,
417
+ })),
418
+ });
419
+ }
420
+ if (verifyResult.nextAction === VerifyNextActionV2.CONTINUE) {
421
+ return this.completeSignInAfterVerification(continuationState, verifyResult.continuationToken, correlationId);
422
+ }
423
+ const message = `Verification next action '${verifyResult.nextAction}' is not supported for sign-in.`;
424
+ this.logger.error(message, correlationId);
425
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
426
+ }
427
+ selectSignInMethod(methods, passwordProvided, correlationId) {
428
+ const passwordMethod = methods.find((method) => method.type.toLowerCase() ===
429
+ AuthenticationMethodTypeV2.PASSWORD);
430
+ const emailMethod = methods.find((method) => method.type.toLowerCase() === AuthenticationMethodTypeV2.EMAIL);
431
+ if (passwordProvided) {
432
+ if (passwordMethod) {
433
+ return passwordMethod;
434
+ }
435
+ const message = "A password was supplied, but the sign-in response did not include a password method.";
436
+ this.logger.error(message, correlationId);
437
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
438
+ }
439
+ const selectedMethod = emailMethod ?? passwordMethod;
440
+ if (selectedMethod) {
441
+ return selectedMethod;
442
+ }
443
+ const message = "The sign-in start response did not include a supported email or password method.";
444
+ this.logger.error(message, correlationId);
445
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
446
+ }
447
+ toSignUpActionResult(result, continuationState, correlationId) {
448
+ const nextAction = result.nextAction;
449
+ if (result.nextAction === SignUpSubmitAttributesNextActionV2.VERIFY) {
450
+ return createFlowCodeRequiredResultV2({
451
+ correlationId,
452
+ continuationState: {
453
+ continuationToken: result.continuationToken,
454
+ scenario: continuationState.scenario,
455
+ links: {
456
+ verify: result.verifyHref,
457
+ resend: result.resendHref,
458
+ },
459
+ tokenRequest: continuationState.tokenRequest,
460
+ signUp: continuationState.signUp,
461
+ },
462
+ channel: result.type,
463
+ sentTo: result.hint,
464
+ codeLength: result.codeLength,
465
+ });
466
+ }
467
+ if (result.nextAction ===
468
+ SignUpSubmitAttributesNextActionV2.COLLECT_ATTRIBUTES) {
469
+ const requiredPasswordAttribute = result.attributes.find((attribute) => attribute.attributeId.toLowerCase() === "password" &&
470
+ attribute.required === true);
471
+ const nextContinuationState = {
472
+ continuationToken: result.continuationToken,
473
+ scenario: continuationState.scenario,
474
+ links: {
475
+ submitAttributes: result.submitAttributesHref,
476
+ },
477
+ tokenRequest: continuationState.tokenRequest,
478
+ signUp: continuationState.signUp,
479
+ };
480
+ const attributes = result.attributes.filter((attribute) => attribute.attributeId.toLowerCase() !== "password");
481
+ if (requiredPasswordAttribute &&
482
+ continuationState.signUp?.passwordWasSupplied !== true) {
483
+ return createFlowSignUpPasswordRequiredResultV2({
484
+ correlationId,
485
+ continuationState: nextContinuationState,
486
+ attributes,
487
+ requiredPasswordAttribute,
488
+ });
489
+ }
490
+ return createFlowAttributesRequiredResultV2({
491
+ correlationId,
492
+ continuationState: nextContinuationState,
493
+ attributes,
494
+ });
495
+ }
496
+ if (result.nextAction === SignUpSubmitAttributesNextActionV2.CONTINUE) {
497
+ return createFlowSignInContinuationRequiredResultV2({
498
+ correlationId,
499
+ continuationState: {
500
+ continuationToken: result.continuationToken,
501
+ scenario: continuationState.scenario,
502
+ links: {},
503
+ tokenRequest: continuationState.tokenRequest,
504
+ },
505
+ });
506
+ }
507
+ const message = `Sign-up attribute submission next action '${nextAction}' is not supported.`;
508
+ this.logger.error(message, correlationId);
509
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
510
+ }
511
+ ensureAuthenticationFactor(authenticationFactor, expectedFactor, transition, correlationId) {
512
+ if (authenticationFactor === expectedFactor) {
513
+ return;
514
+ }
515
+ const message = `Authentication factor '${authenticationFactor}' is not supported for ${transition}.`;
516
+ this.logger.error(message, correlationId);
517
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
518
+ }
519
+ async verifySignInPassword(parameters) {
520
+ const { continuationState, correlationId } = parameters;
521
+ const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, "submitPassword", correlationId), correlationId);
522
+ this.logger.verbose("1bi1xn", correlationId);
523
+ return this.apiClient.verifyChallenge(this.requireLink(correlationId, continuationState.links.verify), {
524
+ continuationToken: continuationState.continuationToken,
525
+ password: parameters.password,
526
+ }, context);
527
+ }
528
+ completeSignInAfterVerification(continuationState, continuationToken, correlationId) {
529
+ return this.signInWithContinuation({
530
+ correlationId,
531
+ continuationState: {
532
+ continuationToken,
533
+ scenario: continuationState.scenario,
534
+ links: {},
535
+ tokenRequest: continuationState.tokenRequest,
536
+ },
537
+ scopes: continuationState.tokenRequest?.scopes,
538
+ });
539
+ }
540
+ async sendMethodChallenge(parameters, step) {
541
+ const continuationState = parameters.continuationState;
542
+ const correlationId = parameters.correlationId;
543
+ const challengeHref = step === "resendCode"
544
+ ? continuationState.links.resend
545
+ : continuationState.links.challenge;
546
+ const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, step, correlationId), correlationId);
547
+ this.logger.verbose(step === "0d2mys"
548
+ ? "Resending V2 one-time code."
549
+ : "Requesting V2 challenge.", correlationId);
550
+ const challengeResult = await this.apiClient.requestChallenge(this.requireLink(correlationId, challengeHref), { continuationToken: continuationState.continuationToken }, context);
551
+ const nextAction = challengeResult.nextAction;
552
+ if (challengeResult.nextAction === ChallengeNextActionV2.VERIFY) {
553
+ return challengeResult;
554
+ }
555
+ if (challengeResult.nextAction === ChallengeNextActionV2.RISK_VERIFY) {
556
+ return this.apiClient.verifyRisk(challengeResult.riskVerifyHref, { continuationToken: challengeResult.continuationToken }, context);
557
+ }
558
+ const message = `Challenge next action '${nextAction}' is not supported.`;
559
+ this.logger.error(message, correlationId);
560
+ throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
561
+ }
562
+ createChallengeContinuationState(continuationState, challengeResult) {
563
+ return {
564
+ continuationToken: challengeResult.continuationToken,
565
+ scenario: continuationState.scenario,
566
+ links: {
567
+ challenge: continuationState.links.challenge,
568
+ verify: challengeResult.verifyHref,
569
+ resend: challengeResult.resendHref ??
570
+ continuationState.links.resend,
571
+ },
572
+ ...(continuationState.tokenRequest && {
573
+ tokenRequest: continuationState.tokenRequest,
574
+ }),
575
+ ...(continuationState.signUp && {
576
+ signUp: continuationState.signUp,
577
+ }),
578
+ };
579
+ }
580
+ resolveStepApiId(scenario, step, correlationId) {
581
+ const apiId = getPublicApiIdV2(scenario, step);
582
+ if (apiId === undefined) {
583
+ const message = `No telemetry API id is registered for step '${step}' of the '${scenario}' flow.`;
584
+ this.logger.error(message, correlationId);
585
+ throw new CustomAuthError(UNSUPPORTED_FLOW_STEP, message, correlationId);
586
+ }
587
+ return apiId;
588
+ }
589
+ requireLink(correlationId, href, missingLinkError) {
590
+ if (!href) {
591
+ const errorCode = missingLinkError?.code ?? CONTINUATION_LINK_MISSING;
592
+ const message = missingLinkError?.message ??
593
+ "The continuation state is missing a link required to advance the flow.";
594
+ this.logger.error(message, correlationId);
595
+ throw new CustomAuthError(errorCode, message, correlationId);
596
+ }
597
+ return href;
598
+ }
599
+ }
600
+
601
+ export { FlowInteractionClientV2 };
602
+ //# sourceMappingURL=FlowInteractionClientV2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowInteractionClientV2.mjs","sources":["../../../../../src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts"],"sourcesContent":[null],"names":["PublicApiId.SIGN_IN_V2_START","PublicAp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