@azure/msal-browser 5.21.0 → 5.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +23 -3
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +5 -2
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +49 -0
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -0
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +27 -2
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +192 -2
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +21 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +80 -0
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs +102 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +12 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs +20 -0
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs +29 -0
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +76 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +36 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +134 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +23 -0
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +22 -0
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs +61 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +87 -0
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +3 -2
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +1 -1
- package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +602 -0
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +67 -0
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -0
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +46 -0
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +3 -2
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +30 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +193 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +236 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +26 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +66 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +97 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +56 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +23 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +14 -0
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -0
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +3 -2
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +38 -0
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -0
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +20 -3
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom_auth/index.mjs +23 -1
- package/dist/custom_auth/index.mjs.map +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs +29 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs.map +1 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +59 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs +18 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs +37 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs +23 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +70 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +61 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs +25 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs +33 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +40 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +25 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +47 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +60 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +8 -2
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +11 -8
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +189 -5
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +38 -0
- package/dist/webBrokerBridge/PerfEventNames.mjs.map +1 -0
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +139 -0
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs.map +1 -0
- package/dist/webBrokerBridge/index.mjs +8 -0
- package/dist/webBrokerBridge/index.mjs.map +1 -0
- package/lib/custom-auth-path/log-strings-mapping.json +195 -11
- package/lib/custom-auth-path/msal-custom-auth.cjs +2996 -204
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +2996 -204
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +2 -2
- package/lib/msal-browser.cjs +176 -87
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +176 -87
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +353 -0
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs.map +1 -0
- package/package.json +19 -2
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +40 -2
- package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +4 -1
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +118 -6
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +14 -1
- package/src/custom_auth/CustomAuthActionInputs.ts +11 -0
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +40 -4
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +44 -0
- package/src/custom_auth/controller/CustomAuthStandardController.ts +360 -1
- package/src/custom_auth/controller/ICustomAuthStandardController.ts +14 -0
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +20 -0
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +133 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.ts +146 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +8 -0
- package/src/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.ts +33 -0
- package/src/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.ts +25 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +25 -0
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +30 -0
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +40 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +100 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.ts +59 -0
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +53 -0
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +196 -0
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +16 -0
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +44 -0
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.ts +76 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +119 -0
- package/src/custom_auth/core/error/CustomAuthApiError.ts +3 -1
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +35 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +1145 -0
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +150 -0
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +66 -0
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +185 -0
- package/src/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +30 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +423 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +553 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.ts +24 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +81 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +177 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +129 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.ts +68 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +50 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.ts +20 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +202 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +111 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +26 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +44 -0
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +64 -0
- package/src/custom_auth/core/telemetry/PublicApiId.ts +18 -0
- package/src/custom_auth/index.ts +96 -0
- package/src/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.ts +25 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +33 -0
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +69 -0
- package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.ts +9 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.ts +13 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.ts +35 -0
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.ts +19 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +31 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +32 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +22 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +96 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +83 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +12 -0
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.ts +21 -0
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.ts +32 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +28 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +20 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +48 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +34 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +63 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +24 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +112 -0
- package/src/index.ts +0 -2
- package/src/interaction_client/PlatformAuthInteractionClient.ts +23 -2
- package/src/interaction_client/RedirectClient.ts +15 -5
- package/src/packageMetadata.ts +1 -1
- package/src/webBrokerBridge/PerfEventNames.ts +43 -0
- package/src/webBrokerBridge/index.ts +28 -6
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +1 -0
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +68 -5
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +12 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +7 -0
- package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +27 -5
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +30 -0
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -0
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts +11 -2
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/controller/ICustomAuthStandardController.d.ts +7 -1
- package/types/custom_auth/controller/ICustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +53 -0
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts +40 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +4 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts +7 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +15 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +21 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts +17 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +25 -0
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +28 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +10 -0
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts +18 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +25 -0
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts +3 -1
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +21 -0
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +35 -0
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +26 -0
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +43 -0
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -0
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +80 -0
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +17 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts +31 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +23 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts +19 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts +2 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +15 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +52 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts +3 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts +37 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts +12 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/HalResource.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +133 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +70 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +10 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +33 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -0
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +4 -0
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +16 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +37 -0
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts +18 -0
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +22 -0
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +19 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts +3 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts +22 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts +12 -0
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +21 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +17 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +17 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +24 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +4 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts +14 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts +20 -0
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +15 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +8 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +15 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +11 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +19 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +14 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +10 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -0
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/webBrokerBridge/PerfEventNames.d.ts +30 -0
- package/types/webBrokerBridge/PerfEventNames.d.ts.map +1 -0
- package/types/webBrokerBridge/index.d.cts +1 -0
- package/types/webBrokerBridge/index.d.ts +3 -5
- package/types/webBrokerBridge/index.d.ts.map +1 -1
|
@@ -17,6 +17,9 @@ import {
|
|
|
17
17
|
SignUpInputs,
|
|
18
18
|
ResetPasswordInputs,
|
|
19
19
|
CustomAuthActionInputs,
|
|
20
|
+
ResetPasswordInputsV2,
|
|
21
|
+
SignInInputsV2,
|
|
22
|
+
SignUpInputsV2,
|
|
20
23
|
} from "../CustomAuthActionInputs.js";
|
|
21
24
|
import { CustomAuthBrowserConfiguration } from "../configuration/CustomAuthConfiguration.js";
|
|
22
25
|
import { CustomAuthOperatingContext } from "../operating_context/CustomAuthOperatingContext.js";
|
|
@@ -24,6 +27,32 @@ import { ICustomAuthStandardController } from "./ICustomAuthStandardController.j
|
|
|
24
27
|
import { CustomAuthAccountData } from "../get_account/auth_flow/CustomAuthAccountData.js";
|
|
25
28
|
import { UnexpectedError } from "../core/error/UnexpectedError.js";
|
|
26
29
|
import { ResetPasswordStartResult } from "../reset_password/auth_flow/result/ResetPasswordStartResult.js";
|
|
30
|
+
import { ResetPasswordStartResultV2 } from "../core/auth_flow/v2/result/ResetPasswordStartResultV2.js";
|
|
31
|
+
import { CustomAuthApiClientV2 } from "../core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.js";
|
|
32
|
+
import { FlowInteractionClientV2 } from "../core/interaction_client/v2/FlowInteractionClientV2.js";
|
|
33
|
+
import { AuthMethodSelectionRequiredStateV2 } from "../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
34
|
+
import { ResetPasswordStartErrorV2 } from "../core/auth_flow/v2/error/ResetPasswordStartErrorV2.js";
|
|
35
|
+
import { CustomAuthResultV2 } from "../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
36
|
+
import { CustomAuthFlowScenarioV2 } from "../core/auth_flow/v2/CustomAuthFlowScenarioV2.js";
|
|
37
|
+
import { SignInStartErrorV2 } from "../sign_in/auth_flow/v2/error_type/SignInStartErrorV2.js";
|
|
38
|
+
import { SignInStartResultV2 } from "../sign_in/auth_flow/v2/result/SignInStartResultV2.js";
|
|
39
|
+
import { SignUpStartErrorV2 } from "../sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.js";
|
|
40
|
+
import { SignUpStartResultV2 } from "../sign_up/auth_flow/v2/result/SignUpStartResultV2.js";
|
|
41
|
+
import { CompletedStateV2 } from "../core/auth_flow/v2/state/CompletedStateV2.js";
|
|
42
|
+
import {
|
|
43
|
+
FLOW_COMPLETED_V2,
|
|
44
|
+
FLOW_ATTRIBUTES_REQUIRED_V2,
|
|
45
|
+
FLOW_CODE_REQUIRED_V2,
|
|
46
|
+
FLOW_MFA_REQUIRED_V2,
|
|
47
|
+
FLOW_PASSWORD_REQUIRED_V2,
|
|
48
|
+
FLOW_SIGN_UP_PASSWORD_REQUIRED_V2,
|
|
49
|
+
} from "../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
50
|
+
import { PasswordRequiredStateV2 } from "../sign_in/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
51
|
+
import { CodeRequiredStateV2 } from "../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
52
|
+
import { MFARequiredStateV2 } from "../core/auth_flow/v2/state/MFARequiredStateV2.js";
|
|
53
|
+
import { AttributesRequiredStateV2 } from "../sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
|
|
54
|
+
import { SignUpPasswordRequiredStateV2 } from "../sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.js";
|
|
55
|
+
import { SignUpStateTransitionHandlerV2 } from "../sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.js";
|
|
27
56
|
import { CustomAuthAuthority } from "../core/CustomAuthAuthority.js";
|
|
28
57
|
import { DefaultPackageInfo } from "../CustomAuthConstants.js";
|
|
29
58
|
import {
|
|
@@ -76,15 +105,20 @@ export class CustomAuthStandardController
|
|
|
76
105
|
private readonly cacheClient: CustomAuthSilentCacheClient;
|
|
77
106
|
private readonly customAuthConfig: CustomAuthBrowserConfiguration;
|
|
78
107
|
private readonly authority: CustomAuthAuthority;
|
|
108
|
+
private readonly flowClientV2: FlowInteractionClientV2;
|
|
109
|
+
private readonly signUpStateTransitionHandlerV2 =
|
|
110
|
+
new SignUpStateTransitionHandlerV2();
|
|
79
111
|
|
|
80
112
|
/*
|
|
81
113
|
* Constructor for CustomAuthStandardController.
|
|
82
114
|
* @param operatingContext - The operating context for the controller.
|
|
83
115
|
* @param customAuthApiClient - The client to use for custom auth API operations.
|
|
116
|
+
* @param customAuthApiClientV2 - The client to use for V2 custom auth API operations.
|
|
84
117
|
*/
|
|
85
118
|
constructor(
|
|
86
119
|
operatingContext: CustomAuthOperatingContext,
|
|
87
|
-
customAuthApiClient?: ICustomAuthApiClient
|
|
120
|
+
customAuthApiClient?: ICustomAuthApiClient,
|
|
121
|
+
customAuthApiClientV2?: CustomAuthApiClientV2
|
|
88
122
|
) {
|
|
89
123
|
super(operatingContext);
|
|
90
124
|
|
|
@@ -140,6 +174,26 @@ export class CustomAuthStandardController
|
|
|
140
174
|
this.cacheClient = interactionClientFactory.create(
|
|
141
175
|
CustomAuthSilentCacheClient
|
|
142
176
|
);
|
|
177
|
+
|
|
178
|
+
this.flowClientV2 = new FlowInteractionClientV2(
|
|
179
|
+
this.customAuthConfig,
|
|
180
|
+
this.browserStorage,
|
|
181
|
+
this.browserCrypto,
|
|
182
|
+
this.logger,
|
|
183
|
+
this.eventHandler,
|
|
184
|
+
this.navigationClient,
|
|
185
|
+
this.performanceClient,
|
|
186
|
+
this.authority,
|
|
187
|
+
customAuthApiClientV2 ??
|
|
188
|
+
new CustomAuthApiClientV2(
|
|
189
|
+
this.authority.getCustomAuthApiDomain(),
|
|
190
|
+
this.customAuthConfig.auth.clientId,
|
|
191
|
+
new FetchHttpClient(this.logger),
|
|
192
|
+
this.customAuthConfig.customAuth?.customAuthApiQueryParams,
|
|
193
|
+
this.customAuthConfig.customAuth?.requestInterceptor,
|
|
194
|
+
this.logger
|
|
195
|
+
)
|
|
196
|
+
);
|
|
143
197
|
}
|
|
144
198
|
|
|
145
199
|
/*
|
|
@@ -581,6 +635,311 @@ export class CustomAuthStandardController
|
|
|
581
635
|
}
|
|
582
636
|
}
|
|
583
637
|
|
|
638
|
+
async resetPasswordV2(
|
|
639
|
+
inputs: ResetPasswordInputsV2
|
|
640
|
+
): Promise<ResetPasswordStartResultV2> {
|
|
641
|
+
const correlationId = this.getCorrelationId(inputs);
|
|
642
|
+
|
|
643
|
+
try {
|
|
644
|
+
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
645
|
+
"inputs",
|
|
646
|
+
inputs,
|
|
647
|
+
correlationId
|
|
648
|
+
);
|
|
649
|
+
|
|
650
|
+
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
651
|
+
"inputs.username",
|
|
652
|
+
inputs.username,
|
|
653
|
+
correlationId
|
|
654
|
+
);
|
|
655
|
+
this.ensureUserNotSignedIn(correlationId);
|
|
656
|
+
|
|
657
|
+
this.logger.verbose(
|
|
658
|
+
"Starting native auth V2 password-reset flow.",
|
|
659
|
+
correlationId
|
|
660
|
+
);
|
|
661
|
+
|
|
662
|
+
const result = await this.flowClientV2.resetPassword({
|
|
663
|
+
correlationId,
|
|
664
|
+
username: inputs.username,
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
this.logger.verbose(
|
|
668
|
+
"Native auth V2 password-reset flow started.",
|
|
669
|
+
correlationId
|
|
670
|
+
);
|
|
671
|
+
|
|
672
|
+
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
673
|
+
return new CustomAuthResultV2(
|
|
674
|
+
new CodeRequiredStateV2({
|
|
675
|
+
correlationId: result.correlationId,
|
|
676
|
+
logger: this.logger,
|
|
677
|
+
config: this.customAuthConfig,
|
|
678
|
+
flowClient: this.flowClientV2,
|
|
679
|
+
continuationState: result.continuationState,
|
|
680
|
+
cacheClient: this.cacheClient,
|
|
681
|
+
method: result.method,
|
|
682
|
+
sentTo: result.sentTo,
|
|
683
|
+
channel: result.channel,
|
|
684
|
+
codeLength: result.codeLength,
|
|
685
|
+
}),
|
|
686
|
+
undefined,
|
|
687
|
+
result.continuationState.scenario
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
return new CustomAuthResultV2(
|
|
692
|
+
new AuthMethodSelectionRequiredStateV2({
|
|
693
|
+
correlationId: result.correlationId,
|
|
694
|
+
logger: this.logger,
|
|
695
|
+
config: this.customAuthConfig,
|
|
696
|
+
flowClient: this.flowClientV2,
|
|
697
|
+
continuationState: result.continuationState,
|
|
698
|
+
cacheClient: this.cacheClient,
|
|
699
|
+
methods: result.methods,
|
|
700
|
+
}),
|
|
701
|
+
undefined,
|
|
702
|
+
result.continuationState.scenario
|
|
703
|
+
);
|
|
704
|
+
} catch (error) {
|
|
705
|
+
this.logger.errorPii(
|
|
706
|
+
`An error occurred during native auth V2 reset-password: '${error}'`,
|
|
707
|
+
correlationId
|
|
708
|
+
);
|
|
709
|
+
|
|
710
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
711
|
+
errorType: ResetPasswordStartErrorV2,
|
|
712
|
+
scenario: CustomAuthFlowScenarioV2.PasswordReset,
|
|
713
|
+
correlationId,
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
async signInV2(inputs: SignInInputsV2): Promise<SignInStartResultV2> {
|
|
719
|
+
const correlationId = this.getCorrelationId(inputs);
|
|
720
|
+
|
|
721
|
+
try {
|
|
722
|
+
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
723
|
+
"inputs",
|
|
724
|
+
inputs,
|
|
725
|
+
correlationId
|
|
726
|
+
);
|
|
727
|
+
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
728
|
+
"inputs.username",
|
|
729
|
+
inputs.username,
|
|
730
|
+
correlationId
|
|
731
|
+
);
|
|
732
|
+
if (inputs.claims) {
|
|
733
|
+
ArgumentValidator.ensureArgumentIsJSONString(
|
|
734
|
+
"inputs.claims",
|
|
735
|
+
inputs.claims,
|
|
736
|
+
correlationId
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
this.ensureUserNotSignedIn(correlationId);
|
|
740
|
+
|
|
741
|
+
this.logger.verbose(
|
|
742
|
+
"Starting native auth V2 sign-in.",
|
|
743
|
+
correlationId
|
|
744
|
+
);
|
|
745
|
+
|
|
746
|
+
const result = await this.flowClientV2.signIn({
|
|
747
|
+
correlationId,
|
|
748
|
+
username: inputs.username,
|
|
749
|
+
password: inputs.password,
|
|
750
|
+
scopes: inputs.scopes,
|
|
751
|
+
});
|
|
752
|
+
|
|
753
|
+
if (result.type === FLOW_COMPLETED_V2) {
|
|
754
|
+
return new CustomAuthResultV2(
|
|
755
|
+
new CompletedStateV2(),
|
|
756
|
+
new CustomAuthAccountData(
|
|
757
|
+
result.authenticationResult.account,
|
|
758
|
+
this.customAuthConfig,
|
|
759
|
+
this.cacheClient,
|
|
760
|
+
this.logger,
|
|
761
|
+
correlationId
|
|
762
|
+
),
|
|
763
|
+
CustomAuthFlowScenarioV2.SignIn
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
768
|
+
return new CustomAuthResultV2(
|
|
769
|
+
new MFARequiredStateV2({
|
|
770
|
+
correlationId: result.correlationId,
|
|
771
|
+
logger: this.logger,
|
|
772
|
+
config: this.customAuthConfig,
|
|
773
|
+
flowClient: this.flowClientV2,
|
|
774
|
+
continuationState: result.continuationState,
|
|
775
|
+
cacheClient: this.cacheClient,
|
|
776
|
+
methods: result.methods,
|
|
777
|
+
}),
|
|
778
|
+
undefined,
|
|
779
|
+
result.continuationState.scenario
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
784
|
+
return new CustomAuthResultV2(
|
|
785
|
+
new CodeRequiredStateV2({
|
|
786
|
+
correlationId: result.correlationId,
|
|
787
|
+
logger: this.logger,
|
|
788
|
+
config: this.customAuthConfig,
|
|
789
|
+
flowClient: this.flowClientV2,
|
|
790
|
+
continuationState: result.continuationState,
|
|
791
|
+
cacheClient: this.cacheClient,
|
|
792
|
+
method: result.method,
|
|
793
|
+
sentTo: result.sentTo,
|
|
794
|
+
channel: result.channel,
|
|
795
|
+
codeLength: result.codeLength,
|
|
796
|
+
}),
|
|
797
|
+
undefined,
|
|
798
|
+
result.continuationState.scenario
|
|
799
|
+
);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
if (result.type === FLOW_PASSWORD_REQUIRED_V2) {
|
|
803
|
+
return new CustomAuthResultV2(
|
|
804
|
+
new PasswordRequiredStateV2({
|
|
805
|
+
correlationId: result.correlationId,
|
|
806
|
+
logger: this.logger,
|
|
807
|
+
config: this.customAuthConfig,
|
|
808
|
+
flowClient: this.flowClientV2,
|
|
809
|
+
continuationState: result.continuationState,
|
|
810
|
+
cacheClient: this.cacheClient,
|
|
811
|
+
}),
|
|
812
|
+
undefined,
|
|
813
|
+
result.continuationState.scenario
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
throw new UnexpectedError(
|
|
818
|
+
"Unsupported native auth V2 sign-in result type.",
|
|
819
|
+
correlationId
|
|
820
|
+
);
|
|
821
|
+
} catch (error) {
|
|
822
|
+
this.logger.errorPii(
|
|
823
|
+
`An error occurred during native auth V2 sign-in: '${error}'`,
|
|
824
|
+
correlationId
|
|
825
|
+
);
|
|
826
|
+
|
|
827
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
828
|
+
errorType: SignInStartErrorV2,
|
|
829
|
+
scenario: CustomAuthFlowScenarioV2.SignIn,
|
|
830
|
+
correlationId,
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
async signUpV2(inputs: SignUpInputsV2): Promise<SignUpStartResultV2> {
|
|
836
|
+
const correlationId = this.getCorrelationId(inputs);
|
|
837
|
+
|
|
838
|
+
try {
|
|
839
|
+
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
840
|
+
"inputs",
|
|
841
|
+
inputs,
|
|
842
|
+
correlationId
|
|
843
|
+
);
|
|
844
|
+
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
845
|
+
"inputs.username",
|
|
846
|
+
inputs.username,
|
|
847
|
+
correlationId
|
|
848
|
+
);
|
|
849
|
+
if (Object.prototype.hasOwnProperty.call(inputs, "password")) {
|
|
850
|
+
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
851
|
+
"inputs.password",
|
|
852
|
+
inputs.password,
|
|
853
|
+
correlationId
|
|
854
|
+
);
|
|
855
|
+
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
856
|
+
"inputs.password",
|
|
857
|
+
inputs.password,
|
|
858
|
+
correlationId
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
this.ensureUserNotSignedIn(correlationId);
|
|
862
|
+
|
|
863
|
+
this.logger.verbose(
|
|
864
|
+
"Starting native auth V2 sign-up.",
|
|
865
|
+
correlationId
|
|
866
|
+
);
|
|
867
|
+
|
|
868
|
+
const result = await this.flowClientV2.signUp({
|
|
869
|
+
correlationId,
|
|
870
|
+
username: inputs.username,
|
|
871
|
+
password: inputs.password,
|
|
872
|
+
attributes: inputs.attributes,
|
|
873
|
+
scopes: inputs.scopes,
|
|
874
|
+
claims: inputs.claims,
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
const commonStateParameters = {
|
|
878
|
+
correlationId: result.correlationId,
|
|
879
|
+
logger: this.logger,
|
|
880
|
+
config: this.customAuthConfig,
|
|
881
|
+
flowClient: this.flowClientV2,
|
|
882
|
+
continuationState: result.continuationState,
|
|
883
|
+
cacheClient: this.cacheClient,
|
|
884
|
+
signUpStateTransitionHandler:
|
|
885
|
+
this.signUpStateTransitionHandlerV2,
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
889
|
+
return new CustomAuthResultV2(
|
|
890
|
+
new CodeRequiredStateV2({
|
|
891
|
+
...commonStateParameters,
|
|
892
|
+
sentTo: result.sentTo,
|
|
893
|
+
channel: result.channel,
|
|
894
|
+
codeLength: result.codeLength,
|
|
895
|
+
}),
|
|
896
|
+
undefined,
|
|
897
|
+
result.continuationState.scenario
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
if (result.type === FLOW_SIGN_UP_PASSWORD_REQUIRED_V2) {
|
|
902
|
+
return new CustomAuthResultV2(
|
|
903
|
+
new SignUpPasswordRequiredStateV2({
|
|
904
|
+
...commonStateParameters,
|
|
905
|
+
attributes: result.attributes,
|
|
906
|
+
requiredPasswordAttribute:
|
|
907
|
+
result.requiredPasswordAttribute,
|
|
908
|
+
}),
|
|
909
|
+
undefined,
|
|
910
|
+
result.continuationState.scenario
|
|
911
|
+
);
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
if (result.type === FLOW_ATTRIBUTES_REQUIRED_V2) {
|
|
915
|
+
return new CustomAuthResultV2(
|
|
916
|
+
new AttributesRequiredStateV2({
|
|
917
|
+
...commonStateParameters,
|
|
918
|
+
attributes: result.attributes,
|
|
919
|
+
}),
|
|
920
|
+
undefined,
|
|
921
|
+
result.continuationState.scenario
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
throw new UnexpectedError(
|
|
926
|
+
"Unsupported native auth V2 sign-up result type.",
|
|
927
|
+
correlationId
|
|
928
|
+
);
|
|
929
|
+
} catch (error) {
|
|
930
|
+
this.logger.errorPii(
|
|
931
|
+
`An error occurred during native auth V2 sign-up: '${error}'`,
|
|
932
|
+
correlationId
|
|
933
|
+
);
|
|
934
|
+
|
|
935
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
936
|
+
errorType: SignUpStartErrorV2,
|
|
937
|
+
scenario: CustomAuthFlowScenarioV2.SignUp,
|
|
938
|
+
correlationId,
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
584
943
|
private getCorrelationId(
|
|
585
944
|
actionInputs: CustomAuthActionInputs | undefined
|
|
586
945
|
): string {
|
|
@@ -11,9 +11,15 @@ import {
|
|
|
11
11
|
ResetPasswordInputs,
|
|
12
12
|
SignInInputs,
|
|
13
13
|
SignUpInputs,
|
|
14
|
+
ResetPasswordInputsV2,
|
|
15
|
+
SignInInputsV2,
|
|
16
|
+
SignUpInputsV2,
|
|
14
17
|
} from "../CustomAuthActionInputs.js";
|
|
15
18
|
import { ResetPasswordStartResult } from "../reset_password/auth_flow/result/ResetPasswordStartResult.js";
|
|
16
19
|
import { IController } from "../../controllers/IController.js";
|
|
20
|
+
import { ResetPasswordStartResultV2 } from "../core/auth_flow/v2/result/ResetPasswordStartResultV2.js";
|
|
21
|
+
import { SignInStartResultV2 } from "../sign_in/auth_flow/v2/result/SignInStartResultV2.js";
|
|
22
|
+
import { SignUpStartResultV2 } from "../sign_up/auth_flow/v2/result/SignUpStartResultV2.js";
|
|
17
23
|
|
|
18
24
|
/*
|
|
19
25
|
* Controller interface for standard authentication operations.
|
|
@@ -50,4 +56,12 @@ export interface ICustomAuthStandardController extends IController {
|
|
|
50
56
|
resetPassword(
|
|
51
57
|
resetPasswordInputs: ResetPasswordInputs
|
|
52
58
|
): Promise<ResetPasswordStartResult>;
|
|
59
|
+
|
|
60
|
+
signInV2(inputs: SignInInputsV2): Promise<SignInStartResultV2>;
|
|
61
|
+
|
|
62
|
+
signUpV2(inputs: SignUpInputsV2): Promise<SignUpStartResultV2>;
|
|
63
|
+
|
|
64
|
+
resetPasswordV2(
|
|
65
|
+
inputs: ResetPasswordInputsV2
|
|
66
|
+
): Promise<ResetPasswordStartResultV2>;
|
|
53
67
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An authentication method offered by the server during a native auth V2 flow.
|
|
8
|
+
* Each method describes one way the user can prove control of their account
|
|
9
|
+
* (for example an email one-time code), and is surfaced when the flow needs the
|
|
10
|
+
* app to pick a method before a challenge is issued. The app passes the selected
|
|
11
|
+
* method back to the SDK to request a challenge for it.
|
|
12
|
+
*/
|
|
13
|
+
export interface AuthenticationMethodV2 {
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
hint?: string;
|
|
17
|
+
challengeHref: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The native auth V2 flow that a result or error originates from (sign-in,
|
|
8
|
+
* sign-up, or password reset). It lets a shared result or error type report
|
|
9
|
+
* which entry flow produced it; `Unknown` is used when the flow cannot be
|
|
10
|
+
* determined.
|
|
11
|
+
*/
|
|
12
|
+
export const CustomAuthFlowScenarioV2 = {
|
|
13
|
+
SignIn: "signIn",
|
|
14
|
+
SignUp: "signUp",
|
|
15
|
+
PasswordReset: "passwordReset",
|
|
16
|
+
Unknown: "unknown",
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export type CustomAuthFlowScenarioV2 =
|
|
20
|
+
(typeof CustomAuthFlowScenarioV2)[keyof typeof CustomAuthFlowScenarioV2];
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { AuthError } from "@azure/msal-common/browser";
|
|
7
|
+
import { AuthFlowStateBase } from "../AuthFlowState.js";
|
|
8
|
+
import { CustomAuthError } from "../../error/CustomAuthError.js";
|
|
9
|
+
import { MsalCustomAuthError } from "../../error/MsalCustomAuthError.js";
|
|
10
|
+
import { UnexpectedError } from "../../error/UnexpectedError.js";
|
|
11
|
+
import { FailedStateV2 } from "./state/FailedStateV2.js";
|
|
12
|
+
import { AuthFlowErrorBaseV2 } from "./error/AuthFlowErrorBaseV2.js";
|
|
13
|
+
import { CustomAuthFlowScenarioV2 } from "./CustomAuthFlowScenarioV2.js";
|
|
14
|
+
|
|
15
|
+
type CreateWithErrorOptions<TError extends AuthFlowErrorBaseV2> = {
|
|
16
|
+
errorType: new (
|
|
17
|
+
errorData: CustomAuthError,
|
|
18
|
+
scenario?: CustomAuthFlowScenarioV2
|
|
19
|
+
) => TError;
|
|
20
|
+
scenario?: CustomAuthFlowScenarioV2;
|
|
21
|
+
correlationId?: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Result of a native auth V2 operation. Use {@link CustomAuthResultV2.isState}
|
|
26
|
+
* to narrow the state before accessing its members.
|
|
27
|
+
*/
|
|
28
|
+
export class CustomAuthResultV2<
|
|
29
|
+
TState extends AuthFlowStateBase,
|
|
30
|
+
TError extends AuthFlowErrorBaseV2,
|
|
31
|
+
TData = void
|
|
32
|
+
> {
|
|
33
|
+
constructor(
|
|
34
|
+
public readonly state: TState,
|
|
35
|
+
public readonly data?: TData,
|
|
36
|
+
public readonly scenario: CustomAuthFlowScenarioV2 = CustomAuthFlowScenarioV2.Unknown
|
|
37
|
+
) {}
|
|
38
|
+
|
|
39
|
+
error?: TError;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Narrows the result to a specific state by its `stateType` discriminator.
|
|
43
|
+
* A successful match makes the state's properties available without a cast.
|
|
44
|
+
* @param stateType - The state type to test for.
|
|
45
|
+
* @returns True (and narrows `state`) when the current state matches `stateType`.
|
|
46
|
+
*/
|
|
47
|
+
isState<TType extends TState["stateType"]>(
|
|
48
|
+
stateType: TType
|
|
49
|
+
): this is this & { state: Extract<TState, { stateType: TType }> } {
|
|
50
|
+
return this.state.stateType === stateType;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Checks whether the result is in the terminal failed state. A failed result
|
|
55
|
+
* contains the flow-specific error.
|
|
56
|
+
* @returns True (and narrows `state`) when the operation failed.
|
|
57
|
+
*/
|
|
58
|
+
isFailed(): this is this & {
|
|
59
|
+
state: Extract<TState, { stateType: "failed" }>;
|
|
60
|
+
} {
|
|
61
|
+
return this.state.stateType === "failed";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Creates a failed result from the supplied error. The result uses the
|
|
66
|
+
* shared {@link FailedStateV2} terminal state.
|
|
67
|
+
* @param error - The error that occurred.
|
|
68
|
+
* @param options - The flow-error type and error context.
|
|
69
|
+
* @returns A failed result carrying the flow-specific error.
|
|
70
|
+
*/
|
|
71
|
+
static createWithError<
|
|
72
|
+
TState extends AuthFlowStateBase,
|
|
73
|
+
TError extends AuthFlowErrorBaseV2,
|
|
74
|
+
TData = void
|
|
75
|
+
>(
|
|
76
|
+
error: unknown,
|
|
77
|
+
options: CreateWithErrorOptions<TError>
|
|
78
|
+
): CustomAuthResultV2<TState | FailedStateV2, TError, TData> {
|
|
79
|
+
const {
|
|
80
|
+
errorType: ErrorType,
|
|
81
|
+
scenario = CustomAuthFlowScenarioV2.Unknown,
|
|
82
|
+
correlationId,
|
|
83
|
+
} = options;
|
|
84
|
+
const errorData = CustomAuthResultV2.createErrorData(
|
|
85
|
+
error,
|
|
86
|
+
correlationId
|
|
87
|
+
);
|
|
88
|
+
const flowError = new ErrorType(errorData, scenario);
|
|
89
|
+
|
|
90
|
+
const result = new CustomAuthResultV2<
|
|
91
|
+
TState | FailedStateV2,
|
|
92
|
+
TError,
|
|
93
|
+
TData
|
|
94
|
+
>(new FailedStateV2(), undefined, scenario);
|
|
95
|
+
result.error = flowError;
|
|
96
|
+
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private static createErrorData(
|
|
101
|
+
error: unknown,
|
|
102
|
+
correlationId?: string
|
|
103
|
+
): CustomAuthError {
|
|
104
|
+
if (error instanceof CustomAuthError) {
|
|
105
|
+
return error;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (error instanceof AuthError) {
|
|
109
|
+
const errorCodes: number[] = [];
|
|
110
|
+
|
|
111
|
+
if ("errorNo" in error) {
|
|
112
|
+
if (typeof error.errorNo === "string") {
|
|
113
|
+
const code = Number(error.errorNo);
|
|
114
|
+
if (!isNaN(code)) {
|
|
115
|
+
errorCodes.push(code);
|
|
116
|
+
}
|
|
117
|
+
} else if (typeof error.errorNo === "number") {
|
|
118
|
+
errorCodes.push(error.errorNo);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return new MsalCustomAuthError(
|
|
123
|
+
error.errorCode,
|
|
124
|
+
error.errorMessage,
|
|
125
|
+
error.subError,
|
|
126
|
+
errorCodes,
|
|
127
|
+
error.correlationId
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return new UnexpectedError(error, correlationId);
|
|
132
|
+
}
|
|
133
|
+
}
|