@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
package/src/custom_auth/index.ts
CHANGED
|
@@ -258,6 +258,7 @@ export { CustomAuthFlowScenarioV2 } from "./core/auth_flow/v2/CustomAuthFlowScen
|
|
|
258
258
|
|
|
259
259
|
// Native Auth V2 Authentication Method
|
|
260
260
|
export { AuthenticationMethodV2 } from "./core/auth_flow/v2/AuthenticationMethodV2.js";
|
|
261
|
+
export type { AuthenticationMethodRegistrationV2 } from "./core/auth_flow/v2/AuthenticationMethodRegistrationV2.js";
|
|
261
262
|
|
|
262
263
|
// Native Auth V2 Errors
|
|
263
264
|
export { AuthFlowErrorV2 } from "./core/auth_flow/v2/error/AuthFlowErrorV2.js";
|
|
@@ -269,10 +270,13 @@ export { NewPasswordRequiredStateV2 } from "./reset_password/auth_flow/v2/state/
|
|
|
269
270
|
export { CodeRequiredStateV2 } from "./core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
270
271
|
export { MFAVerificationRequiredStateV2 } from "./core/auth_flow/v2/state/MFAVerificationRequiredStateV2.js";
|
|
271
272
|
export { AuthMethodSelectionRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
272
|
-
export {
|
|
273
|
+
export { AuthMethodRegistrationRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
274
|
+
export { AuthMethodVerificationRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.js";
|
|
275
|
+
export { PasswordRequiredStateV2 } from "./core/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
273
276
|
export { SignInContinuationStateV2 } from "./sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
274
277
|
export { AttributesRequiredStateV2 } from "./sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
|
|
275
|
-
export {
|
|
278
|
+
export { ExistingAccountCodeRequiredStateV2 } from "./sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.js";
|
|
279
|
+
export { ExistingAccountPasswordRequiredStateV2 } from "./sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.js";
|
|
276
280
|
|
|
277
281
|
// Native Auth V2 Results
|
|
278
282
|
export {
|
|
@@ -291,18 +295,18 @@ export {
|
|
|
291
295
|
RequestChallengeResultV2,
|
|
292
296
|
RequestChallengeResultStateV2,
|
|
293
297
|
} from "./core/auth_flow/v2/result/RequestChallengeResultV2.js";
|
|
294
|
-
export {
|
|
295
|
-
ResendCodeResultV2,
|
|
296
|
-
ResendCodeResultStateV2,
|
|
297
|
-
} from "./core/auth_flow/v2/result/ResendCodeResultV2.js";
|
|
298
298
|
export {
|
|
299
299
|
MFASubmitChallengeResultV2,
|
|
300
300
|
MFASubmitChallengeResultStateV2,
|
|
301
301
|
} from "./core/auth_flow/v2/result/MFASubmitChallengeResultV2.js";
|
|
302
|
-
export {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
} from "./core/auth_flow/v2/result/
|
|
302
|
+
export type {
|
|
303
|
+
AuthMethodRegistrationChallengeResultV2,
|
|
304
|
+
AuthMethodRegistrationChallengeResultStateV2,
|
|
305
|
+
} from "./core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.js";
|
|
306
|
+
export type {
|
|
307
|
+
AuthMethodVerificationSubmitChallengeResultV2,
|
|
308
|
+
AuthMethodVerificationSubmitChallengeResultStateV2,
|
|
309
|
+
} from "./core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.js";
|
|
306
310
|
export {
|
|
307
311
|
VerifyChallengeResultV2,
|
|
308
312
|
VerifyChallengeResultStateV2,
|
|
@@ -318,11 +322,17 @@ export {
|
|
|
318
322
|
export {
|
|
319
323
|
SubmitPasswordResultV2,
|
|
320
324
|
SubmitPasswordResultStateV2,
|
|
321
|
-
} from "./
|
|
325
|
+
} from "./core/auth_flow/v2/result/SubmitPasswordResultV2.js";
|
|
322
326
|
export {
|
|
323
327
|
SubmitAttributesResultV2,
|
|
324
328
|
SubmitAttributesResultStateV2,
|
|
325
329
|
} from "./sign_up/auth_flow/v2/result/SubmitAttributesResultV2.js";
|
|
330
|
+
export type {
|
|
331
|
+
ExistingAccountSubmitCodeResultV2,
|
|
332
|
+
ExistingAccountSubmitCodeResultStateV2,
|
|
333
|
+
ExistingAccountSubmitPasswordResultV2,
|
|
334
|
+
ExistingAccountSubmitPasswordResultStateV2,
|
|
335
|
+
} from "./sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.js";
|
|
326
336
|
|
|
327
337
|
// Components from msal_browser
|
|
328
338
|
export { LogLevel } from "@azure/msal-common/browser";
|
|
@@ -5,25 +5,23 @@
|
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
7
|
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
8
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
8
9
|
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
10
|
+
import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* automatically, so on success it surfaces `SignInContinuationStateV2`
|
|
14
|
-
* (carrying the reset continuation) rather than the terminal `CompletedStateV2`.
|
|
15
|
-
* The app then calls its `signIn` to obtain tokens.
|
|
13
|
+
* States returned after submitting a new password.
|
|
14
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
16
15
|
*/
|
|
17
16
|
export type SubmitNewPasswordResultStateV2 =
|
|
18
17
|
| SignInContinuationStateV2
|
|
18
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
19
|
+
| AuthMethodSelectionRequiredStateV2
|
|
19
20
|
| FailedStateV2;
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
|
-
* Result of submitting a new password.
|
|
23
|
-
*
|
|
24
|
-
* failure. Submitting completes the reset but does not sign the user in, so a
|
|
25
|
-
* successful result reaches `SignInContinuationStateV2` and carries no account
|
|
26
|
-
* data; the account is surfaced by the subsequent sign-in.
|
|
23
|
+
* Result of submitting a new password.
|
|
24
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
27
25
|
*/
|
|
28
26
|
export type SubmitNewPasswordResultV2 =
|
|
29
27
|
CustomAuthResultV2<SubmitNewPasswordResultStateV2>;
|
|
@@ -5,21 +5,33 @@
|
|
|
5
5
|
|
|
6
6
|
import { AuthFlowActionRequiredStateBase } from "../../../../core/auth_flow/AuthFlowState.js";
|
|
7
7
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
8
|
+
import { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
9
|
+
import { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
10
|
+
import { AuthenticationFactorV2 } from "../../../../core/network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
11
|
+
import {
|
|
12
|
+
FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
|
|
13
|
+
FLOW_MFA_REQUIRED_V2,
|
|
14
|
+
FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2,
|
|
15
|
+
} from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
16
|
+
import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
|
|
17
|
+
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../../core/network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
8
18
|
import { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
9
19
|
import type { NewPasswordRequiredStateParametersV2 } from "./ResetPasswordStateParametersV2.js";
|
|
10
20
|
import type { SubmitNewPasswordResultV2 } from "../result/SubmitNewPasswordResultV2.js";
|
|
11
21
|
|
|
12
22
|
/**
|
|
13
|
-
* State returned when the user must supply a new password
|
|
14
|
-
*
|
|
15
|
-
*
|
|
23
|
+
* State returned when the user must supply a new password. Submission can
|
|
24
|
+
* require method registration or MFA, and the flow is not complete until any
|
|
25
|
+
* subsequent required actions finish.
|
|
26
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
16
27
|
*/
|
|
17
28
|
export class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<NewPasswordRequiredStateParametersV2> {
|
|
18
29
|
readonly stateType = "newPasswordRequired";
|
|
19
30
|
|
|
20
31
|
/**
|
|
21
|
-
* Submits the new password
|
|
22
|
-
*
|
|
32
|
+
* Submits the new password. The result can require method registration or
|
|
33
|
+
* MFA, and completion is not final until any subsequent required actions
|
|
34
|
+
* finish.
|
|
23
35
|
* @param password - The new password to set.
|
|
24
36
|
* @returns The result of submitting the new password.
|
|
25
37
|
*/
|
|
@@ -39,18 +51,61 @@ export class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<
|
|
|
39
51
|
continuationState,
|
|
40
52
|
newPassword: password,
|
|
41
53
|
});
|
|
54
|
+
const resultType: string = result.type;
|
|
42
55
|
|
|
43
|
-
|
|
44
|
-
new
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
if (result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2) {
|
|
57
|
+
return new CustomAuthResultV2(
|
|
58
|
+
new AuthMethodRegistrationRequiredStateV2({
|
|
59
|
+
correlationId: result.correlationId,
|
|
60
|
+
logger,
|
|
61
|
+
config: this.stateParameters.config,
|
|
62
|
+
flowClient,
|
|
63
|
+
continuationState: result.continuationState,
|
|
64
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
65
|
+
methods: result.methods,
|
|
66
|
+
}),
|
|
67
|
+
undefined,
|
|
68
|
+
result.continuationState.scenario
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
73
|
+
return new CustomAuthResultV2(
|
|
74
|
+
new AuthMethodSelectionRequiredStateV2({
|
|
75
|
+
correlationId: result.correlationId,
|
|
76
|
+
logger,
|
|
77
|
+
config: this.stateParameters.config,
|
|
78
|
+
flowClient,
|
|
79
|
+
continuationState: result.continuationState,
|
|
80
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
81
|
+
methods: result.methods,
|
|
82
|
+
authenticationFactor:
|
|
83
|
+
AuthenticationFactorV2.MULTI_FACTOR,
|
|
84
|
+
}),
|
|
85
|
+
undefined,
|
|
86
|
+
result.continuationState.scenario
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
91
|
+
return new CustomAuthResultV2(
|
|
92
|
+
new SignInContinuationStateV2({
|
|
93
|
+
correlationId: result.correlationId,
|
|
94
|
+
logger,
|
|
95
|
+
config: this.stateParameters.config,
|
|
96
|
+
flowClient,
|
|
97
|
+
continuationState: result.continuationState,
|
|
98
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
99
|
+
}),
|
|
100
|
+
undefined,
|
|
101
|
+
result.continuationState.scenario
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
throw new CustomAuthError(
|
|
106
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
107
|
+
`Password submission result type '${resultType}' is not supported.`,
|
|
108
|
+
correlationId
|
|
54
109
|
);
|
|
55
110
|
} catch (error) {
|
|
56
111
|
logger.errorPii(
|
package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.ts
ADDED
|
@@ -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 "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
|
+
import type { VerifyChallengeResultV2 } from "../../../../core/auth_flow/v2/result/VerifyChallengeResultV2.js";
|
|
8
|
+
import type { CustomAuthActionRequiredStateParametersV2 } from "../../../../core/auth_flow/v2/state/CustomAuthStateParametersV2.js";
|
|
9
|
+
import type { FlowNewPasswordRequiredResultV2 } from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
10
|
+
import { NewPasswordRequiredStateV2 } from "./NewPasswordRequiredStateV2.js";
|
|
11
|
+
|
|
12
|
+
export class ResetPasswordStateTransitionHandlerV2 {
|
|
13
|
+
handleNewPasswordRequired(
|
|
14
|
+
result: FlowNewPasswordRequiredResultV2,
|
|
15
|
+
stateParameters: CustomAuthActionRequiredStateParametersV2
|
|
16
|
+
): VerifyChallengeResultV2 {
|
|
17
|
+
return new CustomAuthResultV2(
|
|
18
|
+
new NewPasswordRequiredStateV2({
|
|
19
|
+
correlationId: result.correlationId,
|
|
20
|
+
logger: stateParameters.logger,
|
|
21
|
+
config: stateParameters.config,
|
|
22
|
+
flowClient: stateParameters.flowClient,
|
|
23
|
+
continuationState: result.continuationState,
|
|
24
|
+
cacheClient: stateParameters.cacheClient,
|
|
25
|
+
}),
|
|
26
|
+
undefined,
|
|
27
|
+
result.continuationState.scenario
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -9,18 +9,14 @@ import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedSt
|
|
|
9
9
|
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* `CompletedStateV2` carries `CustomAuthAccountData`. `CompletedStateV2` and the
|
|
15
|
-
* account payload are declared together because they always occur together.
|
|
12
|
+
* States returned when signing in from a V2 continuation.
|
|
13
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
16
14
|
*/
|
|
17
15
|
export type SignInContinuationResultStateV2 = CompletedStateV2 | FailedStateV2;
|
|
18
16
|
|
|
19
17
|
/**
|
|
20
|
-
* Result of signing the user in from a V2 continuation.
|
|
21
|
-
*
|
|
22
|
-
* failure and signed-in account data on success. This is the flow's completion
|
|
23
|
-
* point, so a successful result reaches `CompletedStateV2`.
|
|
18
|
+
* Result of signing the user in from a V2 continuation.
|
|
19
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
24
20
|
*/
|
|
25
21
|
export type SignInContinuationResultV2 = CustomAuthResultV2<
|
|
26
22
|
SignInContinuationResultStateV2,
|
|
@@ -5,26 +5,25 @@
|
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
7
|
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
8
|
-
import type {
|
|
9
|
-
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
10
|
-
import type { PasswordRequiredStateV2 } from "../state/PasswordRequiredStateV2.js";
|
|
8
|
+
import type { PasswordRequiredStateV2 } from "../../../../core/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
11
9
|
import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
12
10
|
import type { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* States returned when native auth V2 sign-in starts.
|
|
14
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
16
15
|
*/
|
|
17
16
|
export type SignInStartResultStateV2 =
|
|
18
17
|
| PasswordRequiredStateV2
|
|
19
18
|
| CodeRequiredStateV2
|
|
20
19
|
| AuthMethodSelectionRequiredStateV2
|
|
21
|
-
| CompletedStateV2
|
|
22
20
|
| FailedStateV2;
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
23
|
* Result of starting native auth V2 sign-in.
|
|
24
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
26
25
|
*/
|
|
27
26
|
export type SignInStartResultV2 = CustomAuthResultV2<
|
|
28
27
|
SignInStartResultStateV2,
|
|
29
|
-
|
|
28
|
+
undefined
|
|
30
29
|
>;
|
|
@@ -11,17 +11,14 @@ import type { SignInContinuationStateParametersV2 } from "./SignInStateParameter
|
|
|
11
11
|
import type { SignInContinuationResultV2 } from "../result/SignInContinuationResultV2.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* state without duplicating the token-acquisition behavior.
|
|
14
|
+
* State returned when a completed V2 flow can sign the user in.
|
|
15
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
17
16
|
*/
|
|
18
17
|
export class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase<SignInContinuationStateParametersV2> {
|
|
19
18
|
readonly stateType = "signInContinuation";
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
|
-
* Signs the user in
|
|
23
|
-
* flow. The result either reaches the completed state with the signed-in
|
|
24
|
-
* account data or reports why the follow-up sign-in could not complete.
|
|
21
|
+
* Signs the user in after completing the V2 flow.
|
|
25
22
|
* @returns The result of completing the continuation sign-in.
|
|
26
23
|
*/
|
|
27
24
|
async signIn(): Promise<SignInContinuationResultV2> {
|
|
@@ -7,6 +7,3 @@ import type { CustomAuthActionRequiredStateParametersV2 } from "../../../../core
|
|
|
7
7
|
|
|
8
8
|
export type SignInContinuationStateParametersV2 =
|
|
9
9
|
CustomAuthActionRequiredStateParametersV2;
|
|
10
|
-
|
|
11
|
-
export type PasswordRequiredStateParametersV2 =
|
|
12
|
-
CustomAuthActionRequiredStateParametersV2;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
|
-
import type { VerifyChallengeResultV2 } from "../../../../core/auth_flow/v2/result/VerifyChallengeResultV2.js";
|
|
8
7
|
import type {
|
|
9
8
|
CodeRequiredStateParametersV2,
|
|
10
9
|
CustomAuthActionRequiredStateParametersV2,
|
|
@@ -15,7 +14,7 @@ import type {
|
|
|
15
14
|
FlowPasswordRequiredResultV2,
|
|
16
15
|
} from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
17
16
|
import { AuthenticationFactorV2 } from "../../../../core/network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
18
|
-
import { PasswordRequiredStateV2 } from "
|
|
17
|
+
import { PasswordRequiredStateV2 } from "../../../../core/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
19
18
|
import type { RequestChallengeResultV2 } from "../../../../core/auth_flow/v2/result/RequestChallengeResultV2.js";
|
|
20
19
|
|
|
21
20
|
export class SignInStateTransitionHandlerV2 {
|
|
@@ -37,7 +36,7 @@ export class SignInStateTransitionHandlerV2 {
|
|
|
37
36
|
handleMfaRequired(
|
|
38
37
|
result: FlowMFARequiredResultV2,
|
|
39
38
|
stateParameters: CodeRequiredStateParametersV2
|
|
40
|
-
):
|
|
39
|
+
): CustomAuthResultV2<AuthMethodSelectionRequiredStateV2, undefined> {
|
|
41
40
|
return new CustomAuthResultV2(
|
|
42
41
|
new AuthMethodSelectionRequiredStateV2({
|
|
43
42
|
correlationId: result.correlationId,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
8
|
+
import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
9
|
+
import type { CompletedStateV2 } from "../../../../core/auth_flow/v2/state/CompletedStateV2.js";
|
|
10
|
+
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
11
|
+
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* States returned after submitting an existing-account code during sign-up.
|
|
15
|
+
* Authentication can complete or require enrollment or MFA method selection.
|
|
16
|
+
*/
|
|
17
|
+
export type ExistingAccountSubmitCodeResultStateV2 =
|
|
18
|
+
| AuthMethodSelectionRequiredStateV2
|
|
19
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
20
|
+
| CompletedStateV2
|
|
21
|
+
| FailedStateV2;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Result of submitting an existing-account code during sign-up. Account data
|
|
25
|
+
* is present when authentication completes successfully.
|
|
26
|
+
*/
|
|
27
|
+
export type ExistingAccountSubmitCodeResultV2 = CustomAuthResultV2<
|
|
28
|
+
ExistingAccountSubmitCodeResultStateV2,
|
|
29
|
+
CustomAuthAccountData | undefined
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* States returned after submitting an existing-account password during sign-up.
|
|
34
|
+
* Authentication can complete or require enrollment or MFA method selection.
|
|
35
|
+
*/
|
|
36
|
+
export type ExistingAccountSubmitPasswordResultStateV2 =
|
|
37
|
+
| AuthMethodSelectionRequiredStateV2
|
|
38
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
39
|
+
| CompletedStateV2
|
|
40
|
+
| FailedStateV2;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Result of submitting an existing-account password during sign-up. Account
|
|
44
|
+
* data is present when authentication completes successfully.
|
|
45
|
+
*/
|
|
46
|
+
export type ExistingAccountSubmitPasswordResultV2 = CustomAuthResultV2<
|
|
47
|
+
ExistingAccountSubmitPasswordResultStateV2,
|
|
48
|
+
CustomAuthAccountData | undefined
|
|
49
|
+
>;
|
|
@@ -6,19 +6,23 @@
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
7
|
import type { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
8
8
|
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
9
|
+
import type { ExistingAccountCodeRequiredStateV2 } from "../state/ExistingAccountCodeRequiredStateV2.js";
|
|
10
|
+
import type { ExistingAccountPasswordRequiredStateV2 } from "../state/ExistingAccountPasswordRequiredStateV2.js";
|
|
11
|
+
import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* States returned when native auth V2 sign-up starts.
|
|
15
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14
16
|
*/
|
|
15
17
|
export type SignUpStartResultStateV2 =
|
|
16
18
|
| CodeRequiredStateV2
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
+
| ExistingAccountCodeRequiredStateV2
|
|
20
|
+
| ExistingAccountPasswordRequiredStateV2
|
|
21
|
+
| AuthMethodSelectionRequiredStateV2
|
|
19
22
|
| FailedStateV2;
|
|
20
23
|
|
|
21
24
|
/**
|
|
22
25
|
* Result of starting native auth V2 sign-up.
|
|
26
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
23
27
|
*/
|
|
24
28
|
export type SignUpStartResultV2 = CustomAuthResultV2<SignUpStartResultStateV2>;
|
|
@@ -4,14 +4,28 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
|
-
import type {
|
|
7
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
8
|
+
import type { PasswordRequiredStateV2 } from "../../../../core/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
8
9
|
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
9
10
|
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
11
|
+
import type { AttributesRequiredStateV2 } from "../state/AttributesRequiredStateV2.js";
|
|
10
12
|
|
|
13
|
+
/**
|
|
14
|
+
* States returned after submitting sign-up attributes.
|
|
15
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
16
|
+
*/
|
|
11
17
|
export type SubmitAttributesResultStateV2 =
|
|
12
|
-
|
|
|
18
|
+
| AttributesRequiredStateV2
|
|
19
|
+
| PasswordRequiredStateV2
|
|
13
20
|
| SignInContinuationStateV2
|
|
21
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
14
22
|
| FailedStateV2;
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Result of submitting sign-up attributes.
|
|
26
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
27
|
+
*/
|
|
28
|
+
export type SubmitAttributesResultV2 = CustomAuthResultV2<
|
|
29
|
+
SubmitAttributesResultStateV2,
|
|
30
|
+
undefined
|
|
31
|
+
>;
|
|
@@ -6,26 +6,47 @@
|
|
|
6
6
|
import type { UserAccountAttributes } from "../../../../UserAccountAttributes.js";
|
|
7
7
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
8
8
|
import type { SubmitAttributesResultV2 } from "../result/SubmitAttributesResultV2.js";
|
|
9
|
-
import {
|
|
9
|
+
import { AuthFlowActionRequiredStateBase } from "../../../../core/auth_flow/AuthFlowState.js";
|
|
10
|
+
import type { SignUpAttributeV2 } from "../../../../core/network_client/custom_auth_api/v2/result/SignUpResultsV2.js";
|
|
10
11
|
import type { AttributesRequiredStateParametersV2 } from "./SignUpStateParametersV2.js";
|
|
12
|
+
import * as ArgumentValidator from "../../../../core/utils/ArgumentValidator.js";
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* State returned when sign-up requires profile or custom attributes.
|
|
16
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
14
17
|
*/
|
|
15
|
-
export class AttributesRequiredStateV2 extends
|
|
18
|
+
export class AttributesRequiredStateV2 extends AuthFlowActionRequiredStateBase<AttributesRequiredStateParametersV2> {
|
|
16
19
|
readonly stateType = "attributesRequired";
|
|
17
20
|
|
|
21
|
+
readonly attributes: readonly SignUpAttributeV2[];
|
|
22
|
+
|
|
23
|
+
constructor(stateParameters: AttributesRequiredStateParametersV2) {
|
|
24
|
+
super(stateParameters);
|
|
25
|
+
this.attributes = stateParameters.attributes;
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
|
-
* Submits the attributes
|
|
29
|
+
* Submits the supplied attributes, including an empty object, to the service.
|
|
30
|
+
* The returned result identifies the next step or a submission failure.
|
|
20
31
|
*/
|
|
21
32
|
async submitAttributes(
|
|
22
33
|
attributes: UserAccountAttributes
|
|
23
34
|
): Promise<SubmitAttributesResultV2> {
|
|
24
|
-
const { correlationId, logger, continuationState } =
|
|
35
|
+
const { correlationId, logger, continuationState, flowClient } =
|
|
25
36
|
this.stateParameters;
|
|
26
37
|
|
|
27
38
|
try {
|
|
28
|
-
const
|
|
39
|
+
const filteredAttributes =
|
|
40
|
+
ArgumentValidator.filterReservedSignUpAttributesV2(
|
|
41
|
+
attributes,
|
|
42
|
+
logger,
|
|
43
|
+
correlationId
|
|
44
|
+
);
|
|
45
|
+
const result = await flowClient.submitSignUpAttributes({
|
|
46
|
+
correlationId,
|
|
47
|
+
continuationState,
|
|
48
|
+
attributes: filteredAttributes,
|
|
49
|
+
});
|
|
29
50
|
return this.stateParameters.signUpStateTransitionHandler.handleAttributeSubmission(
|
|
30
51
|
result,
|
|
31
52
|
this.stateParameters,
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ChallengeVerificationStateBaseV2 } from "../../../../core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.js";
|
|
7
|
+
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
8
|
+
import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
|
|
9
|
+
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../../core/network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
10
|
+
import {
|
|
11
|
+
FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
|
|
12
|
+
FLOW_COMPLETED_V2,
|
|
13
|
+
FLOW_MFA_REQUIRED_V2,
|
|
14
|
+
} from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
15
|
+
import type { RequestChallengeResultV2 } from "../../../../core/auth_flow/v2/result/RequestChallengeResultV2.js";
|
|
16
|
+
import type { ExistingAccountSubmitCodeResultV2 } from "../result/ExistingAccountActionResultsV2.js";
|
|
17
|
+
import { handleExistingAccountVerificationResultV2 } from "./ExistingAccountStateTransitionHelperV2.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* State returned when sign-up discovers an existing account that requires an
|
|
21
|
+
* email code. Submitting or resending the code preserves existing-account authentication.
|
|
22
|
+
*/
|
|
23
|
+
export class ExistingAccountCodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
24
|
+
readonly stateType = "existingAccountCodeRequired";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Submits the existing account's email code and continues authentication.
|
|
28
|
+
* The result can complete authentication or require enrollment or MFA.
|
|
29
|
+
* @param code - The email code to verify.
|
|
30
|
+
* @returns The next existing-account authentication result.
|
|
31
|
+
*/
|
|
32
|
+
async submitCode(code: string): Promise<ExistingAccountSubmitCodeResultV2> {
|
|
33
|
+
const { correlationId, logger, continuationState } =
|
|
34
|
+
this.stateParameters;
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const result = await this.submitCodeCore(code);
|
|
38
|
+
if (
|
|
39
|
+
result.type === FLOW_COMPLETED_V2 ||
|
|
40
|
+
result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2 ||
|
|
41
|
+
result.type === FLOW_MFA_REQUIRED_V2
|
|
42
|
+
) {
|
|
43
|
+
return handleExistingAccountVerificationResultV2(
|
|
44
|
+
result,
|
|
45
|
+
this.stateParameters
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const resultType: string = result.type;
|
|
50
|
+
throw new CustomAuthError(
|
|
51
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
52
|
+
`Existing-account code submission result type '${resultType}' is not supported.`,
|
|
53
|
+
correlationId
|
|
54
|
+
);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
logger.errorPii(
|
|
57
|
+
`Failed to submit V2 existing-account code. Error: '${error}'.`,
|
|
58
|
+
correlationId
|
|
59
|
+
);
|
|
60
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
61
|
+
scenario: continuationState.scenario,
|
|
62
|
+
correlationId,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Requests a replacement email code for the existing account. The returned
|
|
69
|
+
* state contains the fresh continuation token and challenge metadata.
|
|
70
|
+
* @returns The refreshed existing-account code state or an error.
|
|
71
|
+
*/
|
|
72
|
+
async resendCode(): Promise<RequestChallengeResultV2> {
|
|
73
|
+
const { correlationId, logger, continuationState } =
|
|
74
|
+
this.stateParameters;
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
const result = await this.resendCodeCore();
|
|
78
|
+
return new CustomAuthResultV2(
|
|
79
|
+
new ExistingAccountCodeRequiredStateV2({
|
|
80
|
+
...this.stateParameters,
|
|
81
|
+
correlationId: result.correlationId,
|
|
82
|
+
continuationState: result.continuationState,
|
|
83
|
+
sentTo: result.sentTo,
|
|
84
|
+
channel: result.channel,
|
|
85
|
+
codeLength: result.codeLength,
|
|
86
|
+
}),
|
|
87
|
+
undefined,
|
|
88
|
+
result.continuationState.scenario
|
|
89
|
+
);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
logger.errorPii(
|
|
92
|
+
`Failed to resend V2 existing-account code. Error: '${error}'.`,
|
|
93
|
+
correlationId
|
|
94
|
+
);
|
|
95
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
96
|
+
scenario: continuationState.scenario,
|
|
97
|
+
correlationId,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|