@azure/msal-browser 5.27.0 → 5.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +9 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +7 -6
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +4 -2
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +21 -7
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +14 -1
- package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +9 -2
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +65 -7
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +14 -1
- package/dist/crypto/TokenBindingKeyManager.mjs.map +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +6 -4
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +58 -50
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +3 -5
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +19 -13
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +8 -2
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +58 -69
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +68 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +44 -16
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +100 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +5 -3
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +27 -19
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +2 -4
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +2 -3
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +20 -8
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +110 -0
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs +2 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +465 -186
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +2 -6
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +18 -3
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +10 -8
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +147 -38
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +21 -10
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +2 -12
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +2 -2
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +15 -3
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +10 -3
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +17 -2
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom_auth/index.mjs +6 -3
- package/dist/custom_auth/index.mjs.map +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +49 -14
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +24 -0
- package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +4 -7
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +2 -2
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +17 -8
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +78 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +48 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +49 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs.map +1 -0
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +21 -21
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +526 -90
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +27 -20
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +29 -14
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +44 -32
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +77 -25
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +21 -13
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +35 -11
- package/dist/request/RequestHelpers.mjs.map +1 -1
- package/dist/request/SilentRequestHelpers.mjs +6 -6
- package/dist/request/SilentRequestHelpers.mjs.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +3 -2
- package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserDetection.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +1 -1
- package/dist/utils/PopupOriginCheck.mjs +1 -1
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
- package/dist/webBrokerBridge/index.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +69 -17
- package/lib/custom-auth-path/msal-custom-auth.cjs +2394 -920
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +2394 -920
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +23 -11
- package/lib/msal-browser.cjs +943 -278
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +943 -278
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +15 -0
- package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +6 -21
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +3 -1
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +12 -8
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +31 -0
- package/src/cache/AsyncMemoryStorage.ts +16 -0
- package/src/cache/BrowserCacheManager.ts +19 -1
- package/src/controllers/StandardController.ts +107 -11
- package/src/crypto/TokenBindingKeyManager.ts +21 -0
- package/src/custom_auth/CustomAuthActionInputs.ts +12 -5
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +5 -3
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +5 -3
- package/src/custom_auth/controller/CustomAuthStandardController.ts +79 -92
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +14 -0
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +1 -4
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +5 -4
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +28 -16
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +6 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +83 -72
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +23 -0
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +28 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +10 -6
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +9 -6
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +4 -6
- package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +36 -0
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +8 -8
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +94 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +68 -14
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +150 -0
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +8 -2
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +48 -24
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +1 -3
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +24 -2
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +1 -2
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +34 -9
- package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +179 -0
- package/src/custom_auth/core/error/InvalidArgumentError.ts +1 -1
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +13 -12
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +771 -261
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +2 -6
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +27 -15
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +97 -26
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +9 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +330 -63
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +51 -15
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +25 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +0 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +48 -48
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +44 -37
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +32 -15
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +14 -10
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +24 -1
- package/src/custom_auth/core/telemetry/PublicApiId.ts +7 -0
- package/src/custom_auth/core/utils/ArgumentValidator.ts +26 -0
- package/src/custom_auth/index.ts +21 -11
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +8 -10
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +71 -16
- package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.ts +30 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +4 -8
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +4 -5
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +3 -6
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +0 -3
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +2 -3
- package/src/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.ts +49 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +8 -4
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +18 -4
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +26 -5
- package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.ts +101 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.ts +53 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.ts +97 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +0 -6
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +33 -43
- package/src/interaction_client/PlatformAuthInteractionClient.ts +886 -148
- package/src/interaction_client/PopupClient.ts +104 -83
- package/src/interaction_client/RedirectClient.ts +88 -34
- package/src/interaction_client/SilentIframeClient.ts +121 -95
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +46 -18
- package/src/request/RequestHelpers.ts +64 -11
- package/src/request/SilentRequestHelpers.ts +8 -9
- package/src/telemetry/BrowserPerformanceEvents.ts +1 -0
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +6 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +21 -0
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/cache/AsyncMemoryStorage.d.ts +5 -0
- package/types/cache/AsyncMemoryStorage.d.ts.map +1 -1
- package/types/cache/BrowserCacheManager.d.ts +4 -0
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +5 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/crypto/TokenBindingKeyManager.d.ts +9 -0
- package/types/crypto/TokenBindingKeyManager.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +12 -5
- package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +5 -3
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +5 -3
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts +2 -0
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +10 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +1 -4
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +5 -4
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +17 -8
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +6 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +23 -44
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +14 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +16 -0
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +7 -6
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +8 -7
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +4 -6
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +20 -0
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +7 -8
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +22 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +3 -6
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +28 -0
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +3 -2
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +6 -8
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +1 -3
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +18 -2
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +1 -2
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +5 -6
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +23 -0
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/core/error/InvalidArgumentError.d.ts +1 -0
- package/types/custom_auth/core/error/InvalidArgumentError.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +9 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +19 -10
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +1 -1
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +19 -5
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +39 -4
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +8 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +8 -2
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +4 -3
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +13 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +36 -9
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +30 -17
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +18 -4
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +8 -11
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +2 -1
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +7 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts +3 -0
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +10 -5
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +7 -11
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +7 -5
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts +7 -0
- package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts.map +1 -0
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -8
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +5 -5
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +3 -6
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts +3 -2
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts +27 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +6 -3
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +13 -3
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +8 -3
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts +24 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts +18 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts +7 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +0 -4
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +5 -4
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts +110 -8
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/protocol/Authorize.d.ts +4 -4
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/RequestHelpers.d.ts +21 -3
- package/types/request/RequestHelpers.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +1 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +0 -70
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +0 -25
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +0 -45
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +0 -1
- package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +0 -23
- package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +0 -19
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -20
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +0 -97
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +0 -34
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -61
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +0 -14
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts +0 -13
- package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -8
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -17
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +0 -11
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +0 -19
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +0 -1
|
@@ -246,7 +246,6 @@ export class StandardController implements IController {
|
|
|
246
246
|
this.browserCrypto = DEFAULT_CRYPTO_IMPLEMENTATION;
|
|
247
247
|
this.tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER;
|
|
248
248
|
}
|
|
249
|
-
|
|
250
249
|
this.eventHandler = new EventHandler(this.logger);
|
|
251
250
|
|
|
252
251
|
// Initialize the browser storage class.
|
|
@@ -769,6 +768,10 @@ export class StandardController implements IController {
|
|
|
769
768
|
const platformAuthProvider = this.platformAuthProvider;
|
|
770
769
|
|
|
771
770
|
if (this.canUsePlatformBroker(request) && platformAuthProvider) {
|
|
771
|
+
const nativeRequest = this.sanitizeNativeBrokerRequest(
|
|
772
|
+
request,
|
|
773
|
+
correlationId
|
|
774
|
+
);
|
|
772
775
|
const nativeClient = new PlatformAuthInteractionClient(
|
|
773
776
|
this.config,
|
|
774
777
|
this.browserStorage,
|
|
@@ -790,7 +793,7 @@ export class StandardController implements IController {
|
|
|
790
793
|
this.logger,
|
|
791
794
|
this.performanceClient,
|
|
792
795
|
correlationId
|
|
793
|
-
)(
|
|
796
|
+
)(nativeRequest, atrMeasurement).catch((e: AuthError) => {
|
|
794
797
|
if (
|
|
795
798
|
e instanceof NativeAuthError &&
|
|
796
799
|
isFatalNativeAuthError(e)
|
|
@@ -1646,6 +1649,12 @@ export class StandardController implements IController {
|
|
|
1646
1649
|
INTERACTION_TYPE.SIGNOUT
|
|
1647
1650
|
);
|
|
1648
1651
|
|
|
1652
|
+
try {
|
|
1653
|
+
await this.clearNativeCache(logoutRequest?.account, correlationId);
|
|
1654
|
+
} catch (error) {
|
|
1655
|
+
this.browserStorage.setInteractionInProgress(false);
|
|
1656
|
+
throw error;
|
|
1657
|
+
}
|
|
1649
1658
|
const redirectClient = this.createRedirectClient(correlationId);
|
|
1650
1659
|
return redirectClient.logout(logoutRequest);
|
|
1651
1660
|
}
|
|
@@ -1664,9 +1673,16 @@ export class StandardController implements IController {
|
|
|
1664
1673
|
);
|
|
1665
1674
|
|
|
1666
1675
|
const popupClient = this.createPopupClient(correlationId);
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1676
|
+
const nativeCacheClear = this.clearNativeCache(
|
|
1677
|
+
logoutRequest?.account,
|
|
1678
|
+
correlationId
|
|
1679
|
+
);
|
|
1680
|
+
const popupLogout = popupClient.logout(logoutRequest);
|
|
1681
|
+
return Promise.all([nativeCacheClear, popupLogout])
|
|
1682
|
+
.then(() => undefined)
|
|
1683
|
+
.finally(() => {
|
|
1684
|
+
this.browserStorage.setInteractionInProgress(false);
|
|
1685
|
+
});
|
|
1670
1686
|
} catch (e) {
|
|
1671
1687
|
// Since this function is syncronous we need to reject
|
|
1672
1688
|
return Promise.reject(e);
|
|
@@ -1683,7 +1699,53 @@ export class StandardController implements IController {
|
|
|
1683
1699
|
}
|
|
1684
1700
|
const correlationId = this.getRequestCorrelationId(logoutRequest);
|
|
1685
1701
|
const cacheClient = this.createSilentCacheClient(correlationId);
|
|
1686
|
-
|
|
1702
|
+
const nativeCacheClear = this.clearNativeCache(
|
|
1703
|
+
logoutRequest?.account,
|
|
1704
|
+
correlationId
|
|
1705
|
+
);
|
|
1706
|
+
const browserCacheClear = cacheClient.logout(logoutRequest);
|
|
1707
|
+
await Promise.all([nativeCacheClear, browserCacheClear]);
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
private async clearNativeCache(
|
|
1711
|
+
account: AccountInfo | null | undefined,
|
|
1712
|
+
correlationId: string
|
|
1713
|
+
): Promise<void> {
|
|
1714
|
+
const homeAccountId = account?.homeAccountId.toLowerCase();
|
|
1715
|
+
const environment = account?.environment.toLowerCase();
|
|
1716
|
+
const accessTokenKeys = this.nativeInternalStorage
|
|
1717
|
+
.getTokenKeys()
|
|
1718
|
+
.accessToken.filter((key) => {
|
|
1719
|
+
if (!account) {
|
|
1720
|
+
return true;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
const accessToken =
|
|
1724
|
+
this.nativeInternalStorage.getAccessTokenCredential(
|
|
1725
|
+
key,
|
|
1726
|
+
correlationId
|
|
1727
|
+
);
|
|
1728
|
+
if (!accessToken) {
|
|
1729
|
+
return false;
|
|
1730
|
+
}
|
|
1731
|
+
return (
|
|
1732
|
+
accessToken.homeAccountId.toLowerCase() === homeAccountId &&
|
|
1733
|
+
accessToken.environment.toLowerCase() === environment
|
|
1734
|
+
);
|
|
1735
|
+
});
|
|
1736
|
+
|
|
1737
|
+
await Promise.all(
|
|
1738
|
+
accessTokenKeys.map((key) =>
|
|
1739
|
+
this.nativeInternalStorage.removeAccessTokenAndTokenBindingKey(
|
|
1740
|
+
key,
|
|
1741
|
+
correlationId
|
|
1742
|
+
)
|
|
1743
|
+
)
|
|
1744
|
+
);
|
|
1745
|
+
|
|
1746
|
+
if (!account) {
|
|
1747
|
+
this.nativeInternalStorage.clear(correlationId);
|
|
1748
|
+
}
|
|
1687
1749
|
}
|
|
1688
1750
|
|
|
1689
1751
|
// #endregion
|
|
@@ -1854,6 +1916,27 @@ export class StandardController implements IController {
|
|
|
1854
1916
|
|
|
1855
1917
|
// #region Helpers
|
|
1856
1918
|
|
|
1919
|
+
/**
|
|
1920
|
+
* Removes internal DPoP key state from application-originated broker requests.
|
|
1921
|
+
*/
|
|
1922
|
+
private sanitizeNativeBrokerRequest<T extends { dpopJkt?: string }>(
|
|
1923
|
+
request: T,
|
|
1924
|
+
correlationId: string
|
|
1925
|
+
): T {
|
|
1926
|
+
if (!request.dpopJkt) {
|
|
1927
|
+
return request;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
this.logger.warning(
|
|
1931
|
+
"Ignoring caller-provided dpopJkt for a direct platform broker request.",
|
|
1932
|
+
correlationId
|
|
1933
|
+
);
|
|
1934
|
+
return {
|
|
1935
|
+
...request,
|
|
1936
|
+
dpopJkt: undefined,
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1857
1940
|
/**
|
|
1858
1941
|
* Acquire a token from native device (e.g. WAM)
|
|
1859
1942
|
* @param request
|
|
@@ -1896,6 +1979,10 @@ export class StandardController implements IController {
|
|
|
1896
1979
|
correlationId,
|
|
1897
1980
|
this.tokenBindingKeyManager
|
|
1898
1981
|
);
|
|
1982
|
+
const nativeRequest = this.sanitizeNativeBrokerRequest(
|
|
1983
|
+
request,
|
|
1984
|
+
correlationId
|
|
1985
|
+
);
|
|
1899
1986
|
|
|
1900
1987
|
return invokeAsync(
|
|
1901
1988
|
nativeClient.acquireToken.bind(nativeClient),
|
|
@@ -1903,7 +1990,7 @@ export class StandardController implements IController {
|
|
|
1903
1990
|
this.logger,
|
|
1904
1991
|
this.performanceClient,
|
|
1905
1992
|
correlationId
|
|
1906
|
-
)(
|
|
1993
|
+
)(nativeRequest, cacheLookupPolicy);
|
|
1907
1994
|
}
|
|
1908
1995
|
|
|
1909
1996
|
/**
|
|
@@ -2353,13 +2440,18 @@ export class StandardController implements IController {
|
|
|
2353
2440
|
this.performanceClient
|
|
2354
2441
|
);
|
|
2355
2442
|
|
|
2356
|
-
const
|
|
2357
|
-
preparedRequest.
|
|
2358
|
-
|
|
2443
|
+
const shouldDeduplicate =
|
|
2444
|
+
preparedRequest.request.authenticationScheme !==
|
|
2445
|
+
Constants.AuthenticationScheme.DPOP;
|
|
2446
|
+
const inProgressRequest = shouldDeduplicate
|
|
2447
|
+
? this.activeSilentTokenRequests.get(preparedRequest.key)
|
|
2448
|
+
: undefined;
|
|
2359
2449
|
|
|
2360
2450
|
if (typeof inProgressRequest === "undefined") {
|
|
2361
2451
|
this.logger.verbose(
|
|
2362
|
-
|
|
2452
|
+
shouldDeduplicate
|
|
2453
|
+
? "acquireTokenSilent called for the first time, storing active request"
|
|
2454
|
+
: "acquireTokenSilent called for DPoP request, starting an independent operation",
|
|
2363
2455
|
correlationId
|
|
2364
2456
|
);
|
|
2365
2457
|
this.performanceClient.addFields({ deduped: false }, correlationId);
|
|
@@ -2377,6 +2469,10 @@ export class StandardController implements IController {
|
|
|
2377
2469
|
},
|
|
2378
2470
|
preparedRequest.account
|
|
2379
2471
|
);
|
|
2472
|
+
if (!shouldDeduplicate) {
|
|
2473
|
+
return activeRequest;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2380
2476
|
this.activeSilentTokenRequests.set(
|
|
2381
2477
|
preparedRequest.key,
|
|
2382
2478
|
activeRequest
|
|
@@ -147,6 +147,16 @@ export class TokenBindingKeyManager implements ITokenBindingKeyManager {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Returns whether a browser token-binding key is available.
|
|
152
|
+
*/
|
|
153
|
+
async hasTokenBindingKey(
|
|
154
|
+
keyId: string,
|
|
155
|
+
correlationId: string
|
|
156
|
+
): Promise<boolean> {
|
|
157
|
+
return this.cache.containsKey(keyId, correlationId);
|
|
158
|
+
}
|
|
159
|
+
|
|
150
160
|
/**
|
|
151
161
|
* Clears browser token-binding keys from memory and persistent storage.
|
|
152
162
|
* @param correlationId - Request correlation identifier.
|
|
@@ -260,6 +270,17 @@ export class TokenBindingKeyManager implements ITokenBindingKeyManager {
|
|
|
260
270
|
return cachedKeyPair;
|
|
261
271
|
}
|
|
262
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Returns whether a browser token-binding key survived in persistent
|
|
275
|
+
* storage and can be restored after a redirect navigation.
|
|
276
|
+
*/
|
|
277
|
+
async isTokenBindingKeyPersisted(
|
|
278
|
+
keyId: string,
|
|
279
|
+
correlationId: string
|
|
280
|
+
): Promise<boolean> {
|
|
281
|
+
return this.cache.containsKeyInPersistentStorage(keyId, correlationId);
|
|
282
|
+
}
|
|
283
|
+
|
|
263
284
|
/** @internal */
|
|
264
285
|
getTokenBindingKeyTelemetry(
|
|
265
286
|
cachedKeyPair: CachedKeyPair,
|
|
@@ -39,23 +39,30 @@ export type SignInWithContinuationTokenInputs = {
|
|
|
39
39
|
claims?: string;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
44
|
+
*/
|
|
42
45
|
export type SignInInputsV2 = CustomAuthActionInputs & {
|
|
43
46
|
username: string;
|
|
44
|
-
|
|
45
|
-
scopes?: Array<string> | null;
|
|
47
|
+
scopes?: Array<string>;
|
|
46
48
|
claims?: string;
|
|
47
49
|
};
|
|
48
50
|
|
|
51
|
+
/**
|
|
52
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
53
|
+
*/
|
|
49
54
|
export type ResetPasswordInputsV2 = CustomAuthActionInputs & {
|
|
50
55
|
username: string;
|
|
51
|
-
scopes?: Array<string
|
|
56
|
+
scopes?: Array<string>;
|
|
52
57
|
claims?: string;
|
|
53
58
|
};
|
|
54
59
|
|
|
60
|
+
/**
|
|
61
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
62
|
+
*/
|
|
55
63
|
export type SignUpInputsV2 = CustomAuthActionInputs & {
|
|
56
64
|
username: string;
|
|
57
|
-
password?: string;
|
|
58
65
|
attributes?: UserAccountAttributes;
|
|
59
|
-
scopes?: Array<string
|
|
66
|
+
scopes?: Array<string>;
|
|
60
67
|
claims?: string;
|
|
61
68
|
};
|
|
@@ -121,8 +121,8 @@ export class CustomAuthPublicClientApplication
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
* Starts native auth V2 sign-in
|
|
125
|
-
*
|
|
124
|
+
* Starts native auth V2 sign-in.
|
|
125
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
126
126
|
* @param inputs - Inputs for the sign-in V2 flow.
|
|
127
127
|
* @returns A promise that resolves to the sign-in start result.
|
|
128
128
|
*/
|
|
@@ -132,6 +132,7 @@ export class CustomAuthPublicClientApplication
|
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* Starts native auth V2 sign-up.
|
|
135
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
135
136
|
* @param inputs - Inputs for the sign-up V2 flow.
|
|
136
137
|
* @returns A promise that resolves to the sign-up start result.
|
|
137
138
|
*/
|
|
@@ -140,7 +141,8 @@ export class CustomAuthPublicClientApplication
|
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
|
-
*
|
|
144
|
+
* Starts native auth V2 self-service password reset.
|
|
145
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
144
146
|
* @param {ResetPasswordInputsV2} inputs - Inputs for the reset-password V2 flow
|
|
145
147
|
* @returns {Promise<ResetPasswordStartResultV2>} - A promise that resolves to ResetPasswordStartResultV2
|
|
146
148
|
*/
|
|
@@ -19,8 +19,8 @@ import { SignUpStartResultV2 } from "./sign_up/auth_flow/v2/result/SignUpStartRe
|
|
|
19
19
|
export interface ICustomAuthPublicClientApplicationV2
|
|
20
20
|
extends ICustomAuthPublicClientApplication {
|
|
21
21
|
/**
|
|
22
|
-
* Starts native auth V2 sign-in
|
|
23
|
-
*
|
|
22
|
+
* Starts native auth V2 sign-in.
|
|
23
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
24
24
|
* @param inputs - Inputs for the sign-in V2 flow.
|
|
25
25
|
* @returns A promise that resolves to the sign-in start result.
|
|
26
26
|
*/
|
|
@@ -28,13 +28,15 @@ export interface ICustomAuthPublicClientApplicationV2
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Starts native auth V2 sign-up.
|
|
31
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
31
32
|
* @param inputs - Inputs for the sign-up V2 flow.
|
|
32
33
|
* @returns A promise that resolves to the sign-up start result.
|
|
33
34
|
*/
|
|
34
35
|
signUpV2(inputs: SignUpInputsV2): Promise<SignUpStartResultV2>;
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* Starts native auth V2 self-service password reset.
|
|
39
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
38
40
|
* @param {ResetPasswordInputsV2} inputs - Inputs for the reset-password V2 flow
|
|
39
41
|
* @returns {Promise<ResetPasswordStartResultV2>} A promise that resolves to ResetPasswordStartResultV2
|
|
40
42
|
*/
|
|
@@ -35,23 +35,21 @@ import { CustomAuthFlowScenarioV2 } from "../core/auth_flow/v2/CustomAuthFlowSce
|
|
|
35
35
|
import { SignInStartResultV2 } from "../sign_in/auth_flow/v2/result/SignInStartResultV2.js";
|
|
36
36
|
import { SignUpStartResultV2 } from "../sign_up/auth_flow/v2/result/SignUpStartResultV2.js";
|
|
37
37
|
import {
|
|
38
|
-
FLOW_COMPLETED_V2,
|
|
39
|
-
FLOW_ATTRIBUTES_REQUIRED_V2,
|
|
40
38
|
FLOW_CODE_REQUIRED_V2,
|
|
39
|
+
FLOW_EXISTING_ACCOUNT_CODE_REQUIRED_V2,
|
|
40
|
+
FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2,
|
|
41
41
|
FLOW_METHOD_SELECTION_REQUIRED_V2,
|
|
42
|
-
FLOW_MFA_REQUIRED_V2,
|
|
43
42
|
FLOW_PASSWORD_REQUIRED_V2,
|
|
44
|
-
FLOW_SIGN_UP_PASSWORD_REQUIRED_V2,
|
|
45
43
|
} from "../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
46
44
|
import { AuthenticationFactorV2 } from "../core/network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
47
45
|
import { CodeRequiredStateV2 } from "../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
48
46
|
import { AuthMethodSelectionRequiredStateV2 } from "../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
49
|
-
import { CompletedStateV2 } from "../core/auth_flow/v2/state/CompletedStateV2.js";
|
|
50
47
|
import { SignInStateTransitionHandlerV2 } from "../sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.js";
|
|
51
|
-
import {
|
|
48
|
+
import { ResetPasswordStateTransitionHandlerV2 } from "../reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.js";
|
|
49
|
+
import { PasswordRequiredStateV2 } from "../core/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
52
50
|
import { SignUpStateTransitionHandlerV2 } from "../sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.js";
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
51
|
+
import { ExistingAccountCodeRequiredStateV2 } from "../sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.js";
|
|
52
|
+
import { ExistingAccountPasswordRequiredStateV2 } from "../sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.js";
|
|
55
53
|
import { CustomAuthAuthority } from "../core/CustomAuthAuthority.js";
|
|
56
54
|
import { DefaultPackageInfo } from "../CustomAuthConstants.js";
|
|
57
55
|
import {
|
|
@@ -109,6 +107,8 @@ export class CustomAuthStandardController
|
|
|
109
107
|
new SignUpStateTransitionHandlerV2();
|
|
110
108
|
private readonly signInStateTransitionHandlerV2 =
|
|
111
109
|
new SignInStateTransitionHandlerV2();
|
|
110
|
+
private readonly resetPasswordStateTransitionHandlerV2 =
|
|
111
|
+
new ResetPasswordStateTransitionHandlerV2();
|
|
112
112
|
|
|
113
113
|
/*
|
|
114
114
|
* Constructor for CustomAuthStandardController.
|
|
@@ -648,11 +648,7 @@ export class CustomAuthStandardController
|
|
|
648
648
|
correlationId
|
|
649
649
|
);
|
|
650
650
|
|
|
651
|
-
|
|
652
|
-
"inputs.username",
|
|
653
|
-
inputs.username,
|
|
654
|
-
correlationId
|
|
655
|
-
);
|
|
651
|
+
this.ensureUsernameIsValidV2(inputs.username, correlationId);
|
|
656
652
|
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
657
653
|
ArgumentValidator.ensureArgumentIsStringArray(
|
|
658
654
|
"inputs.scopes",
|
|
@@ -695,6 +691,8 @@ export class CustomAuthStandardController
|
|
|
695
691
|
flowClient: this.flowClientV2,
|
|
696
692
|
continuationState: result.continuationState,
|
|
697
693
|
cacheClient: this.cacheClient,
|
|
694
|
+
resetPasswordStateTransitionHandler:
|
|
695
|
+
this.resetPasswordStateTransitionHandlerV2,
|
|
698
696
|
method: result.method,
|
|
699
697
|
sentTo: result.sentTo,
|
|
700
698
|
channel: result.channel,
|
|
@@ -715,6 +713,8 @@ export class CustomAuthStandardController
|
|
|
715
713
|
cacheClient: this.cacheClient,
|
|
716
714
|
methods: result.methods,
|
|
717
715
|
authenticationFactor: AuthenticationFactorV2.SINGLE_FACTOR,
|
|
716
|
+
resetPasswordStateTransitionHandler:
|
|
717
|
+
this.resetPasswordStateTransitionHandlerV2,
|
|
718
718
|
}),
|
|
719
719
|
undefined,
|
|
720
720
|
result.continuationState.scenario
|
|
@@ -741,11 +741,7 @@ export class CustomAuthStandardController
|
|
|
741
741
|
inputs,
|
|
742
742
|
correlationId
|
|
743
743
|
);
|
|
744
|
-
|
|
745
|
-
"inputs.username",
|
|
746
|
-
inputs.username,
|
|
747
|
-
correlationId
|
|
748
|
-
);
|
|
744
|
+
this.ensureUsernameIsValidV2(inputs.username, correlationId);
|
|
749
745
|
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
750
746
|
ArgumentValidator.ensureArgumentIsStringArray(
|
|
751
747
|
"inputs.scopes",
|
|
@@ -770,25 +766,10 @@ export class CustomAuthStandardController
|
|
|
770
766
|
const result = await this.flowClientV2.signIn({
|
|
771
767
|
correlationId,
|
|
772
768
|
username: inputs.username,
|
|
773
|
-
password: inputs.password,
|
|
774
769
|
scopes: inputs.scopes,
|
|
775
770
|
claims: inputs.claims,
|
|
776
771
|
});
|
|
777
772
|
|
|
778
|
-
if (result.type === FLOW_COMPLETED_V2) {
|
|
779
|
-
return new CustomAuthResultV2(
|
|
780
|
-
new CompletedStateV2(),
|
|
781
|
-
new CustomAuthAccountData(
|
|
782
|
-
result.authenticationResult.account,
|
|
783
|
-
this.customAuthConfig,
|
|
784
|
-
this.cacheClient,
|
|
785
|
-
this.logger,
|
|
786
|
-
correlationId
|
|
787
|
-
),
|
|
788
|
-
CustomAuthFlowScenarioV2.SignIn
|
|
789
|
-
);
|
|
790
|
-
}
|
|
791
|
-
|
|
792
773
|
if (result.type === FLOW_PASSWORD_REQUIRED_V2) {
|
|
793
774
|
return new CustomAuthResultV2(
|
|
794
775
|
new PasswordRequiredStateV2({
|
|
@@ -845,24 +826,6 @@ export class CustomAuthStandardController
|
|
|
845
826
|
);
|
|
846
827
|
}
|
|
847
828
|
|
|
848
|
-
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
849
|
-
return new CustomAuthResultV2(
|
|
850
|
-
new AuthMethodSelectionRequiredStateV2({
|
|
851
|
-
correlationId: result.correlationId,
|
|
852
|
-
logger: this.logger,
|
|
853
|
-
config: this.customAuthConfig,
|
|
854
|
-
flowClient: this.flowClientV2,
|
|
855
|
-
continuationState: result.continuationState,
|
|
856
|
-
cacheClient: this.cacheClient,
|
|
857
|
-
methods: result.methods,
|
|
858
|
-
authenticationFactor:
|
|
859
|
-
AuthenticationFactorV2.MULTI_FACTOR,
|
|
860
|
-
}),
|
|
861
|
-
undefined,
|
|
862
|
-
result.continuationState.scenario
|
|
863
|
-
);
|
|
864
|
-
}
|
|
865
|
-
|
|
866
829
|
throw new UnexpectedError(
|
|
867
830
|
"Unsupported native auth V2 sign-in result type.",
|
|
868
831
|
correlationId
|
|
@@ -889,23 +852,7 @@ export class CustomAuthStandardController
|
|
|
889
852
|
inputs,
|
|
890
853
|
correlationId
|
|
891
854
|
);
|
|
892
|
-
|
|
893
|
-
"inputs.username",
|
|
894
|
-
inputs.username,
|
|
895
|
-
correlationId
|
|
896
|
-
);
|
|
897
|
-
if (Object.prototype.hasOwnProperty.call(inputs, "password")) {
|
|
898
|
-
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
899
|
-
"inputs.password",
|
|
900
|
-
inputs.password,
|
|
901
|
-
correlationId
|
|
902
|
-
);
|
|
903
|
-
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
904
|
-
"inputs.password",
|
|
905
|
-
inputs.password,
|
|
906
|
-
correlationId
|
|
907
|
-
);
|
|
908
|
-
}
|
|
855
|
+
this.ensureUsernameIsValidV2(inputs.username, correlationId);
|
|
909
856
|
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
910
857
|
ArgumentValidator.ensureArgumentIsStringArray(
|
|
911
858
|
"inputs.scopes",
|
|
@@ -930,27 +877,22 @@ export class CustomAuthStandardController
|
|
|
930
877
|
const result = await this.flowClientV2.signUp({
|
|
931
878
|
correlationId,
|
|
932
879
|
username: inputs.username,
|
|
933
|
-
password: inputs.password,
|
|
934
|
-
attributes: inputs.attributes,
|
|
935
880
|
scopes: inputs.scopes,
|
|
936
881
|
claims: inputs.claims,
|
|
882
|
+
attributes: inputs.attributes,
|
|
937
883
|
});
|
|
938
884
|
|
|
939
|
-
const commonStateParameters = {
|
|
940
|
-
correlationId: result.correlationId,
|
|
941
|
-
logger: this.logger,
|
|
942
|
-
config: this.customAuthConfig,
|
|
943
|
-
flowClient: this.flowClientV2,
|
|
944
|
-
continuationState: result.continuationState,
|
|
945
|
-
cacheClient: this.cacheClient,
|
|
946
|
-
signUpStateTransitionHandler:
|
|
947
|
-
this.signUpStateTransitionHandlerV2,
|
|
948
|
-
};
|
|
949
|
-
|
|
950
885
|
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
951
886
|
return new CustomAuthResultV2(
|
|
952
887
|
new CodeRequiredStateV2({
|
|
953
|
-
|
|
888
|
+
correlationId: result.correlationId,
|
|
889
|
+
logger: this.logger,
|
|
890
|
+
config: this.customAuthConfig,
|
|
891
|
+
flowClient: this.flowClientV2,
|
|
892
|
+
continuationState: result.continuationState,
|
|
893
|
+
cacheClient: this.cacheClient,
|
|
894
|
+
signUpStateTransitionHandler:
|
|
895
|
+
this.signUpStateTransitionHandlerV2,
|
|
954
896
|
sentTo: result.sentTo,
|
|
955
897
|
channel: result.channel,
|
|
956
898
|
codeLength: result.codeLength,
|
|
@@ -960,24 +902,58 @@ export class CustomAuthStandardController
|
|
|
960
902
|
);
|
|
961
903
|
}
|
|
962
904
|
|
|
963
|
-
if (result.type ===
|
|
905
|
+
if (result.type === FLOW_EXISTING_ACCOUNT_CODE_REQUIRED_V2) {
|
|
964
906
|
return new CustomAuthResultV2(
|
|
965
|
-
new
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
907
|
+
new ExistingAccountCodeRequiredStateV2({
|
|
908
|
+
correlationId: result.correlationId,
|
|
909
|
+
logger: this.logger,
|
|
910
|
+
config: this.customAuthConfig,
|
|
911
|
+
flowClient: this.flowClientV2,
|
|
912
|
+
continuationState: result.continuationState,
|
|
913
|
+
cacheClient: this.cacheClient,
|
|
914
|
+
signInStateTransitionHandler:
|
|
915
|
+
this.signInStateTransitionHandlerV2,
|
|
916
|
+
method: result.method,
|
|
917
|
+
sentTo: result.sentTo,
|
|
918
|
+
channel: result.channel,
|
|
919
|
+
codeLength: result.codeLength,
|
|
920
|
+
}),
|
|
921
|
+
undefined,
|
|
922
|
+
result.continuationState.scenario
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
if (result.type === FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2) {
|
|
927
|
+
return new CustomAuthResultV2(
|
|
928
|
+
new ExistingAccountPasswordRequiredStateV2({
|
|
929
|
+
correlationId: result.correlationId,
|
|
930
|
+
logger: this.logger,
|
|
931
|
+
config: this.customAuthConfig,
|
|
932
|
+
flowClient: this.flowClientV2,
|
|
933
|
+
continuationState: result.continuationState,
|
|
934
|
+
cacheClient: this.cacheClient,
|
|
935
|
+
signInStateTransitionHandler:
|
|
936
|
+
this.signInStateTransitionHandlerV2,
|
|
970
937
|
}),
|
|
971
938
|
undefined,
|
|
972
939
|
result.continuationState.scenario
|
|
973
940
|
);
|
|
974
941
|
}
|
|
975
942
|
|
|
976
|
-
if (result.type ===
|
|
943
|
+
if (result.type === FLOW_METHOD_SELECTION_REQUIRED_V2) {
|
|
977
944
|
return new CustomAuthResultV2(
|
|
978
|
-
new
|
|
979
|
-
|
|
980
|
-
|
|
945
|
+
new AuthMethodSelectionRequiredStateV2({
|
|
946
|
+
correlationId: result.correlationId,
|
|
947
|
+
logger: this.logger,
|
|
948
|
+
config: this.customAuthConfig,
|
|
949
|
+
flowClient: this.flowClientV2,
|
|
950
|
+
continuationState: result.continuationState,
|
|
951
|
+
cacheClient: this.cacheClient,
|
|
952
|
+
methods: result.methods,
|
|
953
|
+
authenticationFactor:
|
|
954
|
+
AuthenticationFactorV2.SINGLE_FACTOR,
|
|
955
|
+
signInStateTransitionHandler:
|
|
956
|
+
this.signInStateTransitionHandlerV2,
|
|
981
957
|
}),
|
|
982
958
|
undefined,
|
|
983
959
|
result.continuationState.scenario
|
|
@@ -1001,6 +977,17 @@ export class CustomAuthStandardController
|
|
|
1001
977
|
}
|
|
1002
978
|
}
|
|
1003
979
|
|
|
980
|
+
private ensureUsernameIsValidV2(
|
|
981
|
+
username: string | undefined,
|
|
982
|
+
correlationId?: string
|
|
983
|
+
): void {
|
|
984
|
+
ArgumentValidator.ensureArgumentIsNotEmptyString(
|
|
985
|
+
"inputs.username",
|
|
986
|
+
username,
|
|
987
|
+
correlationId
|
|
988
|
+
);
|
|
989
|
+
}
|
|
990
|
+
|
|
1004
991
|
private getCorrelationId(
|
|
1005
992
|
actionInputs: CustomAuthActionInputs | undefined
|
|
1006
993
|
): string {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An authentication method that can be registered for the current account.
|
|
8
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
9
|
+
*/
|
|
10
|
+
export interface AuthenticationMethodRegistrationV2 {
|
|
11
|
+
type: string;
|
|
12
|
+
channels?: readonly string[];
|
|
13
|
+
enrollHref: string;
|
|
14
|
+
}
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* An authentication method offered by the server during a native auth V2 flow.
|
|
8
|
-
*
|
|
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.
|
|
8
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
12
9
|
*/
|
|
13
10
|
export interface AuthenticationMethodV2 {
|
|
14
11
|
id: string;
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The native auth V2 flow that a result or error originates from
|
|
8
|
-
*
|
|
9
|
-
* which entry flow produced it; `Unknown` is used when the flow cannot be
|
|
10
|
-
* determined.
|
|
7
|
+
* The native auth V2 flow that a result or error originates from.
|
|
8
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
11
9
|
*/
|
|
12
10
|
export const CustomAuthFlowScenarioV2 = {
|
|
13
11
|
SignIn: "signIn",
|
|
@@ -16,5 +14,8 @@ export const CustomAuthFlowScenarioV2 = {
|
|
|
16
14
|
Unknown: "unknown",
|
|
17
15
|
} as const;
|
|
18
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
19
|
+
*/
|
|
19
20
|
export type CustomAuthFlowScenarioV2 =
|
|
20
21
|
(typeof CustomAuthFlowScenarioV2)[keyof typeof CustomAuthFlowScenarioV2];
|