@azure/msal-browser 5.27.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 +9 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +7 -6
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +4 -2
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +21 -7
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +14 -1
- package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +9 -2
- package/dist/cache/BrowserCacheManager.mjs.map +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 +65 -7
- package/dist/controllers/StandardController.mjs.map +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 +14 -1
- package/dist/crypto/TokenBindingKeyManager.mjs.map +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 -50
- 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 +68 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +44 -16
- 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 +100 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +5 -3
- 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 +27 -19
- 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 +20 -8
- 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 +465 -186
- 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 +18 -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 +10 -8
- 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 +147 -38
- 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 +21 -10
- 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 +2 -12
- 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 +2 -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 +15 -3
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +10 -3
- 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 +6 -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 +49 -14
- 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 +21 -21
- 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 +526 -90
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +27 -20
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +29 -14
- 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 +44 -32
- 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 +77 -25
- 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 +21 -13
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +35 -11
- package/dist/request/RequestHelpers.mjs.map +1 -1
- package/dist/request/SilentRequestHelpers.mjs +6 -6
- 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 +3 -2
- package/dist/telemetry/BrowserPerformanceEvents.mjs.map +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 +69 -17
- package/lib/custom-auth-path/msal-custom-auth.cjs +2394 -920
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +2394 -920
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +23 -11
- package/lib/msal-browser.cjs +943 -278
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +943 -278
- 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/broker/nativeBroker/PlatformAuthDOMHandler.ts +15 -0
- package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +6 -21
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +3 -1
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +12 -8
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +31 -0
- package/src/cache/AsyncMemoryStorage.ts +16 -0
- package/src/cache/BrowserCacheManager.ts +19 -1
- package/src/controllers/StandardController.ts +107 -11
- package/src/crypto/TokenBindingKeyManager.ts +21 -0
- 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 -92
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +14 -0
- 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 +23 -0
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +28 -0
- 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 +8 -8
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +94 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +68 -14
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +150 -0
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +8 -2
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +48 -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 +24 -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 +34 -9
- 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 +13 -12
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +771 -261
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +2 -6
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +27 -15
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +97 -26
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +9 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +330 -63
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +51 -15
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +25 -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 +48 -48
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +44 -37
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +32 -15
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +14 -10
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +24 -1
- package/src/custom_auth/core/telemetry/PublicApiId.ts +7 -0
- package/src/custom_auth/core/utils/ArgumentValidator.ts +26 -0
- package/src/custom_auth/index.ts +21 -11
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +8 -10
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +71 -16
- 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 -5
- 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 +18 -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 +33 -43
- package/src/interaction_client/PlatformAuthInteractionClient.ts +886 -148
- package/src/interaction_client/PopupClient.ts +104 -83
- package/src/interaction_client/RedirectClient.ts +88 -34
- package/src/interaction_client/SilentIframeClient.ts +121 -95
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +46 -18
- package/src/request/RequestHelpers.ts +64 -11
- package/src/request/SilentRequestHelpers.ts +8 -9
- package/src/telemetry/BrowserPerformanceEvents.ts +1 -0
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +6 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +21 -0
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/cache/AsyncMemoryStorage.d.ts +5 -0
- package/types/cache/AsyncMemoryStorage.d.ts.map +1 -1
- package/types/cache/BrowserCacheManager.d.ts +4 -0
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +5 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/crypto/TokenBindingKeyManager.d.ts +9 -0
- package/types/crypto/TokenBindingKeyManager.d.ts.map +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 +10 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -0
- 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 +14 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -0
- 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 +7 -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 +22 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -0
- 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 +28 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +3 -2
- 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 +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 +18 -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 +9 -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 +19 -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 +19 -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 +39 -4
- 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 +8 -0
- 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 +8 -2
- 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 +4 -3
- 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 +13 -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 +36 -9
- 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 +30 -17
- 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 -4
- 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 +8 -11
- 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 +2 -1
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +7 -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 +10 -5
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +7 -11
- 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 -5
- 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 +13 -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 +110 -8
- package/types/interaction_client/PlatformAuthInteractionClient.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/protocol/Authorize.d.ts +4 -4
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/RequestHelpers.d.ts +21 -3
- package/types/request/RequestHelpers.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +1 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +0 -70
- 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 -20
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +0 -97
- 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 -8
- 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
|
@@ -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";
|
|
@@ -8,24 +8,36 @@ import { CustomAuthApiError } from "../../../error/CustomAuthApiError.js";
|
|
|
8
8
|
import { InvalidArgumentError } from "../../../error/InvalidArgumentError.js";
|
|
9
9
|
import { WEB_REDIRECT_REQUIRED } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
10
10
|
import {
|
|
11
|
+
ATTRIBUTE_VALIDATION_ERROR,
|
|
11
12
|
INVALID_ONE_TIME_CODE,
|
|
12
13
|
INVALID_USERNAME_OR_PASSWORD,
|
|
14
|
+
PASSWORD_BANNED,
|
|
15
|
+
PASSWORD_IS_INVALID,
|
|
16
|
+
PASSWORD_RECENTLY_USED,
|
|
17
|
+
PASSWORD_TOO_LONG,
|
|
18
|
+
PASSWORD_TOO_SHORT,
|
|
13
19
|
PASSWORD_TOO_WEAK,
|
|
14
20
|
USER_NOT_FOUND,
|
|
15
21
|
} from "./AuthFlowErrorSubcodesV2.js";
|
|
16
22
|
import { CustomAuthFlowScenarioV2 } from "../CustomAuthFlowScenarioV2.js";
|
|
17
23
|
import type { AttributeValidationDetailV2 } from "../../../network_client/custom_auth_api/v2/response/ErrorResponsesV2.js";
|
|
18
24
|
|
|
25
|
+
export type AuthFlowErrorContextV2 =
|
|
26
|
+
| "default"
|
|
27
|
+
| "mfaVerification"
|
|
28
|
+
| "authMethodRegistration";
|
|
29
|
+
|
|
19
30
|
/**
|
|
20
|
-
* Error returned by a native authentication V2 operation.
|
|
21
|
-
*
|
|
31
|
+
* Error returned by a native authentication V2 operation.
|
|
32
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
22
33
|
*/
|
|
23
34
|
export class AuthFlowErrorV2 {
|
|
24
35
|
readonly scenario: CustomAuthFlowScenarioV2;
|
|
25
36
|
|
|
26
37
|
constructor(
|
|
27
38
|
public errorData: CustomAuthError,
|
|
28
|
-
scenario: CustomAuthFlowScenarioV2 = CustomAuthFlowScenarioV2.Unknown
|
|
39
|
+
scenario: CustomAuthFlowScenarioV2 = CustomAuthFlowScenarioV2.Unknown,
|
|
40
|
+
private readonly errorContext: AuthFlowErrorContextV2 = "default"
|
|
29
41
|
) {
|
|
30
42
|
this.scenario = scenario;
|
|
31
43
|
}
|
|
@@ -48,36 +60,27 @@ export class AuthFlowErrorV2 {
|
|
|
48
60
|
: undefined;
|
|
49
61
|
}
|
|
50
62
|
|
|
51
|
-
/**
|
|
52
|
-
* Gets the attribute ids that the service reports as required.
|
|
53
|
-
*/
|
|
54
63
|
get requiredAttributes(): readonly string[] {
|
|
55
64
|
return this.getAttributeIdsByCode("attributeRequired");
|
|
56
65
|
}
|
|
57
66
|
|
|
58
|
-
/**
|
|
59
|
-
* Gets the attribute ids whose submitted values failed validation.
|
|
60
|
-
*/
|
|
61
67
|
get invalidAttributes(): readonly string[] {
|
|
62
68
|
return this.getAttributeIdsByCode("attributeValidationFailed");
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
/**
|
|
66
|
-
* Checks
|
|
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.
|
|
72
|
+
* Checks whether the flow must continue in the browser.
|
|
70
73
|
* @returns True if the browser is required, false otherwise.
|
|
71
74
|
*/
|
|
72
75
|
isBrowserRequired(): boolean {
|
|
73
|
-
return
|
|
76
|
+
return (
|
|
77
|
+
this.errorData.error === "invalid_grant" &&
|
|
78
|
+
this.errorData.subError === WEB_REDIRECT_REQUIRED
|
|
79
|
+
);
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
/**
|
|
77
|
-
* Checks
|
|
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.
|
|
83
|
+
* Checks whether a caller-supplied argument failed client-side validation.
|
|
81
84
|
* @returns True if the input was invalid, false otherwise.
|
|
82
85
|
*/
|
|
83
86
|
isInvalidInput(): boolean {
|
|
@@ -85,17 +88,18 @@ export class AuthFlowErrorV2 {
|
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
/**
|
|
88
|
-
* Checks whether the
|
|
89
|
-
*
|
|
90
|
-
* @returns True when the username is invalid, otherwise false.
|
|
91
|
+
* Checks whether the supplied username failed local validation.
|
|
92
|
+
* @returns True when local username validation failed.
|
|
91
93
|
*/
|
|
92
94
|
isInvalidUsername(): boolean {
|
|
93
|
-
return
|
|
95
|
+
return (
|
|
96
|
+
this.errorData instanceof InvalidArgumentError &&
|
|
97
|
+
this.errorData.argName === "inputs.username"
|
|
98
|
+
);
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
/**
|
|
97
|
-
* Checks whether the supplied username does not identify an account.
|
|
98
|
-
* to distinguish a missing account from other request failures.
|
|
102
|
+
* Checks whether the supplied username does not identify an account.
|
|
99
103
|
* @returns True when the service reports that the user was not found.
|
|
100
104
|
*/
|
|
101
105
|
isUserNotFound(): boolean {
|
|
@@ -103,71 +107,73 @@ export class AuthFlowErrorV2 {
|
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
/**
|
|
106
|
-
* Checks whether the service rejected
|
|
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.
|
|
110
|
+
* Checks whether the service rejected a one-time code.
|
|
117
111
|
* @returns True when the one-time code is invalid, otherwise false.
|
|
118
112
|
*/
|
|
119
113
|
isInvalidCode(): boolean {
|
|
120
|
-
return this.isInvalidCodeError();
|
|
114
|
+
return this.errorContext === "default" && this.isInvalidCodeError();
|
|
121
115
|
}
|
|
122
116
|
|
|
123
117
|
/**
|
|
124
|
-
* Checks whether
|
|
125
|
-
*
|
|
126
|
-
* @returns True when the new password is invalid, otherwise false.
|
|
118
|
+
* Checks whether the service rejected an MFA or registration challenge.
|
|
119
|
+
* @returns True when the verification challenge is invalid.
|
|
127
120
|
*/
|
|
128
|
-
|
|
121
|
+
isInvalidChallenge(): boolean {
|
|
129
122
|
return (
|
|
130
|
-
this.
|
|
131
|
-
|
|
123
|
+
(this.errorContext === "mfaVerification" ||
|
|
124
|
+
this.errorContext === "authMethodRegistration") &&
|
|
125
|
+
this.isInvalidCodeError()
|
|
132
126
|
);
|
|
133
127
|
}
|
|
134
128
|
|
|
135
129
|
/**
|
|
136
|
-
* Checks whether
|
|
137
|
-
*
|
|
138
|
-
* @returns True
|
|
130
|
+
* Checks whether the service rejected non-password attributes.
|
|
131
|
+
* Password-targeted validation is reported only by isInvalidPassword().
|
|
132
|
+
* @returns True when at least one non-password attribute is invalid.
|
|
139
133
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
(
|
|
143
|
-
|
|
134
|
+
isInvalidAttributes(): boolean {
|
|
135
|
+
if (
|
|
136
|
+
!this.isAttributeValidationError() ||
|
|
137
|
+
this.isPasswordAttributeValidationError()
|
|
138
|
+
) {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const attributeIds = this.getAttributeValidationDetails()
|
|
143
|
+
.flatMap((detail) =>
|
|
144
|
+
Array.isArray(detail.attributeIds) ? detail.attributeIds : []
|
|
145
|
+
)
|
|
146
|
+
.filter(
|
|
147
|
+
(attributeId): attributeId is string =>
|
|
148
|
+
typeof attributeId === "string"
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
return attributeIds.some((attributeId) => attributeId.length > 0);
|
|
144
152
|
}
|
|
145
153
|
|
|
146
154
|
/**
|
|
147
|
-
* Checks whether the service
|
|
148
|
-
*
|
|
149
|
-
* @returns True when required attributes are missing, otherwise false.
|
|
155
|
+
* Checks whether the service rejected a supplied password.
|
|
156
|
+
* @returns True when the supplied password is invalid, otherwise false.
|
|
150
157
|
*/
|
|
151
|
-
|
|
152
|
-
return
|
|
158
|
+
isInvalidPassword(): boolean {
|
|
159
|
+
return (
|
|
160
|
+
this.isPasswordIncorrectError() ||
|
|
161
|
+
this.isInvalidPasswordError() ||
|
|
162
|
+
this.isPasswordAttributeValidationError()
|
|
163
|
+
);
|
|
153
164
|
}
|
|
154
165
|
|
|
155
|
-
private
|
|
166
|
+
private isAttributeValidationError(): boolean {
|
|
156
167
|
return (
|
|
157
168
|
this.errorData.error === "invalidRequest" &&
|
|
158
|
-
|
|
159
|
-
this.errorData.errorDescription?.includes("AADSTS50034") ===
|
|
160
|
-
true)
|
|
169
|
+
this.innerErrorCode === ATTRIBUTE_VALIDATION_ERROR
|
|
161
170
|
);
|
|
162
171
|
}
|
|
163
172
|
|
|
164
|
-
private
|
|
173
|
+
private isUserNotFoundError(): boolean {
|
|
165
174
|
return (
|
|
166
175
|
this.errorData.error === "invalidRequest" &&
|
|
167
|
-
this.
|
|
168
|
-
this.errorData.errorDescription
|
|
169
|
-
.toLowerCase()
|
|
170
|
-
.includes("username parameter")
|
|
176
|
+
this.innerErrorCode === USER_NOT_FOUND
|
|
171
177
|
);
|
|
172
178
|
}
|
|
173
179
|
|
|
@@ -179,24 +185,29 @@ export class AuthFlowErrorV2 {
|
|
|
179
185
|
}
|
|
180
186
|
|
|
181
187
|
private isInvalidPasswordError(): boolean {
|
|
188
|
+
const innerErrorCode = this.innerErrorCode;
|
|
189
|
+
|
|
182
190
|
return (
|
|
183
191
|
this.errorData.error === "invalidRequest" &&
|
|
184
|
-
|
|
192
|
+
(innerErrorCode === PASSWORD_TOO_WEAK ||
|
|
193
|
+
innerErrorCode === PASSWORD_TOO_SHORT ||
|
|
194
|
+
innerErrorCode === PASSWORD_TOO_LONG ||
|
|
195
|
+
innerErrorCode === PASSWORD_IS_INVALID ||
|
|
196
|
+
innerErrorCode === PASSWORD_RECENTLY_USED ||
|
|
197
|
+
innerErrorCode === PASSWORD_BANNED)
|
|
185
198
|
);
|
|
186
199
|
}
|
|
187
200
|
|
|
188
|
-
private
|
|
201
|
+
private isPasswordAttributeValidationError(): boolean {
|
|
202
|
+
if (!this.isAttributeValidationError()) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
|
|
189
206
|
return this.getAttributeValidationDetails().some((detail) => {
|
|
190
207
|
const attributeIds: unknown = detail.attributeIds;
|
|
191
208
|
|
|
192
209
|
return (
|
|
193
|
-
|
|
194
|
-
Array.isArray(attributeIds) &&
|
|
195
|
-
attributeIds.some(
|
|
196
|
-
(attributeId: unknown) =>
|
|
197
|
-
typeof attributeId === "string" &&
|
|
198
|
-
attributeId.toLowerCase() === "password"
|
|
199
|
-
)
|
|
210
|
+
Array.isArray(attributeIds) && attributeIds.includes("password")
|
|
200
211
|
);
|
|
201
212
|
});
|
|
202
213
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
8
|
+
import type { AuthMethodVerificationRequiredStateV2 } from "../state/AuthMethodVerificationRequiredStateV2.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* States returned after requesting an authentication-method registration challenge.
|
|
12
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
13
|
+
*/
|
|
14
|
+
export type AuthMethodRegistrationChallengeResultStateV2 =
|
|
15
|
+
| AuthMethodVerificationRequiredStateV2
|
|
16
|
+
| FailedStateV2;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Result of challenging a selected authentication method for registration.
|
|
20
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
21
|
+
*/
|
|
22
|
+
export type AuthMethodRegistrationChallengeResultV2 =
|
|
23
|
+
CustomAuthResultV2<AuthMethodRegistrationChallengeResultStateV2>;
|
package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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 { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
8
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
|
+
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
10
|
+
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* States returned after submitting an authentication-method verification challenge.
|
|
14
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
15
|
+
*/
|
|
16
|
+
export type AuthMethodVerificationSubmitChallengeResultStateV2 =
|
|
17
|
+
| SignInContinuationStateV2
|
|
18
|
+
| CompletedStateV2
|
|
19
|
+
| FailedStateV2;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Result of submitting an authentication-method verification challenge.
|
|
23
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
24
|
+
*/
|
|
25
|
+
export type AuthMethodVerificationSubmitChallengeResultV2 = CustomAuthResultV2<
|
|
26
|
+
AuthMethodVerificationSubmitChallengeResultStateV2,
|
|
27
|
+
CustomAuthAccountData | undefined
|
|
28
|
+
>;
|
|
@@ -7,18 +7,22 @@ import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
|
7
7
|
import type { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
8
8
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
9
|
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
10
|
+
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
|
-
* States returned after
|
|
13
|
-
*
|
|
13
|
+
* States returned after submitting an MFA challenge.
|
|
14
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14
15
|
*/
|
|
15
|
-
export type MFASubmitChallengeResultStateV2 =
|
|
16
|
+
export type MFASubmitChallengeResultStateV2 =
|
|
17
|
+
| SignInContinuationStateV2
|
|
18
|
+
| CompletedStateV2
|
|
19
|
+
| FailedStateV2;
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
|
-
* Result
|
|
19
|
-
*
|
|
22
|
+
* Result of submitting an MFA challenge.
|
|
23
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
20
24
|
*/
|
|
21
25
|
export type MFASubmitChallengeResultV2 = CustomAuthResultV2<
|
|
22
26
|
MFASubmitChallengeResultStateV2,
|
|
23
|
-
CustomAuthAccountData
|
|
27
|
+
CustomAuthAccountData | undefined
|
|
24
28
|
>;
|
|
@@ -7,22 +7,25 @@ import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
|
7
7
|
import type { CodeRequiredStateV2 } from "../state/CodeRequiredStateV2.js";
|
|
8
8
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
9
|
import type { MFAVerificationRequiredStateV2 } from "../state/MFAVerificationRequiredStateV2.js";
|
|
10
|
-
import type { PasswordRequiredStateV2 } from "
|
|
10
|
+
import type { PasswordRequiredStateV2 } from "../state/PasswordRequiredStateV2.js";
|
|
11
|
+
import type { ExistingAccountCodeRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.js";
|
|
12
|
+
import type { ExistingAccountPasswordRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.js";
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
+
* States returned after requesting an authentication challenge.
|
|
16
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
15
17
|
*/
|
|
16
18
|
export type RequestChallengeResultStateV2 =
|
|
17
19
|
| CodeRequiredStateV2
|
|
18
20
|
| MFAVerificationRequiredStateV2
|
|
19
21
|
| PasswordRequiredStateV2
|
|
22
|
+
| ExistingAccountCodeRequiredStateV2
|
|
23
|
+
| ExistingAccountPasswordRequiredStateV2
|
|
20
24
|
| FailedStateV2;
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
|
-
* Result of requesting
|
|
24
|
-
*
|
|
25
|
-
* error.
|
|
27
|
+
* Result of requesting an authentication challenge.
|
|
28
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
26
29
|
*/
|
|
27
30
|
export type RequestChallengeResultV2 =
|
|
28
31
|
CustomAuthResultV2<RequestChallengeResultStateV2>;
|
|
@@ -9,9 +9,8 @@ import type { CodeRequiredStateV2 } from "../state/CodeRequiredStateV2.js";
|
|
|
9
9
|
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* selection. `FailedStateV2` carries a terminal error.
|
|
12
|
+
* States returned when native auth V2 password reset starts.
|
|
13
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
15
14
|
*/
|
|
16
15
|
export type ResetPasswordStartResultStateV2 =
|
|
17
16
|
| AuthMethodSelectionRequiredStateV2
|
|
@@ -19,9 +18,8 @@ export type ResetPasswordStartResultStateV2 =
|
|
|
19
18
|
| FailedStateV2;
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
|
-
* Result of starting
|
|
23
|
-
*
|
|
24
|
-
* plus, on failure, the unified V2 flow error.
|
|
21
|
+
* Result of starting native auth V2 password reset.
|
|
22
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
25
23
|
*/
|
|
26
24
|
export type ResetPasswordStartResultV2 =
|
|
27
25
|
CustomAuthResultV2<ResetPasswordStartResultStateV2>;
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
8
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
|
+
import type { PasswordRequiredStateV2 } from "../state/PasswordRequiredStateV2.js";
|
|
10
|
+
import type { AttributesRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
|
|
11
|
+
import type { AuthMethodSelectionRequiredStateV2 } from "../state/AuthMethodSelectionRequiredStateV2.js";
|
|
12
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../state/AuthMethodRegistrationRequiredStateV2.js";
|
|
13
|
+
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
14
|
+
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* States returned after submitting a sign-in or sign-up password.
|
|
18
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
19
|
+
*/
|
|
20
|
+
export type SubmitPasswordResultStateV2 =
|
|
21
|
+
| CompletedStateV2
|
|
22
|
+
| PasswordRequiredStateV2
|
|
23
|
+
| AttributesRequiredStateV2
|
|
24
|
+
| SignInContinuationStateV2
|
|
25
|
+
| AuthMethodSelectionRequiredStateV2
|
|
26
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
27
|
+
| FailedStateV2;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Result of submitting a password in the active flow.
|
|
31
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
32
|
+
*/
|
|
33
|
+
export type SubmitPasswordResultV2 = CustomAuthResultV2<
|
|
34
|
+
SubmitPasswordResultStateV2,
|
|
35
|
+
CustomAuthAccountData | undefined
|
|
36
|
+
>;
|
|
@@ -10,27 +10,27 @@ import type { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
|
10
10
|
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
11
11
|
import type { AttributesRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
|
|
12
12
|
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
13
|
-
import type {
|
|
13
|
+
import type { PasswordRequiredStateV2 } from "../state/PasswordRequiredStateV2.js";
|
|
14
14
|
import type { AuthMethodSelectionRequiredStateV2 } from "../state/AuthMethodSelectionRequiredStateV2.js";
|
|
15
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../state/AuthMethodRegistrationRequiredStateV2.js";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* MFA sign-in. Failures resolve to `FailedStateV2`.
|
|
18
|
+
* States returned after verifying an authentication challenge.
|
|
19
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
20
20
|
*/
|
|
21
21
|
export type VerifyChallengeResultStateV2 =
|
|
22
22
|
| NewPasswordRequiredStateV2
|
|
23
|
-
|
|
|
23
|
+
| PasswordRequiredStateV2
|
|
24
24
|
| AttributesRequiredStateV2
|
|
25
25
|
| SignInContinuationStateV2
|
|
26
26
|
| AuthMethodSelectionRequiredStateV2
|
|
27
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
27
28
|
| CompletedStateV2
|
|
28
29
|
| FailedStateV2;
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
|
-
* Result of verifying
|
|
32
|
-
*
|
|
33
|
-
* error.
|
|
32
|
+
* Result of verifying an authentication challenge.
|
|
33
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
34
34
|
*/
|
|
35
35
|
export type VerifyChallengeResultV2 = CustomAuthResultV2<
|
|
36
36
|
VerifyChallengeResultStateV2,
|