@azure/msal-browser 5.21.0 → 5.23.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 +23 -3
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +5 -2
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +49 -0
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -0
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +27 -2
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +192 -2
- 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 +21 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +80 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs +102 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +12 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs +20 -0
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs +29 -0
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +76 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +134 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +23 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +22 -0
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs +61 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +87 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -0
- 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 +602 -0
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +67 -0
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +46 -0
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -0
- 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 +3 -2
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs.map +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 +30 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +193 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +236 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +26 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +66 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +97 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +56 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +23 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +14 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +3 -2
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +38 -0
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -0
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +20 -3
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +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 +23 -1
- 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/error_type/SubmitNewPasswordErrorV2.mjs +29 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs.map +1 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +59 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.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/error_type/SignInContinuationErrorV2.mjs +18 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs +37 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs +23 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +70 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +61 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.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/error_type/SignUpStartErrorV2.mjs +25 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs +33 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +40 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +25 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +47 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +60 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -0
- 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/index.mjs.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +8 -2
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +11 -8
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +189 -5
- 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/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/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 +38 -0
- package/dist/webBrokerBridge/PerfEventNames.mjs.map +1 -0
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +139 -0
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs.map +1 -0
- package/dist/webBrokerBridge/index.mjs +8 -0
- package/dist/webBrokerBridge/index.mjs.map +1 -0
- package/lib/custom-auth-path/log-strings-mapping.json +195 -11
- package/lib/custom-auth-path/msal-custom-auth.cjs +2996 -204
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +2996 -204
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +2 -2
- package/lib/msal-browser.cjs +176 -87
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +176 -87
- 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 +353 -0
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs.map +1 -0
- package/package.json +19 -2
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +40 -2
- package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +4 -1
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +118 -6
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +14 -1
- package/src/custom_auth/CustomAuthActionInputs.ts +11 -0
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +40 -4
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +44 -0
- package/src/custom_auth/controller/CustomAuthStandardController.ts +360 -1
- package/src/custom_auth/controller/ICustomAuthStandardController.ts +14 -0
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +20 -0
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +133 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.ts +146 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +8 -0
- package/src/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.ts +33 -0
- package/src/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.ts +25 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +25 -0
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +30 -0
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +40 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +100 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.ts +59 -0
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +53 -0
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +196 -0
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +16 -0
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +44 -0
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.ts +76 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +119 -0
- package/src/custom_auth/core/error/CustomAuthApiError.ts +3 -1
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +35 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +1145 -0
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +150 -0
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +66 -0
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +185 -0
- package/src/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +30 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +423 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +553 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.ts +24 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +81 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +177 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +129 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.ts +68 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +50 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.ts +20 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +202 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +111 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +26 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +44 -0
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +64 -0
- package/src/custom_auth/core/telemetry/PublicApiId.ts +18 -0
- package/src/custom_auth/index.ts +96 -0
- package/src/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.ts +25 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +33 -0
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +69 -0
- package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.ts +9 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.ts +13 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.ts +35 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.ts +19 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +31 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +32 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +22 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +96 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +83 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +12 -0
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.ts +21 -0
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.ts +32 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +28 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +20 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +48 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +34 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +63 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +24 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +112 -0
- package/src/index.ts +0 -2
- package/src/interaction_client/PlatformAuthInteractionClient.ts +23 -2
- package/src/interaction_client/RedirectClient.ts +15 -5
- package/src/packageMetadata.ts +1 -1
- package/src/webBrokerBridge/PerfEventNames.ts +43 -0
- package/src/webBrokerBridge/index.ts +28 -6
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.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/PlatformAuthRequest.d.ts +68 -5
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +12 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +7 -0
- 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 +27 -5
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +30 -0
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -0
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts +11 -2
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/controller/ICustomAuthStandardController.d.ts +7 -1
- package/types/custom_auth/controller/ICustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +53 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts +40 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +4 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts +7 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +15 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +21 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts +17 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +25 -0
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +28 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +10 -0
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +25 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts +3 -1
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +21 -0
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +35 -0
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +26 -0
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +43 -0
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +80 -0
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +17 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts +31 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +23 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts +19 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts +2 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +15 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +52 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts +3 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts +37 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts +12 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +133 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +70 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +10 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +33 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +4 -0
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +16 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +37 -0
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts +18 -0
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +22 -0
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +19 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts +3 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts +22 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts +12 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +21 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +17 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +17 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +24 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +4 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts +14 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts +20 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +15 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +8 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +15 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +11 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +19 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +14 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +10 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -0
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/webBrokerBridge/PerfEventNames.d.ts +30 -0
- package/types/webBrokerBridge/PerfEventNames.d.ts.map +1 -0
- package/types/webBrokerBridge/index.d.cts +1 -0
- package/types/webBrokerBridge/index.d.ts +3 -5
- package/types/webBrokerBridge/index.d.ts.map +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
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 { InvalidArgumentError } from "../../../error/InvalidArgumentError.js";
|
|
8
|
+
import { REDIRECT_TO_WEB } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
9
|
+
import {
|
|
10
|
+
INVALID_ONE_TIME_CODE,
|
|
11
|
+
INVALID_USERNAME_OR_PASSWORD,
|
|
12
|
+
PASSWORD_TOO_WEAK,
|
|
13
|
+
} from "./AuthFlowErrorSubcodesV2.js";
|
|
14
|
+
import { CustomAuthFlowScenarioV2 } from "../CustomAuthFlowScenarioV2.js";
|
|
15
|
+
import type { AttributeValidationDetailV2 } from "../../../network_client/custom_auth_api/v2/response/ErrorResponsesV2.js";
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Standalone V2 error base; intentionally does NOT extend the V1 AuthFlowErrorBase.
|
|
19
|
+
* Provides the detectors common to every V2 flow; each per-action subclass adds only
|
|
20
|
+
* the detectors relevant to its own action.
|
|
21
|
+
*/
|
|
22
|
+
export abstract class AuthFlowErrorBaseV2 {
|
|
23
|
+
readonly scenario: CustomAuthFlowScenarioV2;
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
public errorData: CustomAuthError,
|
|
27
|
+
scenario: CustomAuthFlowScenarioV2 = CustomAuthFlowScenarioV2.Unknown
|
|
28
|
+
) {
|
|
29
|
+
this.scenario = scenario;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
get correlationId(): string | undefined {
|
|
33
|
+
return this.errorData.correlationId;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get errorCodes(): number[] | undefined {
|
|
37
|
+
return this.errorData.errorCodes;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
get errorDescription(): string | undefined {
|
|
41
|
+
return this.errorData.errorDescription;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Checks if the error requires the flow to continue in the browser. The
|
|
46
|
+
* server surfaces this as a `redirect_to_web` failure, so a browser hand-off
|
|
47
|
+
* always arrives as a `FailedStateV2` on which this detector returns true.
|
|
48
|
+
* @returns True if the browser is required, false otherwise.
|
|
49
|
+
*/
|
|
50
|
+
isBrowserRequired(): boolean {
|
|
51
|
+
return this.errorData.error === REDIRECT_TO_WEB;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Checks if the error is due to a caller-supplied argument failing
|
|
56
|
+
* client-side validation before the request was issued (for example an empty
|
|
57
|
+
* username, code, or password, or an unknown method id). Use it to prompt the
|
|
58
|
+
* user to correct the input rather than treating it as a server failure.
|
|
59
|
+
* @returns True if the input was invalid, false otherwise.
|
|
60
|
+
*/
|
|
61
|
+
isInvalidInput(): boolean {
|
|
62
|
+
return this.errorData instanceof InvalidArgumentError;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Checks whether an account already exists for the supplied identifier.
|
|
67
|
+
* This can occur at different stages while completing sign-up.
|
|
68
|
+
* @returns True if the account already exists, otherwise false.
|
|
69
|
+
*/
|
|
70
|
+
isUserAlreadyExists(): boolean {
|
|
71
|
+
return this.getAttributeValidationDetails().some(
|
|
72
|
+
(detail) => detail.code === "userAlreadyExists"
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*
|
|
77
|
+
* User-not-found arrives as AADSTS50034. The nested `/api` error carries no
|
|
78
|
+
* innerError and no error_codes array, so the AADSTS marker in the message is
|
|
79
|
+
* the only signal.
|
|
80
|
+
*/
|
|
81
|
+
// TODO: Use the service-provided suberror when it becomes available.
|
|
82
|
+
protected isUserNotFoundError(): boolean {
|
|
83
|
+
return (
|
|
84
|
+
this.errorData.error === "invalidRequest" &&
|
|
85
|
+
this.errorData.errorDescription?.includes("AADSTS50034") === true
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
protected isUserInvalidError(): boolean {
|
|
90
|
+
return (
|
|
91
|
+
this.errorData.error === "invalidRequest" &&
|
|
92
|
+
this.errorData.errorDescription?.includes("AADSTS90100") === true &&
|
|
93
|
+
this.errorData.errorDescription
|
|
94
|
+
.toLowerCase()
|
|
95
|
+
.includes("username parameter")
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// The verification endpoint uses this outer/inner code pair for an invalid one-time code.
|
|
100
|
+
protected isInvalidCodeError(): boolean {
|
|
101
|
+
return (
|
|
102
|
+
this.errorData.error === "invalidGrant" &&
|
|
103
|
+
this.errorData.subError === INVALID_ONE_TIME_CODE
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// New password rejected by policy: inner `passwordTooWeak` (AADSTS120002).
|
|
108
|
+
protected isInvalidPasswordError(): boolean {
|
|
109
|
+
return (
|
|
110
|
+
this.errorData.error === "invalidRequest" &&
|
|
111
|
+
this.errorData.subError === PASSWORD_TOO_WEAK
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
protected isPasswordPolicyViolationError(): boolean {
|
|
116
|
+
return this.getAttributeValidationDetails().some(
|
|
117
|
+
(detail) =>
|
|
118
|
+
detail.code === "passwordPolicyViolation" &&
|
|
119
|
+
detail.attributeIds?.some(
|
|
120
|
+
(attributeId) => attributeId.toLowerCase() === "password"
|
|
121
|
+
) === true
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
protected isPasswordIncorrectError(): boolean {
|
|
126
|
+
return (
|
|
127
|
+
this.errorData.error === "invalidGrant" &&
|
|
128
|
+
this.errorData.subError === INVALID_USERNAME_OR_PASSWORD
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
protected getAttributeValidationDetails(): AttributeValidationDetailV2[] {
|
|
133
|
+
const details = (
|
|
134
|
+
this.errorData as CustomAuthError & {
|
|
135
|
+
attributeValidationDetails?: unknown;
|
|
136
|
+
}
|
|
137
|
+
).attributeValidationDetails;
|
|
138
|
+
|
|
139
|
+
return Array.isArray(details)
|
|
140
|
+
? details.filter(
|
|
141
|
+
(detail): detail is AttributeValidationDetailV2 =>
|
|
142
|
+
typeof detail === "object" && detail !== null
|
|
143
|
+
)
|
|
144
|
+
: [];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const INVALID_ONE_TIME_CODE = "invalidOneTimeCode";
|
|
7
|
+
export const INVALID_USERNAME_OR_PASSWORD = "invalidUserNameOrPassword";
|
|
8
|
+
export const PASSWORD_TOO_WEAK = "passwordTooWeak";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowErrorBaseV2 } from "./AuthFlowErrorBaseV2.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Error raised when requesting (or resending) a challenge for a selected
|
|
10
|
+
* authentication method. It is a shared action error bound to the shared
|
|
11
|
+
* `RequestChallengeResultV2` and returned regardless of which entry flow reached
|
|
12
|
+
* it. It currently exposes no action-specific detectors — only the inherited
|
|
13
|
+
* `isBrowserRequired()`.
|
|
14
|
+
*/
|
|
15
|
+
export class RequestChallengeErrorV2 extends AuthFlowErrorBaseV2 {}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowErrorBaseV2 } from "./AuthFlowErrorBaseV2.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Error raised by the first call of the native auth V2 reset-password flow
|
|
10
|
+
* (`resetPasswordV2`). It surfaces only the detectors relevant to starting a
|
|
11
|
+
* password reset, so an app inspecting `result.error` sees a small, focused set.
|
|
12
|
+
* Any unrecognised failure carries no specific detector; inspect the error code
|
|
13
|
+
* (`unexpected_error` when the server gives none) and `errorDescription`.
|
|
14
|
+
*/
|
|
15
|
+
export class ResetPasswordStartErrorV2 extends AuthFlowErrorBaseV2 {
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the supplied username is empty or invalid.
|
|
18
|
+
* @returns True if the username is invalid, false otherwise.
|
|
19
|
+
*/
|
|
20
|
+
isInvalidUsername(): boolean {
|
|
21
|
+
return this.isUserInvalidError();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Checks if the error is due to the user not being found. Use it to tell the
|
|
26
|
+
* user no account matches the supplied username, rather than exposing a
|
|
27
|
+
* generic failure that hides the real cause.
|
|
28
|
+
* @returns True if the user was not found, false otherwise.
|
|
29
|
+
*/
|
|
30
|
+
isUserNotFound(): boolean {
|
|
31
|
+
return this.isUserNotFoundError();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowErrorBaseV2 } from "./AuthFlowErrorBaseV2.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Error raised when verifying a challenge (submitting a one-time code). It
|
|
10
|
+
* exposes the detectors relevant to code verification so the app can respond to
|
|
11
|
+
* a rejected code specifically. Unrecognised failures carry no specific
|
|
12
|
+
* detector; inspect the error code (`unexpected_error` when the server gives
|
|
13
|
+
* none) and `errorDescription`.
|
|
14
|
+
*/
|
|
15
|
+
export class VerifyChallengeErrorV2 extends AuthFlowErrorBaseV2 {
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the error is due to the provided code being invalid or expired.
|
|
18
|
+
* Use it to prompt the user to re-enter the code or request a new one, rather
|
|
19
|
+
* than restarting the whole flow.
|
|
20
|
+
* @returns True if the code is invalid, false otherwise.
|
|
21
|
+
*/
|
|
22
|
+
isInvalidCode(): boolean {
|
|
23
|
+
return this.isInvalidCodeError();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { RequestChallengeErrorV2 } from "../error/RequestChallengeErrorV2.js";
|
|
8
|
+
import type { MFAVerificationRequiredStateV2 } from "../state/MFAVerificationRequiredStateV2.js";
|
|
9
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
10
|
+
|
|
11
|
+
export type MFARequestChallengeResultStateV2 =
|
|
12
|
+
| MFAVerificationRequiredStateV2
|
|
13
|
+
| FailedStateV2;
|
|
14
|
+
|
|
15
|
+
export type MFARequestChallengeResultV2 = CustomAuthResultV2<
|
|
16
|
+
MFARequestChallengeResultStateV2,
|
|
17
|
+
RequestChallengeErrorV2
|
|
18
|
+
>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { RequestChallengeErrorV2 } from "../error/RequestChallengeErrorV2.js";
|
|
8
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
9
|
+
import type { MFAVerificationRequiredStateV2 } from "../state/MFAVerificationRequiredStateV2.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* States returned after an app requests a replacement MFA challenge. The
|
|
13
|
+
* operation either returns refreshed verification metadata or a failed state.
|
|
14
|
+
*/
|
|
15
|
+
export type MFAResendChallengeResultStateV2 =
|
|
16
|
+
| MFAVerificationRequiredStateV2
|
|
17
|
+
| FailedStateV2;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Result returned after an app requests a replacement MFA challenge. Inspect
|
|
21
|
+
* the state before prompting the user for the new email or SMS challenge.
|
|
22
|
+
*/
|
|
23
|
+
export type MFAResendChallengeResultV2 = CustomAuthResultV2<
|
|
24
|
+
MFAResendChallengeResultStateV2,
|
|
25
|
+
RequestChallengeErrorV2
|
|
26
|
+
>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { VerifyChallengeErrorV2 } from "../error/VerifyChallengeErrorV2.js";
|
|
8
|
+
import type { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
9
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
10
|
+
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* States returned after an app submits an MFA challenge. The operation either
|
|
14
|
+
* completes sign-in or returns a failed state with error details.
|
|
15
|
+
*/
|
|
16
|
+
export type MFASubmitChallengeResultStateV2 = CompletedStateV2 | FailedStateV2;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Result returned after an app submits an MFA challenge. Inspect the state to
|
|
20
|
+
* determine whether sign-in completed or challenge verification failed.
|
|
21
|
+
*/
|
|
22
|
+
export type MFASubmitChallengeResultV2 = CustomAuthResultV2<
|
|
23
|
+
MFASubmitChallengeResultStateV2,
|
|
24
|
+
VerifyChallengeErrorV2,
|
|
25
|
+
CustomAuthAccountData
|
|
26
|
+
>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { RequestChallengeErrorV2 } from "../error/RequestChallengeErrorV2.js";
|
|
8
|
+
import type { CodeRequiredStateV2 } from "../state/CodeRequiredStateV2.js";
|
|
9
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The states a password-reset request-challenge action can resolve to.
|
|
13
|
+
* Password reset supports email one-time-code verification only.
|
|
14
|
+
*/
|
|
15
|
+
export type RequestChallengeResultStateV2 = CodeRequiredStateV2 | FailedStateV2;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Result of requesting (or resending) a challenge. It wraps one of
|
|
19
|
+
* {@link RequestChallengeResultStateV2} plus, on failure, a
|
|
20
|
+
* {@link RequestChallengeErrorV2}.
|
|
21
|
+
*/
|
|
22
|
+
export type RequestChallengeResultV2 = CustomAuthResultV2<
|
|
23
|
+
RequestChallengeResultStateV2,
|
|
24
|
+
RequestChallengeErrorV2
|
|
25
|
+
>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { ResetPasswordStartErrorV2 } from "../error/ResetPasswordStartErrorV2.js";
|
|
8
|
+
import type { AuthMethodSelectionRequiredStateV2 } from "../state/AuthMethodSelectionRequiredStateV2.js";
|
|
9
|
+
import type { CodeRequiredStateV2 } from "../state/CodeRequiredStateV2.js";
|
|
10
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The states a reset-password (V2) entry operation can resolve to. On success
|
|
14
|
+
* a sole method is challenged automatically; multiple methods require
|
|
15
|
+
* selection. `FailedStateV2` carries a terminal error.
|
|
16
|
+
*/
|
|
17
|
+
export type ResetPasswordStartResultStateV2 =
|
|
18
|
+
| AuthMethodSelectionRequiredStateV2
|
|
19
|
+
| CodeRequiredStateV2
|
|
20
|
+
| FailedStateV2;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Result of starting a native auth V2 reset-password operation. It is returned
|
|
24
|
+
* by `resetPasswordV2` and wraps one of {@link ResetPasswordStartResultStateV2}
|
|
25
|
+
* plus, on failure, a {@link ResetPasswordStartErrorV2}.
|
|
26
|
+
*/
|
|
27
|
+
export type ResetPasswordStartResultV2 = CustomAuthResultV2<
|
|
28
|
+
ResetPasswordStartResultStateV2,
|
|
29
|
+
ResetPasswordStartErrorV2
|
|
30
|
+
>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { VerifyChallengeErrorV2 } from "../error/VerifyChallengeErrorV2.js";
|
|
8
|
+
import type { NewPasswordRequiredStateV2 } from "../../../../reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.js";
|
|
9
|
+
import type { FailedStateV2 } from "../state/FailedStateV2.js";
|
|
10
|
+
import type { CompletedStateV2 } from "../state/CompletedStateV2.js";
|
|
11
|
+
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
12
|
+
import type { AttributesRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
|
|
13
|
+
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
14
|
+
import type { SignUpPasswordRequiredStateV2 } from "../../../../sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.js";
|
|
15
|
+
import type { MFARequiredStateV2 } from "../state/MFARequiredStateV2.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The states a verify-challenge action can resolve to. Verifying the one-time
|
|
19
|
+
* code advances password reset to `NewPasswordRequiredStateV2` or completes
|
|
20
|
+
* MFA sign-in. Failures resolve to `FailedStateV2`.
|
|
21
|
+
*/
|
|
22
|
+
export type VerifyChallengeResultStateV2 =
|
|
23
|
+
| NewPasswordRequiredStateV2
|
|
24
|
+
| SignUpPasswordRequiredStateV2
|
|
25
|
+
| AttributesRequiredStateV2
|
|
26
|
+
| SignInContinuationStateV2
|
|
27
|
+
| MFARequiredStateV2
|
|
28
|
+
| CompletedStateV2
|
|
29
|
+
| FailedStateV2;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Result of verifying a challenge. It wraps one of
|
|
33
|
+
* {@link VerifyChallengeResultStateV2} plus, on failure, a
|
|
34
|
+
* {@link VerifyChallengeErrorV2}.
|
|
35
|
+
*/
|
|
36
|
+
export type VerifyChallengeResultV2 = CustomAuthResultV2<
|
|
37
|
+
VerifyChallengeResultStateV2,
|
|
38
|
+
VerifyChallengeErrorV2,
|
|
39
|
+
CustomAuthAccountData | undefined
|
|
40
|
+
>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthenticationMethodV2 } from "../AuthenticationMethodV2.js";
|
|
7
|
+
import { CustomAuthResultV2 } from "../CustomAuthResultV2.js";
|
|
8
|
+
import { RequestChallengeErrorV2 } from "../error/RequestChallengeErrorV2.js";
|
|
9
|
+
import { CodeRequiredStateV2 } from "./CodeRequiredStateV2.js";
|
|
10
|
+
import type { AuthMethodSelectionRequiredStateParametersV2 } from "./CustomAuthStateParametersV2.js";
|
|
11
|
+
import type { RequestChallengeResultV2 } from "../result/RequestChallengeResultV2.js";
|
|
12
|
+
import { FLOW_CODE_REQUIRED_V2 } from "../../../interaction_client/v2/result/FlowActionResultV2.js";
|
|
13
|
+
import { AuthenticationMethodSelectionStateBaseV2 } from "./AuthenticationMethodSelectionStateBaseV2.js";
|
|
14
|
+
import { AuthenticationMethodTypeV2 } from "../../../network_client/custom_auth_api/v2/ApiClientConstantsV2.js";
|
|
15
|
+
import { CustomAuthError } from "../../../error/CustomAuthError.js";
|
|
16
|
+
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* State returned when the user must select one of several authentication
|
|
20
|
+
* methods before a challenge can be issued. It exposes the list of offered
|
|
21
|
+
* methods and lets the app request a challenge for the chosen one. The flow
|
|
22
|
+
* stays on this state until a challenge is successfully requested.
|
|
23
|
+
*/
|
|
24
|
+
export class AuthMethodSelectionRequiredStateV2 extends AuthenticationMethodSelectionStateBaseV2<AuthMethodSelectionRequiredStateParametersV2> {
|
|
25
|
+
readonly stateType = "authMethodSelectionRequired";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Requests a challenge for the selected authentication method. The returned
|
|
29
|
+
* state identifies the credential the application must collect.
|
|
30
|
+
* @param method - The method to challenge, from {@link methods}.
|
|
31
|
+
* @returns The result of requesting the challenge.
|
|
32
|
+
*/
|
|
33
|
+
async requestChallenge(
|
|
34
|
+
method: AuthenticationMethodV2
|
|
35
|
+
): Promise<RequestChallengeResultV2> {
|
|
36
|
+
const { correlationId, logger, continuationState, flowClient } =
|
|
37
|
+
this.stateParameters;
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
logger.verbose(
|
|
41
|
+
"Requesting challenge for the selected V2 method.",
|
|
42
|
+
correlationId
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const { result, selectedMethod } =
|
|
46
|
+
await this.requestSelectedMethodChallenge(method);
|
|
47
|
+
const resultType: string = result.type;
|
|
48
|
+
|
|
49
|
+
const commonStateParameters = {
|
|
50
|
+
correlationId: result.correlationId,
|
|
51
|
+
logger,
|
|
52
|
+
config: this.stateParameters.config,
|
|
53
|
+
flowClient,
|
|
54
|
+
continuationState: result.continuationState,
|
|
55
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
if (
|
|
59
|
+
result.type === FLOW_CODE_REQUIRED_V2 &&
|
|
60
|
+
(result.channel?.toLowerCase() ===
|
|
61
|
+
AuthenticationMethodTypeV2.EMAIL ||
|
|
62
|
+
result.channel?.toLowerCase() ===
|
|
63
|
+
AuthenticationMethodTypeV2.SMS)
|
|
64
|
+
) {
|
|
65
|
+
return new CustomAuthResultV2(
|
|
66
|
+
new CodeRequiredStateV2({
|
|
67
|
+
...commonStateParameters,
|
|
68
|
+
method: selectedMethod,
|
|
69
|
+
sentTo: result.sentTo,
|
|
70
|
+
channel: result.channel,
|
|
71
|
+
codeLength: result.codeLength,
|
|
72
|
+
}),
|
|
73
|
+
undefined,
|
|
74
|
+
result.continuationState.scenario
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
throw new CustomAuthError(
|
|
79
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
80
|
+
`Challenge type '${resultType}' with channel '${
|
|
81
|
+
result.type === FLOW_CODE_REQUIRED_V2
|
|
82
|
+
? result.channel
|
|
83
|
+
: AuthenticationMethodTypeV2.PASSWORD
|
|
84
|
+
}' is not supported for password reset.`,
|
|
85
|
+
correlationId
|
|
86
|
+
);
|
|
87
|
+
} catch (error) {
|
|
88
|
+
logger.errorPii(
|
|
89
|
+
`Failed to request V2 challenge. Error: '${error}'.`,
|
|
90
|
+
correlationId
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
94
|
+
errorType: RequestChallengeErrorV2,
|
|
95
|
+
scenario: continuationState.scenario,
|
|
96
|
+
correlationId,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowActionRequiredStateBase } from "../../AuthFlowState.js";
|
|
7
|
+
import { InvalidArgumentError } from "../../../error/InvalidArgumentError.js";
|
|
8
|
+
import { AuthenticationMethodV2 } from "../AuthenticationMethodV2.js";
|
|
9
|
+
import type { CustomAuthActionRequiredStateParametersV2 } from "./CustomAuthStateParametersV2.js";
|
|
10
|
+
import type {
|
|
11
|
+
FlowCodeRequiredResultV2,
|
|
12
|
+
FlowPasswordRequiredResultV2,
|
|
13
|
+
} from "../../../interaction_client/v2/result/FlowActionResultV2.js";
|
|
14
|
+
|
|
15
|
+
interface AuthenticationMethodSelectionStateParametersV2
|
|
16
|
+
extends CustomAuthActionRequiredStateParametersV2 {
|
|
17
|
+
methods: readonly AuthenticationMethodV2[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export abstract class AuthenticationMethodSelectionStateBaseV2<
|
|
21
|
+
TParameters extends AuthenticationMethodSelectionStateParametersV2
|
|
22
|
+
> extends AuthFlowActionRequiredStateBase<TParameters> {
|
|
23
|
+
readonly methods: readonly AuthenticationMethodV2[];
|
|
24
|
+
|
|
25
|
+
constructor(stateParameters: TParameters) {
|
|
26
|
+
super(stateParameters);
|
|
27
|
+
this.methods = stateParameters.methods;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
protected async requestSelectedMethodChallenge(
|
|
31
|
+
method: AuthenticationMethodV2
|
|
32
|
+
): Promise<{
|
|
33
|
+
result: FlowCodeRequiredResultV2 | FlowPasswordRequiredResultV2;
|
|
34
|
+
selectedMethod: AuthenticationMethodV2;
|
|
35
|
+
}> {
|
|
36
|
+
const { correlationId, continuationState, flowClient } =
|
|
37
|
+
this.stateParameters;
|
|
38
|
+
const selectedMethod = this.methods.find(
|
|
39
|
+
(candidate) => candidate.id === method.id
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
if (!selectedMethod) {
|
|
43
|
+
throw new InvalidArgumentError("method", correlationId);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const result = await flowClient.requestChallenge({
|
|
47
|
+
correlationId,
|
|
48
|
+
continuationState: {
|
|
49
|
+
...continuationState,
|
|
50
|
+
links: {
|
|
51
|
+
...continuationState.links,
|
|
52
|
+
challenge: selectedMethod.challengeHref,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return { result, selectedMethod };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowActionRequiredStateBase } from "../../AuthFlowState.js";
|
|
7
|
+
import type { AuthenticationMethodV2 } from "../AuthenticationMethodV2.js";
|
|
8
|
+
import type { CodeVerificationStateParametersV2 } from "./CustomAuthStateParametersV2.js";
|
|
9
|
+
import type {
|
|
10
|
+
FlowCodeRequiredResultV2,
|
|
11
|
+
FlowSubmitCodeResultV2,
|
|
12
|
+
} from "../../../interaction_client/v2/result/FlowActionResultV2.js";
|
|
13
|
+
|
|
14
|
+
export abstract class ChallengeVerificationStateBaseV2<
|
|
15
|
+
TParameters extends CodeVerificationStateParametersV2 = CodeVerificationStateParametersV2
|
|
16
|
+
> extends AuthFlowActionRequiredStateBase<TParameters> {
|
|
17
|
+
readonly method?: AuthenticationMethodV2;
|
|
18
|
+
|
|
19
|
+
readonly sentTo?: string;
|
|
20
|
+
|
|
21
|
+
readonly channel?: string;
|
|
22
|
+
|
|
23
|
+
readonly codeLength?: number;
|
|
24
|
+
|
|
25
|
+
constructor(stateParameters: TParameters) {
|
|
26
|
+
super(stateParameters);
|
|
27
|
+
this.method = stateParameters.method;
|
|
28
|
+
this.sentTo = stateParameters.sentTo;
|
|
29
|
+
this.channel = stateParameters.channel;
|
|
30
|
+
this.codeLength = stateParameters.codeLength;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
protected async submitCodeCore(
|
|
34
|
+
code: string
|
|
35
|
+
): Promise<FlowSubmitCodeResultV2> {
|
|
36
|
+
if (this.codeLength) {
|
|
37
|
+
this.ensureCodeIsValid(code, this.codeLength);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return this.stateParameters.flowClient.submitCode({
|
|
41
|
+
correlationId: this.stateParameters.correlationId,
|
|
42
|
+
continuationState: this.stateParameters.continuationState,
|
|
43
|
+
code,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
protected async resendCodeCore(): Promise<FlowCodeRequiredResultV2> {
|
|
48
|
+
return this.stateParameters.flowClient.resendCode({
|
|
49
|
+
correlationId: this.stateParameters.correlationId,
|
|
50
|
+
continuationState: this.stateParameters.continuationState,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|