@azure/msal-browser 5.22.0 → 5.24.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 +133 -29
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +178 -64
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +61 -22
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +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 +97 -29
- package/dist/cache/LocalStorage.mjs.map +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 +10 -10
- 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 +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/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +21 -14
- 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 +1381 -1185
- 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 +16 -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/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 +1 -1
- package/dist/webBrokerBridge/index.mjs +2 -1
- package/dist/webBrokerBridge/index.mjs.map +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +215 -19
- package/lib/custom-auth-path/msal-custom-auth.cjs +3571 -479
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +3571 -479
- 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 +622 -233
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +622 -233
- 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 +59 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs.map +1 -1
- package/package.json +3 -3
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +217 -45
- package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +261 -107
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +92 -37
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +118 -6
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +14 -1
- package/src/cache/LocalStorage.ts +135 -28
- package/src/controllers/StandardController.ts +17 -23
- 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/interaction_client/PlatformAuthInteractionClient.ts +79 -17
- package/src/interaction_client/RedirectClient.ts +15 -5
- package/src/packageMetadata.ts +1 -1
- package/src/telemetry/BrowserPerformanceEvents.ts +20 -0
- package/src/webBrokerBridge/PerfEventNames.ts +43 -0
- package/src/webBrokerBridge/index.ts +26 -0
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +3 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts +3 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.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/cache/LocalStorage.d.ts +4 -5
- package/types/cache/LocalStorage.d.ts.map +1 -1
- package/types/controllers/StandardController.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/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/telemetry/BrowserPerformanceEvents.d.ts +13 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/types/webBrokerBridge/PerfEventNames.d.ts +30 -0
- package/types/webBrokerBridge/PerfEventNames.d.ts.map +1 -0
- package/types/webBrokerBridge/index.d.ts +1 -0
- package/types/webBrokerBridge/index.d.ts.map +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowActionRequiredStateBase } from "../../../../core/auth_flow/AuthFlowState.js";
|
|
7
|
+
import type { PasswordRequiredStateParametersV2 } from "./SignInStateParametersV2.js";
|
|
8
|
+
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
9
|
+
import { CompletedStateV2 } from "../../../../core/auth_flow/v2/state/CompletedStateV2.js";
|
|
10
|
+
import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
11
|
+
import { SubmitPasswordErrorV2 } from "../error_type/SubmitPasswordErrorV2.js";
|
|
12
|
+
import type { SubmitPasswordResultV2 } from "../result/SubmitPasswordResultV2.js";
|
|
13
|
+
import { MFARequiredStateV2 } from "../../../../core/auth_flow/v2/state/MFARequiredStateV2.js";
|
|
14
|
+
import {
|
|
15
|
+
FLOW_COMPLETED_V2,
|
|
16
|
+
FLOW_MFA_REQUIRED_V2,
|
|
17
|
+
} from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
18
|
+
import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
|
|
19
|
+
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../../core/network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* State returned when the selected sign-in method requires the user's
|
|
23
|
+
* password.
|
|
24
|
+
*/
|
|
25
|
+
export class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<PasswordRequiredStateParametersV2> {
|
|
26
|
+
readonly stateType = "passwordRequired";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Submits the password and advances sign-in.
|
|
30
|
+
* @param password - The account password.
|
|
31
|
+
* @returns A completed sign-in, MFA selection, or password submission error.
|
|
32
|
+
*/
|
|
33
|
+
async submitPassword(password: string): Promise<SubmitPasswordResultV2> {
|
|
34
|
+
const { correlationId, logger, continuationState, flowClient } =
|
|
35
|
+
this.stateParameters;
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
this.ensurePasswordIsNotEmpty(password);
|
|
39
|
+
const result = await flowClient.submitSignInPassword({
|
|
40
|
+
correlationId,
|
|
41
|
+
continuationState,
|
|
42
|
+
password,
|
|
43
|
+
});
|
|
44
|
+
const resultType: string = result.type;
|
|
45
|
+
|
|
46
|
+
if (result.type === FLOW_COMPLETED_V2) {
|
|
47
|
+
const account = new CustomAuthAccountData(
|
|
48
|
+
result.authenticationResult.account,
|
|
49
|
+
this.stateParameters.config,
|
|
50
|
+
this.stateParameters.cacheClient,
|
|
51
|
+
logger,
|
|
52
|
+
correlationId
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return new CustomAuthResultV2(
|
|
56
|
+
new CompletedStateV2(),
|
|
57
|
+
account,
|
|
58
|
+
continuationState.scenario
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
63
|
+
return new CustomAuthResultV2(
|
|
64
|
+
new MFARequiredStateV2({
|
|
65
|
+
correlationId: result.correlationId,
|
|
66
|
+
logger,
|
|
67
|
+
config: this.stateParameters.config,
|
|
68
|
+
flowClient,
|
|
69
|
+
continuationState: result.continuationState,
|
|
70
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
71
|
+
methods: result.methods,
|
|
72
|
+
}),
|
|
73
|
+
undefined,
|
|
74
|
+
result.continuationState.scenario
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
throw new CustomAuthError(
|
|
79
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
80
|
+
`Password verification result type '${resultType}' is not supported.`,
|
|
81
|
+
correlationId
|
|
82
|
+
);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
logger.errorPii(
|
|
85
|
+
`Failed to submit V2 sign-in password. Error: '${error}'.`,
|
|
86
|
+
correlationId
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
90
|
+
errorType: SubmitPasswordErrorV2,
|
|
91
|
+
scenario: continuationState.scenario,
|
|
92
|
+
correlationId,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowActionRequiredStateBase } from "../../../../core/auth_flow/AuthFlowState.js";
|
|
7
|
+
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
8
|
+
import { CompletedStateV2 } from "../../../../core/auth_flow/v2/state/CompletedStateV2.js";
|
|
9
|
+
import { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
10
|
+
import { SignInContinuationErrorV2 } from "../error_type/SignInContinuationErrorV2.js";
|
|
11
|
+
import type { SignInContinuationStateParametersV2 } from "./SignInStateParametersV2.js";
|
|
12
|
+
import type { SignInContinuationResultV2 } from "../result/SignInContinuationResultV2.js";
|
|
13
|
+
import type { SignInContinuationInputsV2 } from "../../../../CustomAuthActionInputs.js";
|
|
14
|
+
import * as ArgumentValidator from "../../../../core/utils/ArgumentValidator.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Shared state returned when a completed V2 flow can sign the user in by
|
|
18
|
+
* redeeming its continuation. Password reset and sign-up can both surface this
|
|
19
|
+
* state without duplicating the token-acquisition behavior.
|
|
20
|
+
*/
|
|
21
|
+
export class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase<SignInContinuationStateParametersV2> {
|
|
22
|
+
readonly stateType = "signInContinuation";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Signs the user in using the continuation established by the completed V2
|
|
26
|
+
* flow. On success the returned result reaches the completed state
|
|
27
|
+
* carrying the signed-in account data; on failure the result's error reports
|
|
28
|
+
* why the follow-up sign-in could not complete.
|
|
29
|
+
* @param inputs - Optional scopes requested for the issued token. Claims
|
|
30
|
+
* are accepted for API alignment but are not sent until the V2 service
|
|
31
|
+
* supports them on authorize-challenge.
|
|
32
|
+
* @returns The result of signing in after the password reset.
|
|
33
|
+
*/
|
|
34
|
+
async signIn(
|
|
35
|
+
inputs?: SignInContinuationInputsV2
|
|
36
|
+
): Promise<SignInContinuationResultV2> {
|
|
37
|
+
const { correlationId, logger, continuationState, flowClient } =
|
|
38
|
+
this.stateParameters;
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
if (inputs?.claims) {
|
|
42
|
+
ArgumentValidator.ensureArgumentIsJSONString(
|
|
43
|
+
"inputs.claims",
|
|
44
|
+
inputs.claims,
|
|
45
|
+
correlationId
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
logger.verbose("Signing in with a V2 continuation.", correlationId);
|
|
50
|
+
|
|
51
|
+
const result = await flowClient.signInWithContinuation({
|
|
52
|
+
correlationId,
|
|
53
|
+
continuationState,
|
|
54
|
+
scopes: inputs?.scopes,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const account = new CustomAuthAccountData(
|
|
58
|
+
result.authenticationResult.account,
|
|
59
|
+
this.stateParameters.config,
|
|
60
|
+
this.stateParameters.cacheClient,
|
|
61
|
+
logger,
|
|
62
|
+
correlationId
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return new CustomAuthResultV2(
|
|
66
|
+
new CompletedStateV2(),
|
|
67
|
+
account,
|
|
68
|
+
continuationState.scenario
|
|
69
|
+
);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
logger.errorPii(
|
|
72
|
+
`Failed to sign in with a V2 continuation. Error: '${error}'.`,
|
|
73
|
+
correlationId
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
77
|
+
errorType: SignInContinuationErrorV2,
|
|
78
|
+
scenario: continuationState.scenario,
|
|
79
|
+
correlationId,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { CustomAuthActionRequiredStateParametersV2 } from "../../../../core/auth_flow/v2/state/CustomAuthStateParametersV2.js";
|
|
7
|
+
|
|
8
|
+
export type SignInContinuationStateParametersV2 =
|
|
9
|
+
CustomAuthActionRequiredStateParametersV2;
|
|
10
|
+
|
|
11
|
+
export type PasswordRequiredStateParametersV2 =
|
|
12
|
+
CustomAuthActionRequiredStateParametersV2;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowErrorBaseV2 } from "../../../../core/auth_flow/v2/error/AuthFlowErrorBaseV2.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Error returned when native auth V2 sign-up cannot start. It exposes
|
|
10
|
+
* detectors for failures that an app can correct without restarting the flow.
|
|
11
|
+
*/
|
|
12
|
+
export class SignUpStartErrorV2 extends AuthFlowErrorBaseV2 {
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether an upfront password violates the tenant's password policy.
|
|
15
|
+
* Use it to prompt the user for a stronger password.
|
|
16
|
+
* @returns True when the password violates policy, otherwise false.
|
|
17
|
+
*/
|
|
18
|
+
isInvalidPassword(): boolean {
|
|
19
|
+
return this.isPasswordPolicyViolationError();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowErrorBaseV2 } from "../../../../core/auth_flow/v2/error/AuthFlowErrorBaseV2.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Error returned when additional V2 sign-up attributes cannot be submitted. It
|
|
10
|
+
* identifies attribute failures that an app can correct and resubmit.
|
|
11
|
+
*/
|
|
12
|
+
export class SubmitAttributesErrorV2 extends AuthFlowErrorBaseV2 {
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether the service requires attributes omitted from the request.
|
|
15
|
+
* Use it to collect the required attributes before resubmitting.
|
|
16
|
+
* @returns True when required attributes are missing, otherwise false.
|
|
17
|
+
*/
|
|
18
|
+
isMissingRequiredAttributes(): boolean {
|
|
19
|
+
return this.getAttributeValidationDetails().some(
|
|
20
|
+
(detail) => detail.code === "attributeRequired"
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Checks whether a submitted password violates the tenant's password policy.
|
|
26
|
+
* Use it to prompt the user for a stronger password.
|
|
27
|
+
* @returns True when the password violates policy, otherwise false.
|
|
28
|
+
*/
|
|
29
|
+
isInvalidPassword(): boolean {
|
|
30
|
+
return this.isPasswordPolicyViolationError();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
|
+
import type { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
8
|
+
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
9
|
+
import type { SignUpStartErrorV2 } from "../error_type/SignUpStartErrorV2.js";
|
|
10
|
+
import type { AttributesRequiredStateV2 } from "../state/AttributesRequiredStateV2.js";
|
|
11
|
+
import type { SignUpPasswordRequiredStateV2 } from "../state/SignUpPasswordRequiredStateV2.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* States returned when native auth V2 sign-up starts.
|
|
15
|
+
*/
|
|
16
|
+
export type SignUpStartResultStateV2 =
|
|
17
|
+
| CodeRequiredStateV2
|
|
18
|
+
| SignUpPasswordRequiredStateV2
|
|
19
|
+
| AttributesRequiredStateV2
|
|
20
|
+
| FailedStateV2;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Result of starting native auth V2 sign-up.
|
|
24
|
+
*/
|
|
25
|
+
export type SignUpStartResultV2 = CustomAuthResultV2<
|
|
26
|
+
SignUpStartResultStateV2,
|
|
27
|
+
SignUpStartErrorV2
|
|
28
|
+
>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
8
|
+
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
9
|
+
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
10
|
+
import type { SubmitAttributesErrorV2 } from "../error_type/SubmitAttributesErrorV2.js";
|
|
11
|
+
|
|
12
|
+
export type SubmitAttributesResultStateV2 =
|
|
13
|
+
| CodeRequiredStateV2
|
|
14
|
+
| SignInContinuationStateV2
|
|
15
|
+
| FailedStateV2;
|
|
16
|
+
|
|
17
|
+
export type SubmitAttributesResultV2 = CustomAuthResultV2<
|
|
18
|
+
SubmitAttributesResultStateV2,
|
|
19
|
+
SubmitAttributesErrorV2
|
|
20
|
+
>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { UserAccountAttributes } from "../../../../UserAccountAttributes.js";
|
|
7
|
+
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
8
|
+
import { SubmitAttributesErrorV2 } from "../error_type/SubmitAttributesErrorV2.js";
|
|
9
|
+
import type { SubmitAttributesResultV2 } from "../result/SubmitAttributesResultV2.js";
|
|
10
|
+
import { SignUpAttributesRequiredStateBaseV2 } from "./SignUpAttributesRequiredStateBaseV2.js";
|
|
11
|
+
import type { AttributesRequiredStateParametersV2 } from "./SignUpStateParametersV2.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* State returned when sign-up requires profile or custom attributes.
|
|
15
|
+
*/
|
|
16
|
+
export class AttributesRequiredStateV2 extends SignUpAttributesRequiredStateBaseV2<AttributesRequiredStateParametersV2> {
|
|
17
|
+
readonly stateType = "attributesRequired";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Submits the attributes requested by the latest server response.
|
|
21
|
+
*/
|
|
22
|
+
async submitAttributes(
|
|
23
|
+
attributes: UserAccountAttributes
|
|
24
|
+
): Promise<SubmitAttributesResultV2> {
|
|
25
|
+
const { correlationId, logger, continuationState } =
|
|
26
|
+
this.stateParameters;
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const result = await this.submitAttributesAction(attributes);
|
|
30
|
+
return this.stateParameters.signUpStateTransitionHandler.handleAttributeSubmission(
|
|
31
|
+
result,
|
|
32
|
+
this.stateParameters,
|
|
33
|
+
"attribute"
|
|
34
|
+
);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
logger.errorPii(
|
|
37
|
+
`Failed to submit V2 sign-up attributes. Error: '${error}'.`,
|
|
38
|
+
correlationId
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
42
|
+
errorType: SubmitAttributesErrorV2,
|
|
43
|
+
scenario: continuationState.scenario,
|
|
44
|
+
correlationId,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthFlowActionRequiredStateBase } from "../../../../core/auth_flow/AuthFlowState.js";
|
|
7
|
+
import type { FlowSignUpActionResultV2 } from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
8
|
+
import type { SignUpAttributeV2 } from "../../../../core/network_client/custom_auth_api/v2/result/SignUpResultsV2.js";
|
|
9
|
+
import type { UserAccountAttributes } from "../../../../UserAccountAttributes.js";
|
|
10
|
+
import type { AttributesRequiredStateParametersV2 } from "./SignUpStateParametersV2.js";
|
|
11
|
+
|
|
12
|
+
export abstract class SignUpAttributesRequiredStateBaseV2<
|
|
13
|
+
TParameters extends AttributesRequiredStateParametersV2
|
|
14
|
+
> extends AuthFlowActionRequiredStateBase<TParameters> {
|
|
15
|
+
readonly attributes: readonly SignUpAttributeV2[];
|
|
16
|
+
|
|
17
|
+
constructor(stateParameters: TParameters) {
|
|
18
|
+
super(stateParameters);
|
|
19
|
+
this.attributes = stateParameters.attributes;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
protected async submitAttributesAction(
|
|
23
|
+
attributes: UserAccountAttributes
|
|
24
|
+
): Promise<FlowSignUpActionResultV2> {
|
|
25
|
+
const { correlationId, continuationState, flowClient } =
|
|
26
|
+
this.stateParameters;
|
|
27
|
+
|
|
28
|
+
return flowClient.submitSignUpAttributes({
|
|
29
|
+
correlationId,
|
|
30
|
+
continuationState,
|
|
31
|
+
attributes,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { SignUpAttributeV2 } from "../../../../core/network_client/custom_auth_api/v2/result/SignUpResultsV2.js";
|
|
7
|
+
import type { UserAccountAttributes } from "../../../../UserAccountAttributes.js";
|
|
8
|
+
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
9
|
+
import { SubmitAttributesErrorV2 } from "../error_type/SubmitAttributesErrorV2.js";
|
|
10
|
+
import type { SubmitAttributesResultV2 } from "../result/SubmitAttributesResultV2.js";
|
|
11
|
+
import { SignUpAttributesRequiredStateBaseV2 } from "./SignUpAttributesRequiredStateBaseV2.js";
|
|
12
|
+
import type { SignUpPasswordRequiredStateParametersV2 } from "./SignUpStateParametersV2.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* State returned when sign-up requires a password that was not submitted with
|
|
16
|
+
* an earlier attribute request.
|
|
17
|
+
*/
|
|
18
|
+
export class SignUpPasswordRequiredStateV2 extends SignUpAttributesRequiredStateBaseV2<SignUpPasswordRequiredStateParametersV2> {
|
|
19
|
+
readonly stateType = "passwordRequired";
|
|
20
|
+
|
|
21
|
+
readonly requiredPasswordAttribute: SignUpAttributeV2;
|
|
22
|
+
|
|
23
|
+
constructor(stateParameters: SignUpPasswordRequiredStateParametersV2) {
|
|
24
|
+
super(stateParameters);
|
|
25
|
+
this.requiredPasswordAttribute =
|
|
26
|
+
stateParameters.requiredPasswordAttribute;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Submits the password and any profile attributes requested alongside it.
|
|
31
|
+
*/
|
|
32
|
+
async submitPassword(
|
|
33
|
+
password: string,
|
|
34
|
+
attributes: UserAccountAttributes = {}
|
|
35
|
+
): Promise<SubmitAttributesResultV2> {
|
|
36
|
+
const { correlationId, logger, continuationState } =
|
|
37
|
+
this.stateParameters;
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
this.ensurePasswordIsNotEmpty(password);
|
|
41
|
+
const result = await this.submitAttributesAction({
|
|
42
|
+
...attributes,
|
|
43
|
+
password,
|
|
44
|
+
});
|
|
45
|
+
return this.stateParameters.signUpStateTransitionHandler.handleAttributeSubmission(
|
|
46
|
+
result,
|
|
47
|
+
this.stateParameters,
|
|
48
|
+
"password"
|
|
49
|
+
);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
logger.errorPii(
|
|
52
|
+
`Failed to submit V2 sign-up password. Error: '${error}'.`,
|
|
53
|
+
correlationId
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
57
|
+
errorType: SubmitAttributesErrorV2,
|
|
58
|
+
scenario: continuationState.scenario,
|
|
59
|
+
correlationId,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { CustomAuthActionRequiredStateParametersV2 } from "../../../../core/auth_flow/v2/state/CustomAuthStateParametersV2.js";
|
|
7
|
+
import type { SignUpAttributeV2 } from "../../../../core/network_client/custom_auth_api/v2/result/SignUpResultsV2.js";
|
|
8
|
+
import type { SignUpStateTransitionHandlerV2 } from "./SignUpStateTransitionHandlerV2.js";
|
|
9
|
+
|
|
10
|
+
export interface SignUpActionRequiredStateParametersV2
|
|
11
|
+
extends CustomAuthActionRequiredStateParametersV2 {
|
|
12
|
+
signUpStateTransitionHandler: SignUpStateTransitionHandlerV2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface AttributesRequiredStateParametersV2
|
|
16
|
+
extends SignUpActionRequiredStateParametersV2 {
|
|
17
|
+
attributes: SignUpAttributeV2[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface SignUpPasswordRequiredStateParametersV2
|
|
21
|
+
extends SignUpActionRequiredStateParametersV2 {
|
|
22
|
+
attributes: SignUpAttributeV2[];
|
|
23
|
+
requiredPasswordAttribute: SignUpAttributeV2;
|
|
24
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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 { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
8
|
+
import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
|
|
9
|
+
import {
|
|
10
|
+
FLOW_ATTRIBUTES_REQUIRED_V2,
|
|
11
|
+
FLOW_CODE_REQUIRED_V2,
|
|
12
|
+
FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2,
|
|
13
|
+
type FlowAttributesRequiredResultV2,
|
|
14
|
+
type FlowSignUpActionResultV2,
|
|
15
|
+
type FlowSignUpPasswordRequiredResultV2,
|
|
16
|
+
} from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
17
|
+
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../../core/network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
18
|
+
import { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
19
|
+
import type { VerifyChallengeResultV2 } from "../../../../core/auth_flow/v2/result/VerifyChallengeResultV2.js";
|
|
20
|
+
import type { SubmitAttributesResultV2 } from "../result/SubmitAttributesResultV2.js";
|
|
21
|
+
import { AttributesRequiredStateV2 } from "./AttributesRequiredStateV2.js";
|
|
22
|
+
import { SignUpPasswordRequiredStateV2 } from "./SignUpPasswordRequiredStateV2.js";
|
|
23
|
+
import type { SignUpActionRequiredStateParametersV2 } from "./SignUpStateParametersV2.js";
|
|
24
|
+
|
|
25
|
+
export class SignUpStateTransitionHandlerV2 {
|
|
26
|
+
handleAttributeSubmission(
|
|
27
|
+
result: FlowSignUpActionResultV2,
|
|
28
|
+
stateParameters: SignUpActionRequiredStateParametersV2,
|
|
29
|
+
submission: "attribute" | "password"
|
|
30
|
+
): SubmitAttributesResultV2 {
|
|
31
|
+
const commonStateParameters = this.createCommonStateParameters(
|
|
32
|
+
result,
|
|
33
|
+
stateParameters
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
37
|
+
return new CustomAuthResultV2(
|
|
38
|
+
new CodeRequiredStateV2({
|
|
39
|
+
...commonStateParameters,
|
|
40
|
+
sentTo: result.sentTo,
|
|
41
|
+
channel: result.channel,
|
|
42
|
+
codeLength: result.codeLength,
|
|
43
|
+
}),
|
|
44
|
+
undefined,
|
|
45
|
+
result.continuationState.scenario
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
50
|
+
return new CustomAuthResultV2(
|
|
51
|
+
new SignInContinuationStateV2(commonStateParameters),
|
|
52
|
+
undefined,
|
|
53
|
+
result.continuationState.scenario
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
throw new CustomAuthError(
|
|
58
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
59
|
+
`Sign-up ${submission} submission result type '${result.type}' is not supported.`,
|
|
60
|
+
stateParameters.correlationId
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
handleVerification(
|
|
65
|
+
result:
|
|
66
|
+
| FlowAttributesRequiredResultV2
|
|
67
|
+
| FlowSignUpPasswordRequiredResultV2,
|
|
68
|
+
stateParameters: SignUpActionRequiredStateParametersV2
|
|
69
|
+
): VerifyChallengeResultV2 {
|
|
70
|
+
const commonStateParameters = this.createCommonStateParameters(
|
|
71
|
+
result,
|
|
72
|
+
stateParameters
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
if (result.type === FLOW_ATTRIBUTES_REQUIRED_V2) {
|
|
76
|
+
return new CustomAuthResultV2(
|
|
77
|
+
new AttributesRequiredStateV2({
|
|
78
|
+
...commonStateParameters,
|
|
79
|
+
attributes: result.attributes,
|
|
80
|
+
}),
|
|
81
|
+
undefined,
|
|
82
|
+
result.continuationState.scenario
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return new CustomAuthResultV2(
|
|
87
|
+
new SignUpPasswordRequiredStateV2({
|
|
88
|
+
...commonStateParameters,
|
|
89
|
+
attributes: result.attributes,
|
|
90
|
+
requiredPasswordAttribute: result.requiredPasswordAttribute,
|
|
91
|
+
}),
|
|
92
|
+
undefined,
|
|
93
|
+
result.continuationState.scenario
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
private createCommonStateParameters(
|
|
98
|
+
result: FlowSignUpActionResultV2,
|
|
99
|
+
stateParameters: SignUpActionRequiredStateParametersV2
|
|
100
|
+
): SignUpActionRequiredStateParametersV2 {
|
|
101
|
+
return {
|
|
102
|
+
correlationId: result.correlationId,
|
|
103
|
+
logger: stateParameters.logger,
|
|
104
|
+
config: stateParameters.config,
|
|
105
|
+
flowClient: stateParameters.flowClient,
|
|
106
|
+
continuationState: result.continuationState,
|
|
107
|
+
cacheClient: stateParameters.cacheClient,
|
|
108
|
+
signUpStateTransitionHandler:
|
|
109
|
+
stateParameters.signUpStateTransitionHandler,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|