@azure/msal-browser 5.25.1 → 5.26.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 +7 -2
- package/dist/controllers/NestedAppAuthController.mjs.map +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 +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +49 -19
- 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 +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +8 -7
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +4 -3
- 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 +174 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +67 -17
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +3 -4
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +7 -15
- 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 +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +1 -5
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +3 -2
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +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 +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 +61 -52
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +6 -3
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +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 -2
- 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 +12 -10
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +3 -3
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs.map +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 +3 -7
- 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 +2 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs.map +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/SignUpResultsV2.mjs +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 +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +8 -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 +2 -11
- 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 +1 -3
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
- 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/PasswordRequiredStateV2.mjs +5 -5
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +5 -16
- 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 +35 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -0
- 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 +1 -3
- 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/SignUpAttributesRequiredStateBaseV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +1 -3
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +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 +1 -1
- package/dist/interaction_client/PopupClient.mjs +4 -3
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +4 -3
- 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 +4 -3
- package/dist/interaction_client/SilentIframeClient.mjs.map +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 +6 -6
- 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 +9 -3
- package/dist/request/SilentRequestHelpers.mjs.map +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 +53 -0
- package/dist/utils/BrowserDetection.mjs.map +1 -0
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.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 +6 -6
- package/lib/custom-auth-path/msal-custom-auth.cjs +601 -657
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +602 -658
- 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 +136 -78
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +136 -78
- 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/controllers/NestedAppAuthController.ts +6 -1
- package/src/custom_auth/CustomAuthActionInputs.ts +16 -6
- package/src/custom_auth/controller/CustomAuthStandardController.ts +78 -17
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +18 -30
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +1 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +239 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +2 -5
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +13 -10
- package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +19 -0
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +3 -6
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +4 -6
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +114 -17
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +6 -3
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +17 -19
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +5 -5
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +0 -4
- package/src/custom_auth/core/error/CustomAuthApiError.ts +2 -1
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +3 -4
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +75 -68
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +6 -3
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +2 -4
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +0 -1
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +17 -15
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.ts +1 -1
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +3 -11
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +2 -3
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +2 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +1 -1
- package/src/custom_auth/core/utils/ArgumentValidator.ts +13 -0
- package/src/custom_auth/index.ts +4 -14
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +6 -10
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +3 -6
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +2 -4
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +2 -4
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +5 -4
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +4 -23
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +56 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +1 -5
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +2 -5
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -2
- package/src/interaction_client/PopupClient.ts +9 -1
- package/src/interaction_client/RedirectClient.ts +9 -4
- package/src/interaction_client/SilentIframeClient.ts +9 -2
- package/src/packageMetadata.ts +1 -1
- package/src/request/SilentRequestHelpers.ts +11 -2
- package/src/utils/BrowserDetection.ts +85 -0
- package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +16 -5
- package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts +1 -0
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +9 -11
- 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 +1 -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 +90 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +1 -2
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +1 -2
- 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/ResendCodeResultV2.d.ts +13 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +2 -3
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +5 -6
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +9 -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/ChallengeVerificationStateBaseV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +2 -2
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +5 -3
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts +2 -1
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +1 -3
- 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 +2 -2
- 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 +2 -2
- 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 -4
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +0 -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/BaseApiClientV2.d.ts +2 -2
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts.map +1 -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 -2
- 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 +2 -0
- 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 +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts +1 -0
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +3 -12
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +5 -7
- 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.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -6
- 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 +3 -4
- 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/result/SubmitPasswordResultV2.d.ts +3 -4
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +4 -9
- 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/SignInStateTransitionHandlerV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +1 -2
- 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 +1 -2
- 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.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/request/SilentRequestHelpers.d.ts +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/utils/BrowserDetection.d.ts +17 -0
- package/types/utils/BrowserDetection.d.ts.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs +0 -102
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs +0 -20
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs +0 -36
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs +0 -29
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs +0 -36
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs +0 -61
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs.map +0 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs +0 -29
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs +0 -18
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs +0 -37
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs +0 -23
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs +0 -25
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs +0 -33
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs.map +0 -1
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.ts +0 -146
- package/src/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.ts +0 -15
- package/src/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.ts +0 -33
- package/src/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.ts +0 -25
- package/src/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.ts +0 -18
- package/src/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.ts +0 -59
- package/src/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.ts +0 -76
- package/src/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.ts +0 -25
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.ts +0 -13
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.ts +0 -35
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.ts +0 -19
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.ts +0 -21
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.ts +0 -32
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts +0 -40
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts +0 -11
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts +0 -23
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts +0 -18
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts +0 -7
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts +0 -17
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts +0 -18
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts.map +0 -1
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts +0 -18
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts +0 -9
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts +0 -22
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts +0 -12
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts +0 -14
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts +0 -20
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts.map +0 -1
|
@@ -9,14 +9,10 @@ import { CustomAuthError } from "../../error/CustomAuthError.js";
|
|
|
9
9
|
import { MsalCustomAuthError } from "../../error/MsalCustomAuthError.js";
|
|
10
10
|
import { UnexpectedError } from "../../error/UnexpectedError.js";
|
|
11
11
|
import { FailedStateV2 } from "./state/FailedStateV2.js";
|
|
12
|
-
import {
|
|
12
|
+
import { AuthFlowErrorV2 } from "./error/AuthFlowErrorV2.js";
|
|
13
13
|
import { CustomAuthFlowScenarioV2 } from "./CustomAuthFlowScenarioV2.js";
|
|
14
14
|
|
|
15
|
-
type CreateWithErrorOptions
|
|
16
|
-
errorType: new (
|
|
17
|
-
errorData: CustomAuthError,
|
|
18
|
-
scenario?: CustomAuthFlowScenarioV2
|
|
19
|
-
) => TError;
|
|
15
|
+
type CreateWithErrorOptions = {
|
|
20
16
|
scenario?: CustomAuthFlowScenarioV2;
|
|
21
17
|
correlationId?: string;
|
|
22
18
|
};
|
|
@@ -27,7 +23,6 @@ type CreateWithErrorOptions<TError extends AuthFlowErrorBaseV2> = {
|
|
|
27
23
|
*/
|
|
28
24
|
export class CustomAuthResultV2<
|
|
29
25
|
TState extends AuthFlowStateBase,
|
|
30
|
-
TError extends AuthFlowErrorBaseV2,
|
|
31
26
|
TData = void
|
|
32
27
|
> {
|
|
33
28
|
constructor(
|
|
@@ -36,7 +31,7 @@ export class CustomAuthResultV2<
|
|
|
36
31
|
public readonly scenario: CustomAuthFlowScenarioV2 = CustomAuthFlowScenarioV2.Unknown
|
|
37
32
|
) {}
|
|
38
33
|
|
|
39
|
-
error?:
|
|
34
|
+
error?: AuthFlowErrorV2;
|
|
40
35
|
|
|
41
36
|
/**
|
|
42
37
|
* Narrows the result to a specific state by its `stateType` discriminator.
|
|
@@ -52,7 +47,7 @@ export class CustomAuthResultV2<
|
|
|
52
47
|
|
|
53
48
|
/**
|
|
54
49
|
* Checks whether the result is in the terminal failed state. A failed result
|
|
55
|
-
* contains the flow
|
|
50
|
+
* contains the unified V2 flow error.
|
|
56
51
|
* @returns True (and narrows `state`) when the operation failed.
|
|
57
52
|
*/
|
|
58
53
|
isFailed(): this is this & {
|
|
@@ -63,35 +58,28 @@ export class CustomAuthResultV2<
|
|
|
63
58
|
|
|
64
59
|
/**
|
|
65
60
|
* Creates a failed result from the supplied error. The result uses the
|
|
66
|
-
* shared {@link FailedStateV2} terminal state.
|
|
61
|
+
* shared {@link FailedStateV2} terminal state and unified V2 flow error.
|
|
67
62
|
* @param error - The error that occurred.
|
|
68
|
-
* @param options - The flow-error
|
|
69
|
-
* @returns A failed result carrying the flow
|
|
63
|
+
* @param options - The flow-error context.
|
|
64
|
+
* @returns A failed result carrying the unified V2 flow error.
|
|
70
65
|
*/
|
|
71
|
-
static createWithError<
|
|
72
|
-
TState extends AuthFlowStateBase,
|
|
73
|
-
TError extends AuthFlowErrorBaseV2,
|
|
74
|
-
TData = void
|
|
75
|
-
>(
|
|
66
|
+
static createWithError<TState extends AuthFlowStateBase, TData = void>(
|
|
76
67
|
error: unknown,
|
|
77
|
-
options: CreateWithErrorOptions
|
|
78
|
-
): CustomAuthResultV2<TState | FailedStateV2,
|
|
79
|
-
const {
|
|
80
|
-
|
|
81
|
-
scenario = CustomAuthFlowScenarioV2.Unknown,
|
|
82
|
-
correlationId,
|
|
83
|
-
} = options;
|
|
68
|
+
options: CreateWithErrorOptions
|
|
69
|
+
): CustomAuthResultV2<TState | FailedStateV2, TData> {
|
|
70
|
+
const { scenario = CustomAuthFlowScenarioV2.Unknown, correlationId } =
|
|
71
|
+
options;
|
|
84
72
|
const errorData = CustomAuthResultV2.createErrorData(
|
|
85
73
|
error,
|
|
86
74
|
correlationId
|
|
87
75
|
);
|
|
88
|
-
const flowError = new
|
|
76
|
+
const flowError = new AuthFlowErrorV2(errorData, scenario);
|
|
89
77
|
|
|
90
|
-
const result = new CustomAuthResultV2<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
78
|
+
const result = new CustomAuthResultV2<TState | FailedStateV2, TData>(
|
|
79
|
+
new FailedStateV2(),
|
|
80
|
+
undefined,
|
|
81
|
+
scenario
|
|
82
|
+
);
|
|
95
83
|
result.error = flowError;
|
|
96
84
|
|
|
97
85
|
return result;
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { CustomAuthError } from "../../../error/CustomAuthError.js";
|
|
7
|
+
import { CustomAuthApiError } from "../../../error/CustomAuthApiError.js";
|
|
8
|
+
import { InvalidArgumentError } from "../../../error/InvalidArgumentError.js";
|
|
9
|
+
import { WEB_REDIRECT_REQUIRED } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
10
|
+
import {
|
|
11
|
+
INVALID_ONE_TIME_CODE,
|
|
12
|
+
INVALID_USERNAME_OR_PASSWORD,
|
|
13
|
+
PASSWORD_TOO_WEAK,
|
|
14
|
+
USER_NOT_FOUND,
|
|
15
|
+
} from "./AuthFlowErrorSubcodesV2.js";
|
|
16
|
+
import { CustomAuthFlowScenarioV2 } from "../CustomAuthFlowScenarioV2.js";
|
|
17
|
+
import type { AttributeValidationDetailV2 } from "../../../network_client/custom_auth_api/v2/response/ErrorResponsesV2.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Error returned by a native authentication V2 operation. Use its classifiers
|
|
21
|
+
* to handle known failures while retaining raw diagnostics through `errorData`.
|
|
22
|
+
*/
|
|
23
|
+
export class AuthFlowErrorV2 {
|
|
24
|
+
readonly scenario: CustomAuthFlowScenarioV2;
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
public errorData: CustomAuthError,
|
|
28
|
+
scenario: CustomAuthFlowScenarioV2 = CustomAuthFlowScenarioV2.Unknown
|
|
29
|
+
) {
|
|
30
|
+
this.scenario = scenario;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get correlationId(): string | undefined {
|
|
34
|
+
return this.errorData.correlationId;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
get errorCodes(): number[] | undefined {
|
|
38
|
+
return this.errorData.errorCodes;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get errorDescription(): string | undefined {
|
|
42
|
+
return this.errorData.errorDescription;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get innerErrorCode(): string | undefined {
|
|
46
|
+
return this.errorData instanceof CustomAuthApiError
|
|
47
|
+
? this.errorData.innerErrorCode
|
|
48
|
+
: undefined;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Gets the attribute ids that the service reports as required.
|
|
53
|
+
*/
|
|
54
|
+
get requiredAttributes(): readonly string[] {
|
|
55
|
+
return this.getAttributeIdsByCode("attributeRequired");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Gets the attribute ids whose submitted values failed validation.
|
|
60
|
+
*/
|
|
61
|
+
get invalidAttributes(): readonly string[] {
|
|
62
|
+
return this.getAttributeIdsByCode("attributeValidationFailed");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Checks if the error requires the flow to continue in the browser. The
|
|
67
|
+
* server surfaces this as the `web_redirect_required` OAuth suberror, so a
|
|
68
|
+
* browser hand-off arrives as a `FailedStateV2` on which this detector
|
|
69
|
+
* returns true.
|
|
70
|
+
* @returns True if the browser is required, false otherwise.
|
|
71
|
+
*/
|
|
72
|
+
isBrowserRequired(): boolean {
|
|
73
|
+
return this.errorData.subError === WEB_REDIRECT_REQUIRED;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Checks if the error is due to a caller-supplied argument failing
|
|
78
|
+
* client-side validation before the request was issued (for example an empty
|
|
79
|
+
* username, code, or password, or an unknown method id). Use it to prompt the
|
|
80
|
+
* user to correct the input rather than treating it as a server failure.
|
|
81
|
+
* @returns True if the input was invalid, false otherwise.
|
|
82
|
+
*/
|
|
83
|
+
isInvalidInput(): boolean {
|
|
84
|
+
return this.errorData instanceof InvalidArgumentError;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Checks whether the service rejected the username parameter. Use it to ask
|
|
89
|
+
* the user to correct the supplied username.
|
|
90
|
+
* @returns True when the username is invalid, otherwise false.
|
|
91
|
+
*/
|
|
92
|
+
isInvalidUsername(): boolean {
|
|
93
|
+
return this.isUserInvalidError();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Checks whether the supplied username does not identify an account. Use it
|
|
98
|
+
* to distinguish a missing account from other request failures.
|
|
99
|
+
* @returns True when the service reports that the user was not found.
|
|
100
|
+
*/
|
|
101
|
+
isUserNotFound(): boolean {
|
|
102
|
+
return this.isUserNotFoundError();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Checks whether the service rejected the supplied sign-in credentials. This
|
|
107
|
+
* classifier does not identify new-password policy failures.
|
|
108
|
+
* @returns True when the username or password is incorrect.
|
|
109
|
+
*/
|
|
110
|
+
isInvalidCredentials(): boolean {
|
|
111
|
+
return this.isPasswordIncorrectError();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Checks whether the service rejected a one-time code. Use it to prompt the
|
|
116
|
+
* user to re-enter the code or request a new one.
|
|
117
|
+
* @returns True when the one-time code is invalid, otherwise false.
|
|
118
|
+
*/
|
|
119
|
+
isInvalidCode(): boolean {
|
|
120
|
+
return this.isInvalidCodeError();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Checks whether a new password violates password policy. It recognizes
|
|
125
|
+
* both weak-password responses and password-targeted validation details.
|
|
126
|
+
* @returns True when the new password is invalid, otherwise false.
|
|
127
|
+
*/
|
|
128
|
+
isInvalidPassword(): boolean {
|
|
129
|
+
return (
|
|
130
|
+
this.isInvalidPasswordError() ||
|
|
131
|
+
this.isPasswordPolicyViolationError()
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Checks whether an account already exists for the supplied identifier.
|
|
137
|
+
* This can occur at different stages while completing sign-up.
|
|
138
|
+
* @returns True if the account already exists, otherwise false.
|
|
139
|
+
*/
|
|
140
|
+
isUserAlreadyExists(): boolean {
|
|
141
|
+
return this.getAttributeValidationDetails().some(
|
|
142
|
+
(detail) => detail.code === "userAlreadyExists"
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Checks whether the service requires attributes omitted from the request.
|
|
148
|
+
* Use it to collect the required attributes before resubmitting.
|
|
149
|
+
* @returns True when required attributes are missing, otherwise false.
|
|
150
|
+
*/
|
|
151
|
+
isMissingRequiredAttributes(): boolean {
|
|
152
|
+
return this.requiredAttributes.length > 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
private isUserNotFoundError(): boolean {
|
|
156
|
+
return (
|
|
157
|
+
this.errorData.error === "invalidRequest" &&
|
|
158
|
+
(this.innerErrorCode === USER_NOT_FOUND ||
|
|
159
|
+
this.errorData.errorDescription?.includes("AADSTS50034") ===
|
|
160
|
+
true)
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
private isUserInvalidError(): boolean {
|
|
165
|
+
return (
|
|
166
|
+
this.errorData.error === "invalidRequest" &&
|
|
167
|
+
this.errorData.errorDescription?.includes("AADSTS90100") === true &&
|
|
168
|
+
this.errorData.errorDescription
|
|
169
|
+
.toLowerCase()
|
|
170
|
+
.includes("username parameter")
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
private isInvalidCodeError(): boolean {
|
|
175
|
+
return (
|
|
176
|
+
this.errorData.error === "invalidGrant" &&
|
|
177
|
+
this.innerErrorCode === INVALID_ONE_TIME_CODE
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
private isInvalidPasswordError(): boolean {
|
|
182
|
+
return (
|
|
183
|
+
this.errorData.error === "invalidRequest" &&
|
|
184
|
+
this.innerErrorCode === PASSWORD_TOO_WEAK
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
private isPasswordPolicyViolationError(): boolean {
|
|
189
|
+
return this.getAttributeValidationDetails().some((detail) => {
|
|
190
|
+
const attributeIds: unknown = detail.attributeIds;
|
|
191
|
+
|
|
192
|
+
return (
|
|
193
|
+
detail.code === "passwordPolicyViolation" &&
|
|
194
|
+
Array.isArray(attributeIds) &&
|
|
195
|
+
attributeIds.some(
|
|
196
|
+
(attributeId: unknown) =>
|
|
197
|
+
typeof attributeId === "string" &&
|
|
198
|
+
attributeId.toLowerCase() === "password"
|
|
199
|
+
)
|
|
200
|
+
);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
private isPasswordIncorrectError(): boolean {
|
|
205
|
+
return (
|
|
206
|
+
this.errorData.error === "invalidGrant" &&
|
|
207
|
+
this.innerErrorCode === INVALID_USERNAME_OR_PASSWORD
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
private getAttributeValidationDetails(): AttributeValidationDetailV2[] {
|
|
212
|
+
const details = (
|
|
213
|
+
this.errorData as CustomAuthError & {
|
|
214
|
+
attributeValidationDetails?: unknown;
|
|
215
|
+
}
|
|
216
|
+
).attributeValidationDetails;
|
|
217
|
+
|
|
218
|
+
return Array.isArray(details)
|
|
219
|
+
? details.filter(
|
|
220
|
+
(detail): detail is AttributeValidationDetailV2 =>
|
|
221
|
+
typeof detail === "object" && detail !== null
|
|
222
|
+
)
|
|
223
|
+
: [];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
private getAttributeIdsByCode(code: string): string[] {
|
|
227
|
+
const attributeIds = this.getAttributeValidationDetails().flatMap(
|
|
228
|
+
(detail) =>
|
|
229
|
+
detail.code === code && Array.isArray(detail.attributeIds)
|
|
230
|
+
? detail.attributeIds.filter(
|
|
231
|
+
(attributeId): attributeId is string =>
|
|
232
|
+
typeof attributeId === "string"
|
|
233
|
+
)
|
|
234
|
+
: []
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
return [...new Set(attributeIds)];
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
|
-
import type { RequestChallengeErrorV2 } from "../error/RequestChallengeErrorV2.js";
|
|
8
7
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
8
|
import type { MFAVerificationRequiredStateV2 } from "../state/MFAVerificationRequiredStateV2.js";
|
|
10
9
|
|
|
@@ -20,7 +19,5 @@ export type MFAResendChallengeResultStateV2 =
|
|
|
20
19
|
* Result returned after an app requests a replacement MFA challenge. Inspect
|
|
21
20
|
* the state before prompting the user for the new email or SMS challenge.
|
|
22
21
|
*/
|
|
23
|
-
export type MFAResendChallengeResultV2 =
|
|
24
|
-
MFAResendChallengeResultStateV2
|
|
25
|
-
RequestChallengeErrorV2
|
|
26
|
-
>;
|
|
22
|
+
export type MFAResendChallengeResultV2 =
|
|
23
|
+
CustomAuthResultV2<MFAResendChallengeResultStateV2>;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
|
-
import type { VerifyChallengeErrorV2 } from "../error/VerifyChallengeErrorV2.js";
|
|
8
7
|
import type { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
9
8
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
10
9
|
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
@@ -21,6 +20,5 @@ export type MFASubmitChallengeResultStateV2 = CompletedStateV2 | FailedStateV2;
|
|
|
21
20
|
*/
|
|
22
21
|
export type MFASubmitChallengeResultV2 = CustomAuthResultV2<
|
|
23
22
|
MFASubmitChallengeResultStateV2,
|
|
24
|
-
VerifyChallengeErrorV2,
|
|
25
23
|
CustomAuthAccountData
|
|
26
24
|
>;
|
|
@@ -4,22 +4,25 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
|
-
import type { RequestChallengeErrorV2 } from "../error/RequestChallengeErrorV2.js";
|
|
8
7
|
import type { CodeRequiredStateV2 } from "../state/CodeRequiredStateV2.js";
|
|
9
8
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
|
+
import type { MFAVerificationRequiredStateV2 } from "../state/MFAVerificationRequiredStateV2.js";
|
|
10
|
+
import type { PasswordRequiredStateV2 } from "../../../../sign_in/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
|
-
* The states a
|
|
13
|
-
*
|
|
13
|
+
* The states a request-challenge action can resolve to. Trusted server response
|
|
14
|
+
* context determines whether primary or MFA verification is required.
|
|
14
15
|
*/
|
|
15
|
-
export type RequestChallengeResultStateV2 =
|
|
16
|
+
export type RequestChallengeResultStateV2 =
|
|
17
|
+
| CodeRequiredStateV2
|
|
18
|
+
| MFAVerificationRequiredStateV2
|
|
19
|
+
| PasswordRequiredStateV2
|
|
20
|
+
| FailedStateV2;
|
|
16
21
|
|
|
17
22
|
/**
|
|
18
23
|
* Result of requesting (or resending) a challenge. It wraps one of
|
|
19
|
-
* {@link RequestChallengeResultStateV2} plus, on failure,
|
|
20
|
-
*
|
|
24
|
+
* {@link RequestChallengeResultStateV2} plus, on failure, the unified V2 flow
|
|
25
|
+
* error.
|
|
21
26
|
*/
|
|
22
|
-
export type RequestChallengeResultV2 =
|
|
23
|
-
RequestChallengeResultStateV2
|
|
24
|
-
RequestChallengeErrorV2
|
|
25
|
-
>;
|
|
27
|
+
export type RequestChallengeResultV2 =
|
|
28
|
+
CustomAuthResultV2<RequestChallengeResultStateV2>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
|
+
import type { CodeRequiredStateV2 } from "../state/CodeRequiredStateV2.js";
|
|
8
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The states a resend-code action can resolve to.
|
|
12
|
+
*/
|
|
13
|
+
export type ResendCodeResultStateV2 = CodeRequiredStateV2 | FailedStateV2;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Result of requesting a replacement first-factor code. It wraps one of
|
|
17
|
+
* {@link ResendCodeResultStateV2} plus, on failure, the unified V2 flow error.
|
|
18
|
+
*/
|
|
19
|
+
export type ResendCodeResultV2 = CustomAuthResultV2<ResendCodeResultStateV2>;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
|
-
import type { ResetPasswordStartErrorV2 } from "../error/ResetPasswordStartErrorV2.js";
|
|
8
7
|
import type { AuthMethodSelectionRequiredStateV2 } from "../state/AuthMethodSelectionRequiredStateV2.js";
|
|
9
8
|
import type { CodeRequiredStateV2 } from "../state/CodeRequiredStateV2.js";
|
|
10
9
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
@@ -22,9 +21,7 @@ export type ResetPasswordStartResultStateV2 =
|
|
|
22
21
|
/**
|
|
23
22
|
* Result of starting a native auth V2 reset-password operation. It is returned
|
|
24
23
|
* by `resetPasswordV2` and wraps one of {@link ResetPasswordStartResultStateV2}
|
|
25
|
-
* plus, on failure,
|
|
24
|
+
* plus, on failure, the unified V2 flow error.
|
|
26
25
|
*/
|
|
27
|
-
export type ResetPasswordStartResultV2 =
|
|
28
|
-
ResetPasswordStartResultStateV2
|
|
29
|
-
ResetPasswordStartErrorV2
|
|
30
|
-
>;
|
|
26
|
+
export type ResetPasswordStartResultV2 =
|
|
27
|
+
CustomAuthResultV2<ResetPasswordStartResultStateV2>;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
7
|
-
import type { VerifyChallengeErrorV2 } from "../error/VerifyChallengeErrorV2.js";
|
|
8
7
|
import type { NewPasswordRequiredStateV2 } from "../../../../reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.js";
|
|
9
8
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
10
9
|
import type { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
@@ -12,7 +11,7 @@ import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/Cu
|
|
|
12
11
|
import type { AttributesRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
|
|
13
12
|
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
14
13
|
import type { SignUpPasswordRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.js";
|
|
15
|
-
import type {
|
|
14
|
+
import type { AuthMethodSelectionRequiredStateV2 } from "../state/AuthMethodSelectionRequiredStateV2.js";
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* The states a verify-challenge action can resolve to. Verifying the one-time
|
|
@@ -24,17 +23,16 @@ export type VerifyChallengeResultStateV2 =
|
|
|
24
23
|
| SignUpPasswordRequiredStateV2
|
|
25
24
|
| AttributesRequiredStateV2
|
|
26
25
|
| SignInContinuationStateV2
|
|
27
|
-
|
|
|
26
|
+
| AuthMethodSelectionRequiredStateV2
|
|
28
27
|
| CompletedStateV2
|
|
29
28
|
| FailedStateV2;
|
|
30
29
|
|
|
31
30
|
/**
|
|
32
31
|
* Result of verifying a challenge. It wraps one of
|
|
33
|
-
* {@link VerifyChallengeResultStateV2} plus, on failure,
|
|
34
|
-
*
|
|
32
|
+
* {@link VerifyChallengeResultStateV2} plus, on failure, the unified V2 flow
|
|
33
|
+
* error.
|
|
35
34
|
*/
|
|
36
35
|
export type VerifyChallengeResultV2 = CustomAuthResultV2<
|
|
37
36
|
VerifyChallengeResultStateV2,
|
|
38
|
-
VerifyChallengeErrorV2,
|
|
39
37
|
CustomAuthAccountData | undefined
|
|
40
38
|
>;
|