@azure/msal-browser 5.28.0 → 5.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +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 +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 +1100 -765
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +1100 -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 +117 -107
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +117 -107
- 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 +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- 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/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/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
|
@@ -35,25 +35,21 @@ import { CustomAuthFlowScenarioV2 } from "../core/auth_flow/v2/CustomAuthFlowSce
|
|
|
35
35
|
import { SignInStartResultV2 } from "../sign_in/auth_flow/v2/result/SignInStartResultV2.js";
|
|
36
36
|
import { SignUpStartResultV2 } from "../sign_up/auth_flow/v2/result/SignUpStartResultV2.js";
|
|
37
37
|
import {
|
|
38
|
-
FLOW_COMPLETED_V2,
|
|
39
|
-
FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
|
|
40
|
-
FLOW_ATTRIBUTES_REQUIRED_V2,
|
|
41
38
|
FLOW_CODE_REQUIRED_V2,
|
|
39
|
+
FLOW_EXISTING_ACCOUNT_CODE_REQUIRED_V2,
|
|
40
|
+
FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2,
|
|
42
41
|
FLOW_METHOD_SELECTION_REQUIRED_V2,
|
|
43
|
-
FLOW_MFA_REQUIRED_V2,
|
|
44
42
|
FLOW_PASSWORD_REQUIRED_V2,
|
|
45
|
-
FLOW_SIGN_UP_PASSWORD_REQUIRED_V2,
|
|
46
43
|
} from "../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
47
44
|
import { AuthenticationFactorV2 } from "../core/network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
48
45
|
import { CodeRequiredStateV2 } from "../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
49
46
|
import { AuthMethodSelectionRequiredStateV2 } from "../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
50
|
-
import { CompletedStateV2 } from "../core/auth_flow/v2/state/CompletedStateV2.js";
|
|
51
47
|
import { SignInStateTransitionHandlerV2 } from "../sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.js";
|
|
52
|
-
import {
|
|
48
|
+
import { ResetPasswordStateTransitionHandlerV2 } from "../reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.js";
|
|
49
|
+
import { PasswordRequiredStateV2 } from "../core/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
53
50
|
import { SignUpStateTransitionHandlerV2 } from "../sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.js";
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import { AuthMethodRegistrationRequiredStateV2 } from "../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
51
|
+
import { ExistingAccountCodeRequiredStateV2 } from "../sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.js";
|
|
52
|
+
import { ExistingAccountPasswordRequiredStateV2 } from "../sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.js";
|
|
57
53
|
import { CustomAuthAuthority } from "../core/CustomAuthAuthority.js";
|
|
58
54
|
import { DefaultPackageInfo } from "../CustomAuthConstants.js";
|
|
59
55
|
import {
|
|
@@ -111,6 +107,8 @@ export class CustomAuthStandardController
|
|
|
111
107
|
new SignUpStateTransitionHandlerV2();
|
|
112
108
|
private readonly signInStateTransitionHandlerV2 =
|
|
113
109
|
new SignInStateTransitionHandlerV2();
|
|
110
|
+
private readonly resetPasswordStateTransitionHandlerV2 =
|
|
111
|
+
new ResetPasswordStateTransitionHandlerV2();
|
|
114
112
|
|
|
115
113
|
/*
|
|
116
114
|
* Constructor for CustomAuthStandardController.
|
|
@@ -650,11 +648,7 @@ export class CustomAuthStandardController
|
|
|
650
648
|
correlationId
|
|
651
649
|
);
|
|
652
650
|
|
|
653
|
-
|
|
654
|
-
"inputs.username",
|
|
655
|
-
inputs.username,
|
|
656
|
-
correlationId
|
|
657
|
-
);
|
|
651
|
+
this.ensureUsernameIsValidV2(inputs.username, correlationId);
|
|
658
652
|
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
659
653
|
ArgumentValidator.ensureArgumentIsStringArray(
|
|
660
654
|
"inputs.scopes",
|
|
@@ -697,6 +691,8 @@ export class CustomAuthStandardController
|
|
|
697
691
|
flowClient: this.flowClientV2,
|
|
698
692
|
continuationState: result.continuationState,
|
|
699
693
|
cacheClient: this.cacheClient,
|
|
694
|
+
resetPasswordStateTransitionHandler:
|
|
695
|
+
this.resetPasswordStateTransitionHandlerV2,
|
|
700
696
|
method: result.method,
|
|
701
697
|
sentTo: result.sentTo,
|
|
702
698
|
channel: result.channel,
|
|
@@ -717,6 +713,8 @@ export class CustomAuthStandardController
|
|
|
717
713
|
cacheClient: this.cacheClient,
|
|
718
714
|
methods: result.methods,
|
|
719
715
|
authenticationFactor: AuthenticationFactorV2.SINGLE_FACTOR,
|
|
716
|
+
resetPasswordStateTransitionHandler:
|
|
717
|
+
this.resetPasswordStateTransitionHandlerV2,
|
|
720
718
|
}),
|
|
721
719
|
undefined,
|
|
722
720
|
result.continuationState.scenario
|
|
@@ -743,11 +741,7 @@ export class CustomAuthStandardController
|
|
|
743
741
|
inputs,
|
|
744
742
|
correlationId
|
|
745
743
|
);
|
|
746
|
-
|
|
747
|
-
"inputs.username",
|
|
748
|
-
inputs.username,
|
|
749
|
-
correlationId
|
|
750
|
-
);
|
|
744
|
+
this.ensureUsernameIsValidV2(inputs.username, correlationId);
|
|
751
745
|
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
752
746
|
ArgumentValidator.ensureArgumentIsStringArray(
|
|
753
747
|
"inputs.scopes",
|
|
@@ -772,25 +766,10 @@ export class CustomAuthStandardController
|
|
|
772
766
|
const result = await this.flowClientV2.signIn({
|
|
773
767
|
correlationId,
|
|
774
768
|
username: inputs.username,
|
|
775
|
-
password: inputs.password,
|
|
776
769
|
scopes: inputs.scopes,
|
|
777
770
|
claims: inputs.claims,
|
|
778
771
|
});
|
|
779
772
|
|
|
780
|
-
if (result.type === FLOW_COMPLETED_V2) {
|
|
781
|
-
return new CustomAuthResultV2(
|
|
782
|
-
new CompletedStateV2(),
|
|
783
|
-
new CustomAuthAccountData(
|
|
784
|
-
result.authenticationResult.account,
|
|
785
|
-
this.customAuthConfig,
|
|
786
|
-
this.cacheClient,
|
|
787
|
-
this.logger,
|
|
788
|
-
correlationId
|
|
789
|
-
),
|
|
790
|
-
CustomAuthFlowScenarioV2.SignIn
|
|
791
|
-
);
|
|
792
|
-
}
|
|
793
|
-
|
|
794
773
|
if (result.type === FLOW_PASSWORD_REQUIRED_V2) {
|
|
795
774
|
return new CustomAuthResultV2(
|
|
796
775
|
new PasswordRequiredStateV2({
|
|
@@ -806,22 +785,6 @@ export class CustomAuthStandardController
|
|
|
806
785
|
);
|
|
807
786
|
}
|
|
808
787
|
|
|
809
|
-
if (result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2) {
|
|
810
|
-
return new CustomAuthResultV2(
|
|
811
|
-
new AuthMethodRegistrationRequiredStateV2({
|
|
812
|
-
correlationId: result.correlationId,
|
|
813
|
-
logger: this.logger,
|
|
814
|
-
config: this.customAuthConfig,
|
|
815
|
-
flowClient: this.flowClientV2,
|
|
816
|
-
continuationState: result.continuationState,
|
|
817
|
-
cacheClient: this.cacheClient,
|
|
818
|
-
methods: result.methods,
|
|
819
|
-
}),
|
|
820
|
-
undefined,
|
|
821
|
-
result.continuationState.scenario
|
|
822
|
-
);
|
|
823
|
-
}
|
|
824
|
-
|
|
825
788
|
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
826
789
|
return new CustomAuthResultV2(
|
|
827
790
|
new CodeRequiredStateV2({
|
|
@@ -863,24 +826,6 @@ export class CustomAuthStandardController
|
|
|
863
826
|
);
|
|
864
827
|
}
|
|
865
828
|
|
|
866
|
-
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
867
|
-
return new CustomAuthResultV2(
|
|
868
|
-
new AuthMethodSelectionRequiredStateV2({
|
|
869
|
-
correlationId: result.correlationId,
|
|
870
|
-
logger: this.logger,
|
|
871
|
-
config: this.customAuthConfig,
|
|
872
|
-
flowClient: this.flowClientV2,
|
|
873
|
-
continuationState: result.continuationState,
|
|
874
|
-
cacheClient: this.cacheClient,
|
|
875
|
-
methods: result.methods,
|
|
876
|
-
authenticationFactor:
|
|
877
|
-
AuthenticationFactorV2.MULTI_FACTOR,
|
|
878
|
-
}),
|
|
879
|
-
undefined,
|
|
880
|
-
result.continuationState.scenario
|
|
881
|
-
);
|
|
882
|
-
}
|
|
883
|
-
|
|
884
829
|
throw new UnexpectedError(
|
|
885
830
|
"Unsupported native auth V2 sign-in result type.",
|
|
886
831
|
correlationId
|
|
@@ -907,23 +852,7 @@ export class CustomAuthStandardController
|
|
|
907
852
|
inputs,
|
|
908
853
|
correlationId
|
|
909
854
|
);
|
|
910
|
-
|
|
911
|
-
"inputs.username",
|
|
912
|
-
inputs.username,
|
|
913
|
-
correlationId
|
|
914
|
-
);
|
|
915
|
-
if (Object.prototype.hasOwnProperty.call(inputs, "password")) {
|
|
916
|
-
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
917
|
-
"inputs.password",
|
|
918
|
-
inputs.password,
|
|
919
|
-
correlationId
|
|
920
|
-
);
|
|
921
|
-
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
922
|
-
"inputs.password",
|
|
923
|
-
inputs.password,
|
|
924
|
-
correlationId
|
|
925
|
-
);
|
|
926
|
-
}
|
|
855
|
+
this.ensureUsernameIsValidV2(inputs.username, correlationId);
|
|
927
856
|
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
928
857
|
ArgumentValidator.ensureArgumentIsStringArray(
|
|
929
858
|
"inputs.scopes",
|
|
@@ -948,27 +877,22 @@ export class CustomAuthStandardController
|
|
|
948
877
|
const result = await this.flowClientV2.signUp({
|
|
949
878
|
correlationId,
|
|
950
879
|
username: inputs.username,
|
|
951
|
-
password: inputs.password,
|
|
952
|
-
attributes: inputs.attributes,
|
|
953
880
|
scopes: inputs.scopes,
|
|
954
881
|
claims: inputs.claims,
|
|
882
|
+
attributes: inputs.attributes,
|
|
955
883
|
});
|
|
956
884
|
|
|
957
|
-
const commonStateParameters = {
|
|
958
|
-
correlationId: result.correlationId,
|
|
959
|
-
logger: this.logger,
|
|
960
|
-
config: this.customAuthConfig,
|
|
961
|
-
flowClient: this.flowClientV2,
|
|
962
|
-
continuationState: result.continuationState,
|
|
963
|
-
cacheClient: this.cacheClient,
|
|
964
|
-
signUpStateTransitionHandler:
|
|
965
|
-
this.signUpStateTransitionHandlerV2,
|
|
966
|
-
};
|
|
967
|
-
|
|
968
885
|
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
969
886
|
return new CustomAuthResultV2(
|
|
970
887
|
new CodeRequiredStateV2({
|
|
971
|
-
|
|
888
|
+
correlationId: result.correlationId,
|
|
889
|
+
logger: this.logger,
|
|
890
|
+
config: this.customAuthConfig,
|
|
891
|
+
flowClient: this.flowClientV2,
|
|
892
|
+
continuationState: result.continuationState,
|
|
893
|
+
cacheClient: this.cacheClient,
|
|
894
|
+
signUpStateTransitionHandler:
|
|
895
|
+
this.signUpStateTransitionHandlerV2,
|
|
972
896
|
sentTo: result.sentTo,
|
|
973
897
|
channel: result.channel,
|
|
974
898
|
codeLength: result.codeLength,
|
|
@@ -978,24 +902,58 @@ export class CustomAuthStandardController
|
|
|
978
902
|
);
|
|
979
903
|
}
|
|
980
904
|
|
|
981
|
-
if (result.type ===
|
|
905
|
+
if (result.type === FLOW_EXISTING_ACCOUNT_CODE_REQUIRED_V2) {
|
|
982
906
|
return new CustomAuthResultV2(
|
|
983
|
-
new
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
907
|
+
new ExistingAccountCodeRequiredStateV2({
|
|
908
|
+
correlationId: result.correlationId,
|
|
909
|
+
logger: this.logger,
|
|
910
|
+
config: this.customAuthConfig,
|
|
911
|
+
flowClient: this.flowClientV2,
|
|
912
|
+
continuationState: result.continuationState,
|
|
913
|
+
cacheClient: this.cacheClient,
|
|
914
|
+
signInStateTransitionHandler:
|
|
915
|
+
this.signInStateTransitionHandlerV2,
|
|
916
|
+
method: result.method,
|
|
917
|
+
sentTo: result.sentTo,
|
|
918
|
+
channel: result.channel,
|
|
919
|
+
codeLength: result.codeLength,
|
|
988
920
|
}),
|
|
989
921
|
undefined,
|
|
990
922
|
result.continuationState.scenario
|
|
991
923
|
);
|
|
992
924
|
}
|
|
993
925
|
|
|
994
|
-
if (result.type ===
|
|
926
|
+
if (result.type === FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2) {
|
|
995
927
|
return new CustomAuthResultV2(
|
|
996
|
-
new
|
|
997
|
-
|
|
998
|
-
|
|
928
|
+
new ExistingAccountPasswordRequiredStateV2({
|
|
929
|
+
correlationId: result.correlationId,
|
|
930
|
+
logger: this.logger,
|
|
931
|
+
config: this.customAuthConfig,
|
|
932
|
+
flowClient: this.flowClientV2,
|
|
933
|
+
continuationState: result.continuationState,
|
|
934
|
+
cacheClient: this.cacheClient,
|
|
935
|
+
signInStateTransitionHandler:
|
|
936
|
+
this.signInStateTransitionHandlerV2,
|
|
937
|
+
}),
|
|
938
|
+
undefined,
|
|
939
|
+
result.continuationState.scenario
|
|
940
|
+
);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
if (result.type === FLOW_METHOD_SELECTION_REQUIRED_V2) {
|
|
944
|
+
return new CustomAuthResultV2(
|
|
945
|
+
new AuthMethodSelectionRequiredStateV2({
|
|
946
|
+
correlationId: result.correlationId,
|
|
947
|
+
logger: this.logger,
|
|
948
|
+
config: this.customAuthConfig,
|
|
949
|
+
flowClient: this.flowClientV2,
|
|
950
|
+
continuationState: result.continuationState,
|
|
951
|
+
cacheClient: this.cacheClient,
|
|
952
|
+
methods: result.methods,
|
|
953
|
+
authenticationFactor:
|
|
954
|
+
AuthenticationFactorV2.SINGLE_FACTOR,
|
|
955
|
+
signInStateTransitionHandler:
|
|
956
|
+
this.signInStateTransitionHandlerV2,
|
|
999
957
|
}),
|
|
1000
958
|
undefined,
|
|
1001
959
|
result.continuationState.scenario
|
|
@@ -1019,6 +977,17 @@ export class CustomAuthStandardController
|
|
|
1019
977
|
}
|
|
1020
978
|
}
|
|
1021
979
|
|
|
980
|
+
private ensureUsernameIsValidV2(
|
|
981
|
+
username: string | undefined,
|
|
982
|
+
correlationId?: string
|
|
983
|
+
): void {
|
|
984
|
+
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
985
|
+
"inputs.username",
|
|
986
|
+
username,
|
|
987
|
+
correlationId
|
|
988
|
+
);
|
|
989
|
+
}
|
|
990
|
+
|
|
1022
991
|
private getCorrelationId(
|
|
1023
992
|
actionInputs: CustomAuthActionInputs | undefined
|
|
1024
993
|
): string {
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* An authentication method that can be registered for the current account.
|
|
8
|
-
*
|
|
9
|
-
* selects this method.
|
|
8
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
10
9
|
*/
|
|
11
10
|
export interface AuthenticationMethodRegistrationV2 {
|
|
12
11
|
type: string;
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* An authentication method offered by the server during a native auth V2 flow.
|
|
8
|
-
*
|
|
9
|
-
* (for example an email one-time code), and is surfaced when the flow needs the
|
|
10
|
-
* app to pick a method before a challenge is issued. The app passes the selected
|
|
11
|
-
* method back to the SDK to request a challenge for it.
|
|
8
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
12
9
|
*/
|
|
13
10
|
export interface AuthenticationMethodV2 {
|
|
14
11
|
id: string;
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The native auth V2 flow that a result or error originates from
|
|
8
|
-
*
|
|
9
|
-
* which entry flow produced it; `Unknown` is used when the flow cannot be
|
|
10
|
-
* determined.
|
|
7
|
+
* The native auth V2 flow that a result or error originates from.
|
|
8
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
11
9
|
*/
|
|
12
10
|
export const CustomAuthFlowScenarioV2 = {
|
|
13
11
|
SignIn: "signIn",
|
|
@@ -16,5 +14,8 @@ export const CustomAuthFlowScenarioV2 = {
|
|
|
16
14
|
Unknown: "unknown",
|
|
17
15
|
} as const;
|
|
18
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
19
|
+
*/
|
|
19
20
|
export type CustomAuthFlowScenarioV2 =
|
|
20
21
|
(typeof CustomAuthFlowScenarioV2)[keyof typeof CustomAuthFlowScenarioV2];
|
|
@@ -10,16 +10,18 @@ import { MsalCustomAuthError } from "../../error/MsalCustomAuthError.js";
|
|
|
10
10
|
import { UnexpectedError } from "../../error/UnexpectedError.js";
|
|
11
11
|
import { FailedStateV2 } from "./state/FailedStateV2.js";
|
|
12
12
|
import { AuthFlowErrorV2 } from "./error/AuthFlowErrorV2.js";
|
|
13
|
+
import type { AuthFlowErrorContextV2 } from "./error/AuthFlowErrorV2.js";
|
|
13
14
|
import { CustomAuthFlowScenarioV2 } from "./CustomAuthFlowScenarioV2.js";
|
|
14
15
|
|
|
15
16
|
type CreateWithErrorOptions = {
|
|
16
17
|
scenario?: CustomAuthFlowScenarioV2;
|
|
17
18
|
correlationId?: string;
|
|
19
|
+
errorContext?: AuthFlowErrorContextV2;
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
|
-
* Result of a native auth V2 operation.
|
|
22
|
-
*
|
|
23
|
+
* Result of a native auth V2 operation.
|
|
24
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
23
25
|
*/
|
|
24
26
|
export class CustomAuthResultV2<
|
|
25
27
|
TState extends AuthFlowStateBase,
|
|
@@ -34,8 +36,7 @@ export class CustomAuthResultV2<
|
|
|
34
36
|
error?: AuthFlowErrorV2;
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
38
|
-
* A successful match makes the state's properties available without a cast.
|
|
39
|
+
* Checks whether the result matches a state type and narrows its state.
|
|
39
40
|
* @param stateType - The state type to test for.
|
|
40
41
|
* @returns True (and narrows `state`) when the current state matches `stateType`.
|
|
41
42
|
*/
|
|
@@ -46,8 +47,7 @@ export class CustomAuthResultV2<
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
|
-
* Checks whether the
|
|
50
|
-
* contains the unified V2 flow error.
|
|
50
|
+
* Checks whether the operation failed.
|
|
51
51
|
* @returns True (and narrows `state`) when the operation failed.
|
|
52
52
|
*/
|
|
53
53
|
isFailed(): this is this & {
|
|
@@ -57,8 +57,18 @@ export class CustomAuthResultV2<
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* Checks whether the current state requires a password.
|
|
61
|
+
* @returns True (and narrows `state`) when a password is required.
|
|
62
|
+
*/
|
|
63
|
+
isPasswordRequired(): this is this & {
|
|
64
|
+
state: Extract<TState, { stateType: "passwordRequired" }>;
|
|
65
|
+
} {
|
|
66
|
+
return this.state.stateType === "passwordRequired";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Creates a failed result from the supplied error.
|
|
71
|
+
* Optional error context identifies MFA verification or authentication-method registration.
|
|
62
72
|
* @param error - The error that occurred.
|
|
63
73
|
* @param options - The flow-error context.
|
|
64
74
|
* @returns A failed result carrying the unified V2 flow error.
|
|
@@ -67,18 +77,20 @@ export class CustomAuthResultV2<
|
|
|
67
77
|
error: unknown,
|
|
68
78
|
options: CreateWithErrorOptions
|
|
69
79
|
): CustomAuthResultV2<TState | FailedStateV2, TData> {
|
|
70
|
-
const {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
const { correlationId } = options;
|
|
81
|
+
const flowError =
|
|
82
|
+
error instanceof AuthFlowErrorV2
|
|
83
|
+
? error
|
|
84
|
+
: new AuthFlowErrorV2(
|
|
85
|
+
CustomAuthResultV2.createErrorData(error, correlationId),
|
|
86
|
+
options.scenario ?? CustomAuthFlowScenarioV2.Unknown,
|
|
87
|
+
options.errorContext
|
|
88
|
+
);
|
|
77
89
|
|
|
78
90
|
const result = new CustomAuthResultV2<TState | FailedStateV2, TData>(
|
|
79
91
|
new FailedStateV2(),
|
|
80
92
|
undefined,
|
|
81
|
-
scenario
|
|
93
|
+
flowError.scenario
|
|
82
94
|
);
|
|
83
95
|
result.error = flowError;
|
|
84
96
|
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
export const ATTRIBUTE_VALIDATION_ERROR = "attributeValidationError";
|
|
6
7
|
export const INVALID_ONE_TIME_CODE = "invalidOneTimeCode";
|
|
7
8
|
export const INVALID_USERNAME_OR_PASSWORD = "invalidUserNameOrPassword";
|
|
9
|
+
export const PASSWORD_BANNED = "passwordBanned";
|
|
10
|
+
export const PASSWORD_IS_INVALID = "passwordIsInvalid";
|
|
11
|
+
export const PASSWORD_RECENTLY_USED = "passwordRecentlyUsed";
|
|
12
|
+
export const PASSWORD_TOO_LONG = "passwordTooLong";
|
|
13
|
+
export const PASSWORD_TOO_SHORT = "passwordTooShort";
|
|
8
14
|
export const PASSWORD_TOO_WEAK = "passwordTooWeak";
|
|
9
15
|
export const USER_NOT_FOUND = "userNotFound";
|