@azure/msal-browser 5.28.0 → 5.29.1
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.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +6 -4
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +58 -62
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +3 -5
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +19 -13
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +8 -2
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +58 -69
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +3 -3
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +42 -15
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +17 -4
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +14 -18
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +2 -4
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +2 -3
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +17 -6
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +110 -0
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs +2 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +256 -150
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +2 -6
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +10 -3
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -7
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +35 -19
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +20 -9
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -2
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +5 -7
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +3 -2
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +17 -2
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom_auth/index.mjs +4 -3
- package/dist/custom_auth/index.mjs.map +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +23 -7
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +24 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +4 -7
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +2 -2
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +17 -8
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +78 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +48 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +49 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +17 -24
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +38 -31
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +6 -2
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +5 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +21 -9
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/request/SilentRequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserDetection.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +1 -1
- package/dist/utils/PopupOriginCheck.mjs +1 -1
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
- package/dist/webBrokerBridge/index.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +21 -9
- package/lib/custom-auth-path/msal-custom-auth.cjs +1160 -765
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +1160 -765
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +7 -3
- package/lib/msal-browser.cjs +187 -117
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +187 -117
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +39 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +39 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +2 -2
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/custom_auth/CustomAuthActionInputs.ts +12 -5
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +5 -3
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +5 -3
- package/src/custom_auth/controller/CustomAuthStandardController.ts +79 -110
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +1 -2
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +1 -4
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +5 -4
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +28 -16
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +6 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +83 -72
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +3 -3
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +7 -5
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +10 -6
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +9 -6
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +4 -6
- package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +36 -0
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +6 -8
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +2 -2
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +61 -12
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +21 -3
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +30 -24
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +1 -3
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +11 -2
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +1 -2
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +26 -7
- package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +179 -0
- package/src/custom_auth/core/error/InvalidArgumentError.ts +1 -1
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +12 -12
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +394 -238
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +2 -6
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +2 -15
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +63 -26
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +0 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +74 -26
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +48 -9
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +4 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +0 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +14 -53
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +0 -18
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +32 -13
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +8 -9
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +4 -5
- package/src/custom_auth/core/telemetry/PublicApiId.ts +1 -0
- package/src/custom_auth/core/utils/ArgumentValidator.ts +26 -0
- package/src/custom_auth/index.ts +10 -11
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +6 -7
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +28 -5
- package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.ts +30 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +4 -8
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +4 -7
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +3 -6
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +0 -3
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +2 -3
- package/src/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.ts +49 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +8 -4
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +16 -4
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +26 -5
- package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.ts +101 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.ts +53 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.ts +97 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +0 -6
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +25 -48
- package/src/interaction_client/PlatformAuthInteractionClient.ts +53 -38
- package/src/interaction_client/RedirectClient.ts +5 -1
- package/src/interaction_client/StandardInteractionClient.ts +4 -0
- package/src/packageMetadata.ts +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +12 -5
- package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +5 -3
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +5 -3
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts +2 -0
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +1 -2
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +1 -4
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +5 -4
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +17 -8
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +6 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +23 -44
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +3 -3
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +7 -6
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +7 -6
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +8 -7
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +4 -6
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +20 -0
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +6 -8
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +2 -2
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +3 -6
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +3 -3
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +6 -8
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +1 -3
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +9 -2
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +1 -2
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +5 -6
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/error/InvalidArgumentError.d.ts +1 -0
- package/types/custom_auth/core/error/InvalidArgumentError.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +8 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +12 -10
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +1 -1
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +2 -5
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +22 -3
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +2 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +8 -8
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +18 -6
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +6 -10
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +0 -4
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +1 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts +3 -0
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +5 -5
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +6 -8
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +7 -5
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts +7 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -8
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +5 -6
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +3 -6
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts +3 -2
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts +27 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +6 -3
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +12 -3
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +8 -3
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts +24 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts +18 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts +7 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +0 -4
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +5 -4
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts +4 -3
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +0 -82
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +0 -25
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +0 -45
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +0 -1
- package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +0 -23
- package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +0 -19
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -22
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +0 -115
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +0 -34
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -61
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +0 -14
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts +0 -13
- package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -9
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -17
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +0 -11
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +0 -19
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +0 -1
|
@@ -11,10 +11,13 @@ import type { AuthMethodVerificationRequiredStateParametersV2 } from "./CustomAu
|
|
|
11
11
|
import { CompletedStateV2 } from "./CompletedStateV2.js";
|
|
12
12
|
import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
13
13
|
import { ensureArgumentIsNotNullOrUndefined } from "../../../utils/ArgumentValidator.js";
|
|
14
|
+
import { FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2 } from "../../../interaction_client/v2/result/FlowActionResultV2.js";
|
|
15
|
+
import { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* State returned when a newly registered authentication method must be
|
|
17
19
|
* activated with the challenge sent by the service.
|
|
20
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
18
21
|
*/
|
|
19
22
|
export class AuthMethodVerificationRequiredStateV2 extends AuthFlowActionRequiredStateBase<AuthMethodVerificationRequiredStateParametersV2> {
|
|
20
23
|
readonly stateType = "authMethodVerificationRequired";
|
|
@@ -34,7 +37,7 @@ export class AuthMethodVerificationRequiredStateV2 extends AuthFlowActionRequire
|
|
|
34
37
|
/**
|
|
35
38
|
* Submits the activation challenge for the registered method.
|
|
36
39
|
* @param challenge - The activation challenge to submit.
|
|
37
|
-
* @returns
|
|
40
|
+
* @returns A sign-in continuation, completed authentication result, or failed state.
|
|
38
41
|
*/
|
|
39
42
|
async submitChallenge(
|
|
40
43
|
challenge: string
|
|
@@ -58,6 +61,21 @@ export class AuthMethodVerificationRequiredStateV2 extends AuthFlowActionRequire
|
|
|
58
61
|
code: challenge,
|
|
59
62
|
});
|
|
60
63
|
|
|
64
|
+
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
65
|
+
return new CustomAuthResultV2(
|
|
66
|
+
new SignInContinuationStateV2({
|
|
67
|
+
correlationId: result.correlationId,
|
|
68
|
+
logger,
|
|
69
|
+
config: this.stateParameters.config,
|
|
70
|
+
flowClient,
|
|
71
|
+
continuationState: result.continuationState,
|
|
72
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
73
|
+
}),
|
|
74
|
+
undefined,
|
|
75
|
+
result.continuationState.scenario
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
61
79
|
const account = new CustomAuthAccountData(
|
|
62
80
|
result.authenticationResult.account,
|
|
63
81
|
this.stateParameters.config,
|
|
@@ -79,13 +97,13 @@ export class AuthMethodVerificationRequiredStateV2 extends AuthFlowActionRequire
|
|
|
79
97
|
return CustomAuthResultV2.createWithError(error, {
|
|
80
98
|
scenario: continuationState.scenario,
|
|
81
99
|
correlationId,
|
|
100
|
+
errorContext: "authMethodRegistration",
|
|
82
101
|
});
|
|
83
102
|
}
|
|
84
103
|
}
|
|
85
104
|
|
|
86
105
|
/**
|
|
87
|
-
* Requests a replacement activation challenge
|
|
88
|
-
* resend link.
|
|
106
|
+
* Requests a replacement activation challenge for the registered method.
|
|
89
107
|
* @returns Refreshed activation metadata or a failed state.
|
|
90
108
|
*/
|
|
91
109
|
async resendChallenge(): Promise<AuthMethodRegistrationChallengeResultV2> {
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
|
-
import { NewPasswordRequiredStateV2 } from "../../../../reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.js";
|
|
8
7
|
import type { CodeRequiredStateParametersV2 } from "./CustomAuthStateParametersV2.js";
|
|
9
8
|
import type { VerifyChallengeResultV2 } from "../result/VerifyChallengeResultV2.js";
|
|
10
|
-
import type {
|
|
9
|
+
import type { RequestChallengeResultV2 } from "../result/RequestChallengeResultV2.js";
|
|
11
10
|
import { CompletedStateV2 } from "./CompletedStateV2.js";
|
|
12
11
|
import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
13
12
|
import {
|
|
@@ -26,15 +25,14 @@ import { ChallengeVerificationStateBaseV2 } from "./ChallengeVerificationStateBa
|
|
|
26
25
|
import { AuthMethodRegistrationRequiredStateV2 } from "./AuthMethodRegistrationRequiredStateV2.js";
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
|
-
* State returned when first-factor
|
|
30
|
-
*
|
|
28
|
+
* State returned when first-factor authentication requires a one-time code.
|
|
29
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
31
30
|
*/
|
|
32
31
|
export class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2<CodeRequiredStateParametersV2> {
|
|
33
32
|
readonly stateType = "codeRequired";
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
|
-
* Submits the first-factor
|
|
37
|
-
* result may complete the operation or require another flow-specific step.
|
|
35
|
+
* Submits the first-factor code.
|
|
38
36
|
* @param code - The code to submit.
|
|
39
37
|
* @returns The result of submitting the first-factor code.
|
|
40
38
|
*/
|
|
@@ -48,17 +46,19 @@ export class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2<CodeRe
|
|
|
48
46
|
const resultType: string = result.type;
|
|
49
47
|
|
|
50
48
|
if (result.type === FLOW_NEW_PASSWORD_REQUIRED_V2) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
const resetPasswordStateTransitionHandler =
|
|
50
|
+
this.stateParameters.resetPasswordStateTransitionHandler;
|
|
51
|
+
if (!resetPasswordStateTransitionHandler) {
|
|
52
|
+
throw new CustomAuthError(
|
|
53
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
54
|
+
"Password-reset state transition handler is missing.",
|
|
55
|
+
correlationId
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return resetPasswordStateTransitionHandler.handleNewPasswordRequired(
|
|
60
|
+
result,
|
|
61
|
+
this.stateParameters
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -76,10 +76,14 @@ export class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2<CodeRe
|
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
return signUpStateTransitionHandler.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
return signUpStateTransitionHandler.handleAttributeSubmission(
|
|
80
|
+
result,
|
|
81
|
+
{
|
|
82
|
+
...this.stateParameters,
|
|
83
|
+
signUpStateTransitionHandler,
|
|
84
|
+
},
|
|
85
|
+
"attribute"
|
|
86
|
+
);
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
@@ -165,11 +169,10 @@ export class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2<CodeRe
|
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
/**
|
|
168
|
-
* Requests a replacement first-factor
|
|
169
|
-
* contains the refreshed challenge metadata.
|
|
172
|
+
* Requests a replacement first-factor code.
|
|
170
173
|
* @returns The result of requesting a replacement code.
|
|
171
174
|
*/
|
|
172
|
-
async resendCode(): Promise<
|
|
175
|
+
async resendCode(): Promise<RequestChallengeResultV2> {
|
|
173
176
|
const { correlationId, logger, continuationState } =
|
|
174
177
|
this.stateParameters;
|
|
175
178
|
|
|
@@ -189,6 +192,9 @@ export class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2<CodeRe
|
|
|
189
192
|
this.stateParameters.signUpStateTransitionHandler,
|
|
190
193
|
signInStateTransitionHandler:
|
|
191
194
|
this.stateParameters.signInStateTransitionHandler,
|
|
195
|
+
resetPasswordStateTransitionHandler:
|
|
196
|
+
this.stateParameters
|
|
197
|
+
.resetPasswordStateTransitionHandler,
|
|
192
198
|
method: this.method,
|
|
193
199
|
sentTo: result.sentTo,
|
|
194
200
|
channel: result.channel,
|
|
@@ -7,9 +7,7 @@ import { AuthFlowStateBase } from "../../AuthFlowState.js";
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Terminal state indicating the operation completed successfully.
|
|
10
|
-
*
|
|
11
|
-
* Completion data (for example the signed-in account) is carried by the
|
|
12
|
-
* result's `data` payload, not by this state.
|
|
10
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
13
11
|
*/
|
|
14
12
|
export class CompletedStateV2 extends AuthFlowStateBase {
|
|
15
13
|
readonly stateType = "completed";
|
|
@@ -11,20 +11,23 @@ import { CustomAuthSilentCacheClient } from "../../../../get_account/interaction
|
|
|
11
11
|
import type { SignUpStateTransitionHandlerV2 } from "../../../../sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.js";
|
|
12
12
|
import type { AuthenticationFactorV2 } from "../../../network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
13
13
|
import type { SignInStateTransitionHandlerV2 } from "../../../../sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.js";
|
|
14
|
+
import type { ResetPasswordStateTransitionHandlerV2 } from "../../../../reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.js";
|
|
14
15
|
import type { AuthenticationMethodRegistrationV2 } from "../AuthenticationMethodRegistrationV2.js";
|
|
16
|
+
import type { SignUpAttributeV2 } from "../../../network_client/custom_auth_api/v2/result/SignUpResultsV2.js";
|
|
15
17
|
|
|
16
18
|
export interface CustomAuthActionRequiredStateParametersV2
|
|
17
19
|
extends AuthFlowActionRequiredStateParameters {
|
|
18
20
|
flowClient: FlowInteractionClientV2;
|
|
19
21
|
continuationState: FlowContinuationStateV2;
|
|
20
22
|
cacheClient: CustomAuthSilentCacheClient;
|
|
23
|
+
signInStateTransitionHandler?: SignInStateTransitionHandlerV2;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export interface AuthMethodSelectionRequiredStateParametersV2
|
|
24
27
|
extends CustomAuthActionRequiredStateParametersV2 {
|
|
25
28
|
methods: readonly AuthenticationMethodV2[];
|
|
26
29
|
authenticationFactor: AuthenticationFactorV2;
|
|
27
|
-
|
|
30
|
+
resetPasswordStateTransitionHandler?: ResetPasswordStateTransitionHandlerV2;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
export interface CodeVerificationStateParametersV2
|
|
@@ -38,7 +41,13 @@ export interface CodeVerificationStateParametersV2
|
|
|
38
41
|
export interface CodeRequiredStateParametersV2
|
|
39
42
|
extends CodeVerificationStateParametersV2 {
|
|
40
43
|
signUpStateTransitionHandler?: SignUpStateTransitionHandlerV2;
|
|
41
|
-
|
|
44
|
+
resetPasswordStateTransitionHandler?: ResetPasswordStateTransitionHandlerV2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface PasswordRequiredStateParametersV2
|
|
48
|
+
extends CustomAuthActionRequiredStateParametersV2 {
|
|
49
|
+
requestedPasswordAttribute?: SignUpAttributeV2;
|
|
50
|
+
signUpStateTransitionHandler?: SignUpStateTransitionHandlerV2;
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
export type MFAVerificationRequiredStateParametersV2 =
|
|
@@ -7,8 +7,7 @@ import { AuthFlowStateBase } from "../../AuthFlowState.js";
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Terminal state indicating the operation failed.
|
|
10
|
-
*
|
|
11
|
-
* The error is carried by the result's `error` payload, not by this state.
|
|
10
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
12
11
|
*/
|
|
13
12
|
export class FailedStateV2 extends AuthFlowStateBase {
|
|
14
13
|
readonly stateType = "failed";
|
|
@@ -6,25 +6,29 @@
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
7
|
import type { MFAVerificationRequiredStateParametersV2 } from "./CustomAuthStateParametersV2.js";
|
|
8
8
|
import type { MFASubmitChallengeResultV2 } from "../result/MFASubmitChallengeResultV2.js";
|
|
9
|
-
import type {
|
|
9
|
+
import type { RequestChallengeResultV2 } from "../result/RequestChallengeResultV2.js";
|
|
10
10
|
import { CompletedStateV2 } from "./CompletedStateV2.js";
|
|
11
11
|
import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
FLOW_COMPLETED_V2,
|
|
14
|
+
FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2,
|
|
15
|
+
} from "../../../interaction_client/v2/result/FlowActionResultV2.js";
|
|
16
|
+
import { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
13
17
|
import { CustomAuthError } from "../../../error/CustomAuthError.js";
|
|
14
18
|
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
15
19
|
import { ChallengeVerificationStateBaseV2 } from "./ChallengeVerificationStateBaseV2.js";
|
|
16
20
|
import { AuthenticationFactorV2 } from "../../../network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
|
-
* State returned when
|
|
23
|
+
* State returned when authentication requires verification of an email or SMS MFA
|
|
20
24
|
* challenge. It allows the app to submit the challenge or request a replacement.
|
|
25
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
21
26
|
*/
|
|
22
27
|
export class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBaseV2<MFAVerificationRequiredStateParametersV2> {
|
|
23
28
|
readonly stateType = "mfaVerificationRequired";
|
|
24
29
|
|
|
25
30
|
/**
|
|
26
31
|
* Submits the email or SMS challenge as the second authentication factor.
|
|
27
|
-
* Successful verification completes sign-in.
|
|
28
32
|
* @param challenge - The challenge value to submit.
|
|
29
33
|
* @returns The result of submitting the MFA challenge.
|
|
30
34
|
*/
|
|
@@ -41,6 +45,21 @@ export class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBa
|
|
|
41
45
|
AuthenticationFactorV2.MULTI_FACTOR
|
|
42
46
|
);
|
|
43
47
|
|
|
48
|
+
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
49
|
+
return new CustomAuthResultV2(
|
|
50
|
+
new SignInContinuationStateV2({
|
|
51
|
+
correlationId: result.correlationId,
|
|
52
|
+
logger,
|
|
53
|
+
config: this.stateParameters.config,
|
|
54
|
+
flowClient: this.stateParameters.flowClient,
|
|
55
|
+
continuationState: result.continuationState,
|
|
56
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
57
|
+
}),
|
|
58
|
+
undefined,
|
|
59
|
+
result.continuationState.scenario
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
44
63
|
if (result.type !== FLOW_COMPLETED_V2) {
|
|
45
64
|
throw new CustomAuthError(
|
|
46
65
|
UNSUPPORTED_FLOW_TRANSITION,
|
|
@@ -71,16 +90,16 @@ export class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBa
|
|
|
71
90
|
return CustomAuthResultV2.createWithError(error, {
|
|
72
91
|
scenario: continuationState.scenario,
|
|
73
92
|
correlationId,
|
|
93
|
+
errorContext: "mfaVerification",
|
|
74
94
|
});
|
|
75
95
|
}
|
|
76
96
|
}
|
|
77
97
|
|
|
78
98
|
/**
|
|
79
|
-
* Requests a replacement challenge for the selected MFA method.
|
|
80
|
-
* returned state contains the refreshed email or SMS challenge metadata.
|
|
99
|
+
* Requests a replacement challenge for the selected MFA method.
|
|
81
100
|
* @returns The result of requesting a replacement MFA challenge.
|
|
82
101
|
*/
|
|
83
|
-
async resendChallenge(): Promise<
|
|
102
|
+
async resendChallenge(): Promise<RequestChallengeResultV2> {
|
|
84
103
|
const { correlationId, logger, continuationState } =
|
|
85
104
|
this.stateParameters;
|
|
86
105
|
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowActionRequiredStateBase } from "../../AuthFlowState.js";
|
|
7
|
+
import type { PasswordRequiredStateParametersV2 } from "./CustomAuthStateParametersV2.js";
|
|
8
|
+
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
9
|
+
import { CompletedStateV2 } from "./CompletedStateV2.js";
|
|
10
|
+
import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
11
|
+
import type { SubmitPasswordResultV2 } from "../result/SubmitPasswordResultV2.js";
|
|
12
|
+
import { AuthMethodSelectionRequiredStateV2 } from "./AuthMethodSelectionRequiredStateV2.js";
|
|
13
|
+
import {
|
|
14
|
+
FLOW_COMPLETED_V2,
|
|
15
|
+
FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
|
|
16
|
+
FLOW_MFA_REQUIRED_V2,
|
|
17
|
+
} from "../../../interaction_client/v2/result/FlowActionResultV2.js";
|
|
18
|
+
import { CustomAuthError } from "../../../error/CustomAuthError.js";
|
|
19
|
+
import { UnexpectedError } from "../../../error/UnexpectedError.js";
|
|
20
|
+
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
21
|
+
import { AuthenticationFactorV2 } from "../../../network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
22
|
+
import { AuthMethodRegistrationRequiredStateV2 } from "./AuthMethodRegistrationRequiredStateV2.js";
|
|
23
|
+
import { CustomAuthFlowScenarioV2 } from "../CustomAuthFlowScenarioV2.js";
|
|
24
|
+
import type { SignUpAttributeV2 } from "../../../network_client/custom_auth_api/v2/result/SignUpResultsV2.js";
|
|
25
|
+
import type { SubmitAttributesResultV2 } from "../../../../sign_up/auth_flow/v2/result/SubmitAttributesResultV2.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* State returned when sign-in or sign-up requires a password.
|
|
29
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
30
|
+
*/
|
|
31
|
+
export class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<PasswordRequiredStateParametersV2> {
|
|
32
|
+
readonly stateType = "passwordRequired";
|
|
33
|
+
|
|
34
|
+
readonly requestedPasswordAttribute?: SignUpAttributeV2;
|
|
35
|
+
|
|
36
|
+
constructor(stateParameters: PasswordRequiredStateParametersV2) {
|
|
37
|
+
super(stateParameters);
|
|
38
|
+
this.requestedPasswordAttribute =
|
|
39
|
+
stateParameters.requestedPasswordAttribute;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Submits the password and advances the active flow. Use the returned result
|
|
44
|
+
* to continue the flow.
|
|
45
|
+
* @param password - The account password.
|
|
46
|
+
* @returns The result containing the next state or an error.
|
|
47
|
+
*/
|
|
48
|
+
async submitPassword(password: string): Promise<SubmitPasswordResultV2> {
|
|
49
|
+
const { correlationId, logger, continuationState } =
|
|
50
|
+
this.stateParameters;
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
this.ensurePasswordIsNotEmpty(password);
|
|
54
|
+
|
|
55
|
+
if (
|
|
56
|
+
continuationState.scenario === CustomAuthFlowScenarioV2.SignUp
|
|
57
|
+
) {
|
|
58
|
+
return await this.submitSignUpPassword(password);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (
|
|
62
|
+
continuationState.scenario === CustomAuthFlowScenarioV2.SignIn
|
|
63
|
+
) {
|
|
64
|
+
return await this.submitSignInPassword(password);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
throw new CustomAuthError(
|
|
68
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
69
|
+
`Password submission is not supported for the '${continuationState.scenario}' flow.`,
|
|
70
|
+
correlationId
|
|
71
|
+
);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
logger.errorPii(
|
|
74
|
+
`Failed to submit V2 password. Error: '${error}'.`,
|
|
75
|
+
correlationId
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
79
|
+
scenario: continuationState.scenario,
|
|
80
|
+
correlationId,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private async submitSignUpPassword(
|
|
86
|
+
password: string
|
|
87
|
+
): Promise<SubmitAttributesResultV2> {
|
|
88
|
+
const { correlationId, continuationState, flowClient } =
|
|
89
|
+
this.stateParameters;
|
|
90
|
+
const signUpStateTransitionHandler =
|
|
91
|
+
this.stateParameters.signUpStateTransitionHandler;
|
|
92
|
+
|
|
93
|
+
if (!signUpStateTransitionHandler) {
|
|
94
|
+
throw new UnexpectedError(
|
|
95
|
+
"Sign-up state transition handler is missing.",
|
|
96
|
+
correlationId
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const result = await flowClient.submitSignUpAttributes({
|
|
101
|
+
correlationId,
|
|
102
|
+
continuationState,
|
|
103
|
+
attributes: { password },
|
|
104
|
+
});
|
|
105
|
+
return signUpStateTransitionHandler.handleAttributeSubmission(
|
|
106
|
+
result,
|
|
107
|
+
{ ...this.stateParameters, signUpStateTransitionHandler },
|
|
108
|
+
"password"
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private async submitSignInPassword(
|
|
113
|
+
password: string
|
|
114
|
+
): Promise<SubmitPasswordResultV2> {
|
|
115
|
+
const { correlationId, logger, continuationState, flowClient } =
|
|
116
|
+
this.stateParameters;
|
|
117
|
+
const result = await flowClient.submitSignInPassword({
|
|
118
|
+
correlationId,
|
|
119
|
+
continuationState,
|
|
120
|
+
password,
|
|
121
|
+
});
|
|
122
|
+
const resultType: string = result.type;
|
|
123
|
+
|
|
124
|
+
if (result.type === FLOW_COMPLETED_V2) {
|
|
125
|
+
const account = new CustomAuthAccountData(
|
|
126
|
+
result.authenticationResult.account,
|
|
127
|
+
this.stateParameters.config,
|
|
128
|
+
this.stateParameters.cacheClient,
|
|
129
|
+
logger,
|
|
130
|
+
correlationId
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
return new CustomAuthResultV2(
|
|
134
|
+
new CompletedStateV2(),
|
|
135
|
+
account,
|
|
136
|
+
continuationState.scenario
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2) {
|
|
141
|
+
return new CustomAuthResultV2(
|
|
142
|
+
new AuthMethodRegistrationRequiredStateV2({
|
|
143
|
+
correlationId: result.correlationId,
|
|
144
|
+
logger,
|
|
145
|
+
config: this.stateParameters.config,
|
|
146
|
+
flowClient,
|
|
147
|
+
continuationState: result.continuationState,
|
|
148
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
149
|
+
methods: result.methods,
|
|
150
|
+
}),
|
|
151
|
+
undefined,
|
|
152
|
+
result.continuationState.scenario
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
157
|
+
return new CustomAuthResultV2(
|
|
158
|
+
new AuthMethodSelectionRequiredStateV2({
|
|
159
|
+
correlationId: result.correlationId,
|
|
160
|
+
logger,
|
|
161
|
+
config: this.stateParameters.config,
|
|
162
|
+
flowClient,
|
|
163
|
+
continuationState: result.continuationState,
|
|
164
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
165
|
+
methods: result.methods,
|
|
166
|
+
authenticationFactor: AuthenticationFactorV2.MULTI_FACTOR,
|
|
167
|
+
}),
|
|
168
|
+
undefined,
|
|
169
|
+
result.continuationState.scenario
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
throw new CustomAuthError(
|
|
174
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
175
|
+
`Password verification result type '${resultType}' is not supported.`,
|
|
176
|
+
correlationId
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { CustomAuthError } from "./CustomAuthError.js";
|
|
7
7
|
|
|
8
8
|
export class InvalidArgumentError extends CustomAuthError {
|
|
9
|
-
constructor(argName: string, correlationId?: string) {
|
|
9
|
+
constructor(public readonly argName: string, correlationId?: string) {
|
|
10
10
|
const errorDescription = `The argument '${argName}' is invalid.`;
|
|
11
11
|
|
|
12
12
|
super("invalid_argument", errorDescription, correlationId);
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthFlowScenarioV2 } from "../../auth_flow/v2/CustomAuthFlowScenarioV2.js";
|
|
7
|
+
import type { UserAccountAttributes } from "../../../UserAccountAttributes.js";
|
|
7
8
|
|
|
8
|
-
/*
|
|
9
|
-
* Server-provided `_links` hrefs used to continue a flow. Each response supplies
|
|
10
|
-
* the links needed for the next action.
|
|
11
|
-
*/
|
|
12
9
|
export interface FlowLinksV2 {
|
|
13
10
|
challenge?: string;
|
|
14
11
|
verify?: string;
|
|
@@ -19,17 +16,20 @@ export interface FlowLinksV2 {
|
|
|
19
16
|
submitAttributes?: string;
|
|
20
17
|
}
|
|
21
18
|
|
|
22
|
-
/*
|
|
23
|
-
* Opaque state used to resume a server-driven flow. It carries the continuation
|
|
24
|
-
* token, scenario, normalized entry scopes, and server-provided links without
|
|
25
|
-
* exposing them to the app.
|
|
26
|
-
*/
|
|
27
19
|
export interface FlowContinuationStateV2 {
|
|
28
20
|
continuationToken: string;
|
|
29
21
|
scenario: CustomAuthFlowScenarioV2;
|
|
30
22
|
scopes: string[];
|
|
31
23
|
links: FlowLinksV2;
|
|
32
|
-
signUp?:
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
signUp?:
|
|
25
|
+
| {
|
|
26
|
+
purpose: "existingAccount";
|
|
27
|
+
pendingProfileAttributes?: never;
|
|
28
|
+
submittedAttributeIds?: never;
|
|
29
|
+
}
|
|
30
|
+
| {
|
|
31
|
+
purpose: "newAccount";
|
|
32
|
+
pendingProfileAttributes?: Readonly<UserAccountAttributes>;
|
|
33
|
+
submittedAttributeIds: readonly string[];
|
|
34
|
+
};
|
|
35
35
|
}
|