@azure/msal-browser 5.26.0 → 5.28.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/README.md +2 -0
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +54 -14
- package/dist/app/PublicClientApplication.mjs.map +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 +32 -4
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +100 -11
- 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 +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +14 -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 +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +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 +3 -2
- 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 +87 -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 +14 -2
- 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 +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +4 -3
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
- 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 +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 +246 -73
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +10 -2
- 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 -2
- 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 +118 -25
- 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 +2 -2
- 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 -1
- 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 +17 -3
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +9 -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 +3 -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/state/NewPasswordRequiredStateV2.mjs +32 -13
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
- 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/PasswordRequiredStateV2.mjs +14 -2
- package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +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 +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +9 -2
- 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 +504 -75
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +54 -20
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +30 -16
- 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 +7 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +79 -19
- 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 +43 -25
- 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 +7 -2
- package/dist/utils/BrowserUtils.mjs.map +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +81 -0
- package/dist/utils/IframeMonitor.mjs.map +1 -0
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +119 -0
- package/dist/utils/PopupMonitor.mjs.map +1 -0
- package/dist/utils/PopupOriginCheck.mjs +88 -0
- package/dist/utils/PopupOriginCheck.mjs.map +1 -0
- 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 +71 -11
- package/lib/custom-auth-path/msal-custom-auth.cjs +2085 -451
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +2085 -451
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +39 -11
- package/lib/msal-browser.cjs +1461 -320
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +1461 -320
- 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/app/PublicClientApplication.ts +108 -8
- 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/config/Configuration.ts +63 -6
- package/src/controllers/StandardController.ts +153 -14
- package/src/crypto/TokenBindingKeyManager.ts +21 -0
- package/src/custom_auth/controller/CustomAuthStandardController.ts +18 -0
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +15 -0
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +23 -0
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +26 -0
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +1 -1
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +2 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +94 -0
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +7 -2
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +132 -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 +18 -0
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +13 -0
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +8 -2
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +1 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +445 -91
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +25 -0
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +34 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +9 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +262 -43
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +4 -7
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +21 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +41 -2
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +44 -19
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +4 -6
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +6 -1
- package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +25 -1
- package/src/custom_auth/core/telemetry/PublicApiId.ts +6 -0
- package/src/custom_auth/index.ts +11 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +6 -7
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +47 -15
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +2 -0
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +2 -0
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +18 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +2 -0
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +13 -0
- package/src/interaction_client/PlatformAuthInteractionClient.ts +851 -128
- package/src/interaction_client/PopupClient.ts +140 -83
- package/src/interaction_client/RedirectClient.ts +88 -35
- package/src/interaction_client/SilentIframeClient.ts +121 -95
- package/src/interaction_client/StandardInteractionClient.ts +6 -0
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +80 -46
- package/src/request/RequestHelpers.ts +64 -11
- package/src/request/SilentRequestHelpers.ts +8 -9
- package/src/telemetry/BrowserPerformanceEvents.ts +1 -0
- package/src/utils/BrowserUtils.ts +8 -1
- package/src/utils/IframeMonitor.ts +98 -0
- package/src/utils/PopupMonitor.ts +158 -0
- package/src/utils/PopupOriginCheck.ts +94 -0
- package/types/app/PublicClientApplication.d.ts +6 -4
- package/types/app/PublicClientApplication.d.ts.map +1 -1
- 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/config/Configuration.d.ts +16 -0
- package/types/config/Configuration.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/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +11 -0
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -0
- 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 +15 -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/RequestChallengeResultV2.d.ts +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +2 -1
- 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.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.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +9 -0
- package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +1 -0
- 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 +12 -5
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +17 -0
- 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 +18 -2
- 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 +3 -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 +12 -0
- 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/ResponsesV2.d.ts +29 -2
- 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 +3 -1
- 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 +3 -2
- 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 +6 -1
- package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts +6 -0
- package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +5 -0
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +6 -8
- 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 +4 -4
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +2 -1
- 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/result/SubmitPasswordResultV2.d.ts +2 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +2 -1
- 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/SignUpStateTransitionHandlerV2.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts +106 -5
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts +12 -0
- 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/interaction_client/StandardInteractionClient.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/types/utils/BrowserUtils.d.ts +2 -1
- package/types/utils/BrowserUtils.d.ts.map +1 -1
- package/types/utils/IframeMonitor.d.ts +17 -0
- package/types/utils/IframeMonitor.d.ts.map +1 -0
- package/types/utils/PopupMonitor.d.ts +37 -0
- package/types/utils/PopupMonitor.d.ts.map +1 -0
- package/types/utils/PopupOriginCheck.d.ts +27 -0
- package/types/utils/PopupOriginCheck.d.ts.map +1 -0
|
@@ -33,6 +33,28 @@ export interface EmbeddedMethodV2 extends Omit<HalResource, "_links"> {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/*
|
|
37
|
+
* An enrollment option embedded under `_embedded.methods[]`. Enrollment
|
|
38
|
+
* methods intentionally remain distinct from challenge methods because they
|
|
39
|
+
* have no server-issued id and advertise an `enroll` link rather than a
|
|
40
|
+
* `challenge` link.
|
|
41
|
+
*/
|
|
42
|
+
export interface EmbeddedEnrollmentMethodV2
|
|
43
|
+
extends Omit<HalResource, "_links"> {
|
|
44
|
+
type?: string;
|
|
45
|
+
channels?: string[];
|
|
46
|
+
_links?: {
|
|
47
|
+
enroll?: HalLink;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface EnrollmentRequiredResponseV2
|
|
52
|
+
extends Omit<HalResponseBaseV2, "_embedded"> {
|
|
53
|
+
_embedded?: {
|
|
54
|
+
methods?: EmbeddedEnrollmentMethodV2[];
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
36
58
|
/*
|
|
37
59
|
* Authorize-challenge continuation response containing the authorization code
|
|
38
60
|
* that is redeemed at the token endpoint.
|
|
@@ -123,13 +145,16 @@ export type ChallengeResponseV2 =
|
|
|
123
145
|
export type RiskVerificationResponseV2 = CodeChallengeResponseV2;
|
|
124
146
|
|
|
125
147
|
export interface SignUpSubmitAttributesResponseV2
|
|
126
|
-
extends Omit<CodeChallengeResponseV2, "_links"> {
|
|
148
|
+
extends Omit<CodeChallengeResponseV2, "_links" | "_embedded"> {
|
|
127
149
|
attributes?: SignUpAttributeResponseV2[];
|
|
128
150
|
_links?: {
|
|
129
151
|
verify?: HalLink;
|
|
130
152
|
resend?: HalLink;
|
|
131
153
|
submitAttributes?: HalLink;
|
|
132
154
|
};
|
|
155
|
+
_embedded?: {
|
|
156
|
+
methods?: EmbeddedEnrollmentMethodV2[];
|
|
157
|
+
};
|
|
133
158
|
}
|
|
134
159
|
|
|
135
160
|
/*
|
|
@@ -146,7 +171,18 @@ export interface VerifyResponseV2 extends Omit<HalResponseBaseV2, "_links"> {
|
|
|
146
171
|
submitAttributes?: HalLink;
|
|
147
172
|
};
|
|
148
173
|
_embedded?: {
|
|
149
|
-
methods?: EmbeddedMethodV2[];
|
|
174
|
+
methods?: (EmbeddedMethodV2 | EmbeddedEnrollmentMethodV2)[];
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface EnrollmentResponseV2
|
|
179
|
+
extends Omit<HalResponseBaseV2, "_links"> {
|
|
180
|
+
codeLength?: number;
|
|
181
|
+
type?: string;
|
|
182
|
+
hint?: string;
|
|
183
|
+
_links?: {
|
|
184
|
+
activate?: HalLink;
|
|
185
|
+
resend?: HalLink;
|
|
150
186
|
};
|
|
151
187
|
}
|
|
152
188
|
|
|
@@ -171,6 +207,9 @@ export interface PollResponseV2 extends Omit<HalResponseBaseV2, "_links"> {
|
|
|
171
207
|
_links?: {
|
|
172
208
|
poll?: HalLink;
|
|
173
209
|
};
|
|
210
|
+
_embedded?: {
|
|
211
|
+
methods?: EmbeddedEnrollmentMethodV2[];
|
|
212
|
+
};
|
|
174
213
|
}
|
|
175
214
|
|
|
176
215
|
/*
|
|
@@ -8,6 +8,16 @@
|
|
|
8
8
|
* every V2 flow. Distinct from the per-flow result DTOs (e.g. ResetPasswordResultsV2).
|
|
9
9
|
*/
|
|
10
10
|
import type { SignUpAttributeV2 } from "./SignUpResultsV2.js";
|
|
11
|
+
import {
|
|
12
|
+
ACTIVATE_RELATION,
|
|
13
|
+
CHALLENGE_RELATION,
|
|
14
|
+
COLLECT_ATTRIBUTES_RELATION,
|
|
15
|
+
ENROLL_RELATION,
|
|
16
|
+
RISK_VERIFY_RELATION,
|
|
17
|
+
UPDATE_RELATION,
|
|
18
|
+
VERIFY_RELATION,
|
|
19
|
+
ResponseStateV2,
|
|
20
|
+
} from "../ApiClientConstantsV2.js";
|
|
11
21
|
|
|
12
22
|
// Initial continuation token and available flow links.
|
|
13
23
|
export interface AuthorizeChallengeEntryResultV2 {
|
|
@@ -29,6 +39,32 @@ export interface StartMethodV2 {
|
|
|
29
39
|
challengeHref: string;
|
|
30
40
|
}
|
|
31
41
|
|
|
42
|
+
export interface EnrollmentMethodV2 {
|
|
43
|
+
type: string;
|
|
44
|
+
channels?: string[];
|
|
45
|
+
enrollHref: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface EnrollmentRequiredResultV2 {
|
|
49
|
+
nextAction: typeof ENROLL_RELATION;
|
|
50
|
+
continuationToken: string;
|
|
51
|
+
methods: EnrollmentMethodV2[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface EnrollmentResultV2 {
|
|
55
|
+
nextAction: typeof ACTIVATE_RELATION;
|
|
56
|
+
continuationToken: string;
|
|
57
|
+
hint?: string;
|
|
58
|
+
codeLength: number;
|
|
59
|
+
activateHref: string;
|
|
60
|
+
resendHref?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ActivationResultV2 {
|
|
64
|
+
nextAction: typeof ResponseStateV2.CONTINUE;
|
|
65
|
+
continuationToken: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
32
68
|
export const AuthenticationFactorV2 = {
|
|
33
69
|
SINGLE_FACTOR: "singleFactor",
|
|
34
70
|
MULTI_FACTOR: "multiFactor",
|
|
@@ -51,13 +87,8 @@ export interface StartResultV2 {
|
|
|
51
87
|
export type ResetPasswordStartApiResultV2 = StartResultV2;
|
|
52
88
|
export type SignInStartApiResultV2 = StartResultV2;
|
|
53
89
|
|
|
54
|
-
export const ChallengeNextActionV2 = {
|
|
55
|
-
VERIFY: "verify",
|
|
56
|
-
RISK_VERIFY: "riskVerify",
|
|
57
|
-
} as const;
|
|
58
|
-
|
|
59
90
|
export interface ChallengeVerificationResultV2 {
|
|
60
|
-
nextAction: typeof
|
|
91
|
+
nextAction: typeof VERIFY_RELATION;
|
|
61
92
|
continuationToken: string;
|
|
62
93
|
verifyHref: string;
|
|
63
94
|
resendHref?: string;
|
|
@@ -67,7 +98,7 @@ export interface ChallengeVerificationResultV2 {
|
|
|
67
98
|
}
|
|
68
99
|
|
|
69
100
|
export interface RiskVerificationRequiredResultV2 {
|
|
70
|
-
nextAction: typeof
|
|
101
|
+
nextAction: typeof RISK_VERIFY_RELATION;
|
|
71
102
|
continuationToken: string;
|
|
72
103
|
riskVerifyHref: string;
|
|
73
104
|
}
|
|
@@ -76,36 +107,30 @@ export type ChallengeResultV2 =
|
|
|
76
107
|
| ChallengeVerificationResultV2
|
|
77
108
|
| RiskVerificationRequiredResultV2;
|
|
78
109
|
|
|
79
|
-
export const VerifyNextActionV2 = {
|
|
80
|
-
UPDATE: "update",
|
|
81
|
-
CONTINUE: "continue",
|
|
82
|
-
CHALLENGE: "challenge",
|
|
83
|
-
COLLECT_ATTRIBUTES: "collectAttributes",
|
|
84
|
-
} as const;
|
|
85
|
-
|
|
86
110
|
/*
|
|
87
111
|
* Result of verifying a credential. The discriminated union identifies whether
|
|
88
112
|
* another update is required or token redemption can continue.
|
|
89
113
|
*/
|
|
90
114
|
export type VerifyResultV2 =
|
|
91
115
|
| {
|
|
92
|
-
nextAction: typeof
|
|
116
|
+
nextAction: typeof UPDATE_RELATION;
|
|
93
117
|
continuationToken: string;
|
|
94
118
|
updateHref: string;
|
|
95
119
|
}
|
|
96
120
|
| {
|
|
97
|
-
nextAction: typeof
|
|
121
|
+
nextAction: typeof ResponseStateV2.CONTINUE;
|
|
98
122
|
continuationToken: string;
|
|
99
123
|
}
|
|
100
124
|
| {
|
|
101
|
-
nextAction: typeof
|
|
125
|
+
nextAction: typeof CHALLENGE_RELATION;
|
|
102
126
|
continuationToken: string;
|
|
103
127
|
authenticationFactor: AuthenticationFactorV2;
|
|
104
128
|
methods: StartMethodV2[];
|
|
105
129
|
}
|
|
106
130
|
| {
|
|
107
|
-
nextAction: typeof
|
|
131
|
+
nextAction: typeof COLLECT_ATTRIBUTES_RELATION;
|
|
108
132
|
continuationToken: string;
|
|
109
133
|
attributes: SignUpAttributeV2[];
|
|
110
134
|
submitAttributesHref: string;
|
|
111
|
-
}
|
|
135
|
+
}
|
|
136
|
+
| EnrollmentRequiredResultV2;
|
package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import type { EnrollmentMethodV2 } from "./BaseResultsV2.js";
|
|
7
|
+
|
|
6
8
|
/*
|
|
7
9
|
* Reset-password response contracts used by the controller. Shared response
|
|
8
10
|
* contracts are defined in `BaseResultsV2`.
|
|
@@ -14,13 +16,9 @@ export interface ResetPasswordUpdateResultV2 {
|
|
|
14
16
|
pollHref: string;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
/*
|
|
18
|
-
* Result of a single poll. `isCompleted` is true once the server reports
|
|
19
|
-
* `state: continue`. While still in progress the server returns a fresh
|
|
20
|
-
* `pollHref`; the bounded poll loop lives in the controller layer.
|
|
21
|
-
*/
|
|
22
19
|
export interface ResetPasswordPollResultV2 {
|
|
23
20
|
continuationToken: string;
|
|
24
|
-
|
|
21
|
+
nextAction: string;
|
|
25
22
|
pollHref?: string;
|
|
23
|
+
enrollmentMethods?: EnrollmentMethodV2[];
|
|
26
24
|
}
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
ChallengeVerificationResultV2,
|
|
8
|
+
EnrollmentRequiredResultV2,
|
|
9
|
+
} from "./BaseResultsV2.js";
|
|
7
10
|
|
|
8
11
|
export interface SignUpAttributeV2 {
|
|
9
12
|
attributeId: string;
|
|
@@ -25,6 +28,7 @@ export const SignUpSubmitAttributesNextActionV2 = {
|
|
|
25
28
|
VERIFY: "verify",
|
|
26
29
|
COLLECT_ATTRIBUTES: "collectAttributes",
|
|
27
30
|
CONTINUE: "continue",
|
|
31
|
+
ENROLL: "enroll",
|
|
28
32
|
} as const;
|
|
29
33
|
|
|
30
34
|
export type SignUpSubmitAttributesApiResultV2 =
|
|
@@ -38,6 +42,7 @@ export type SignUpSubmitAttributesApiResultV2 =
|
|
|
38
42
|
attributes: SignUpAttributeV2[];
|
|
39
43
|
submitAttributesHref: string;
|
|
40
44
|
}
|
|
45
|
+
| EnrollmentRequiredResultV2
|
|
41
46
|
| {
|
|
42
47
|
nextAction: typeof SignUpSubmitAttributesNextActionV2.CONTINUE;
|
|
43
48
|
continuationToken: string;
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthFlowScenarioV2 } from "../auth_flow/v2/CustomAuthFlowScenarioV2.js";
|
|
7
|
+
import { AuthenticationFactorV2 } from "../network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
7
8
|
import {
|
|
9
|
+
MFA_V2_RESEND_CHALLENGE,
|
|
10
|
+
MFA_V2_SELECT_AUTH_METHOD,
|
|
11
|
+
MFA_V2_SUBMIT_CHALLENGE,
|
|
8
12
|
RESET_PASSWORD_V2_CHALLENGE,
|
|
9
13
|
RESET_PASSWORD_V2_RESEND_CODE,
|
|
10
14
|
RESET_PASSWORD_V2_SUBMIT,
|
|
@@ -56,9 +60,29 @@ const FLOW_STEP_API_IDS_V2: Partial<
|
|
|
56
60
|
},
|
|
57
61
|
};
|
|
58
62
|
|
|
63
|
+
const MFA_STEP_API_IDS_V2: Partial<Record<FlowStepV2, number>> = {
|
|
64
|
+
requestChallenge: MFA_V2_SELECT_AUTH_METHOD,
|
|
65
|
+
submitCode: MFA_V2_SUBMIT_CHALLENGE,
|
|
66
|
+
resendCode: MFA_V2_RESEND_CHALLENGE,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Resolves the telemetry API ID for a flow step. MFA challenge operations use
|
|
71
|
+
* distinct IDs when the sign-in caller identifies the second factor.
|
|
72
|
+
*/
|
|
59
73
|
export function getPublicApiIdV2(
|
|
60
74
|
scenario: CustomAuthFlowScenarioV2,
|
|
61
|
-
step: FlowStepV2
|
|
75
|
+
step: FlowStepV2,
|
|
76
|
+
authenticationFactor?: AuthenticationFactorV2
|
|
62
77
|
): number | undefined {
|
|
78
|
+
if (
|
|
79
|
+
scenario === CustomAuthFlowScenarioV2.SignIn &&
|
|
80
|
+
authenticationFactor === AuthenticationFactorV2.MULTI_FACTOR
|
|
81
|
+
) {
|
|
82
|
+
return (
|
|
83
|
+
MFA_STEP_API_IDS_V2[step] ?? FLOW_STEP_API_IDS_V2[scenario]?.[step]
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
63
87
|
return FLOW_STEP_API_IDS_V2[scenario]?.[step];
|
|
64
88
|
}
|
|
@@ -61,3 +61,9 @@ export const SIGN_UP_V2_SUBMIT_CODE = 100213;
|
|
|
61
61
|
export const SIGN_UP_V2_SUBMIT_ATTRIBUTES = 100214;
|
|
62
62
|
export const SIGN_UP_V2_RESEND_CODE = 100215;
|
|
63
63
|
export const SIGN_UP_V2_COMPLETE = 100216;
|
|
64
|
+
export const JIT_V2_ENROLL_AUTH_METHOD = 100217;
|
|
65
|
+
export const JIT_V2_SUBMIT_CHALLENGE = 100218;
|
|
66
|
+
export const JIT_V2_RESEND_CHALLENGE = 100219;
|
|
67
|
+
export const MFA_V2_SELECT_AUTH_METHOD = 100220;
|
|
68
|
+
export const MFA_V2_SUBMIT_CHALLENGE = 100221;
|
|
69
|
+
export const MFA_V2_RESEND_CHALLENGE = 100222;
|
package/src/custom_auth/index.ts
CHANGED
|
@@ -258,6 +258,7 @@ export { CustomAuthFlowScenarioV2 } from "./core/auth_flow/v2/CustomAuthFlowScen
|
|
|
258
258
|
|
|
259
259
|
// Native Auth V2 Authentication Method
|
|
260
260
|
export { AuthenticationMethodV2 } from "./core/auth_flow/v2/AuthenticationMethodV2.js";
|
|
261
|
+
export type { AuthenticationMethodRegistrationV2 } from "./core/auth_flow/v2/AuthenticationMethodRegistrationV2.js";
|
|
261
262
|
|
|
262
263
|
// Native Auth V2 Errors
|
|
263
264
|
export { AuthFlowErrorV2 } from "./core/auth_flow/v2/error/AuthFlowErrorV2.js";
|
|
@@ -269,6 +270,8 @@ export { NewPasswordRequiredStateV2 } from "./reset_password/auth_flow/v2/state/
|
|
|
269
270
|
export { CodeRequiredStateV2 } from "./core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
270
271
|
export { MFAVerificationRequiredStateV2 } from "./core/auth_flow/v2/state/MFAVerificationRequiredStateV2.js";
|
|
271
272
|
export { AuthMethodSelectionRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
273
|
+
export { AuthMethodRegistrationRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
274
|
+
export { AuthMethodVerificationRequiredStateV2 } from "./core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.js";
|
|
272
275
|
export { PasswordRequiredStateV2 } from "./sign_in/auth_flow/v2/state/PasswordRequiredStateV2.js";
|
|
273
276
|
export { SignInContinuationStateV2 } from "./sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
274
277
|
export { AttributesRequiredStateV2 } from "./sign_up/auth_flow/v2/state/AttributesRequiredStateV2.js";
|
|
@@ -303,6 +306,14 @@ export {
|
|
|
303
306
|
MFAResendChallengeResultV2,
|
|
304
307
|
MFAResendChallengeResultStateV2,
|
|
305
308
|
} from "./core/auth_flow/v2/result/MFAResendChallengeResultV2.js";
|
|
309
|
+
export type {
|
|
310
|
+
AuthMethodRegistrationChallengeResultV2,
|
|
311
|
+
AuthMethodRegistrationChallengeResultStateV2,
|
|
312
|
+
} from "./core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.js";
|
|
313
|
+
export type {
|
|
314
|
+
AuthMethodVerificationSubmitChallengeResultV2,
|
|
315
|
+
AuthMethodVerificationSubmitChallengeResultStateV2,
|
|
316
|
+
} from "./core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.js";
|
|
306
317
|
export {
|
|
307
318
|
VerifyChallengeResultV2,
|
|
308
319
|
VerifyChallengeResultStateV2,
|
|
@@ -5,25 +5,24 @@
|
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
7
|
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
8
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
8
9
|
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* The states a submit-new-password action can resolve to. Submitting the new
|
|
12
|
-
* password
|
|
13
|
-
*
|
|
14
|
-
* (carrying the reset continuation) rather than the terminal `CompletedStateV2`.
|
|
15
|
-
* The app then calls its `signIn` to obtain tokens.
|
|
13
|
+
* password can require method registration after the update completes.
|
|
14
|
+
* Without enrollment, the flow returns a continuation for explicit sign-in.
|
|
16
15
|
*/
|
|
17
16
|
export type SubmitNewPasswordResultStateV2 =
|
|
18
17
|
| SignInContinuationStateV2
|
|
18
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
19
19
|
| FailedStateV2;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Result of submitting a new password. It wraps one of
|
|
23
23
|
* {@link SubmitNewPasswordResultStateV2} plus the unified V2 flow error on
|
|
24
|
-
* failure.
|
|
25
|
-
*
|
|
26
|
-
* data; the account is surfaced by the subsequent sign-in.
|
|
24
|
+
* failure. Enrollment, when requested, must be activated before sign-in can
|
|
25
|
+
* complete; otherwise the returned continuation can be redeemed explicitly.
|
|
27
26
|
*/
|
|
28
27
|
export type SubmitNewPasswordResultV2 =
|
|
29
28
|
CustomAuthResultV2<SubmitNewPasswordResultStateV2>;
|
|
@@ -5,21 +5,28 @@
|
|
|
5
5
|
|
|
6
6
|
import { AuthFlowActionRequiredStateBase } from "../../../../core/auth_flow/AuthFlowState.js";
|
|
7
7
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
8
|
+
import { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
9
|
+
import {
|
|
10
|
+
FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
|
|
11
|
+
FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2,
|
|
12
|
+
} from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
13
|
+
import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
|
|
14
|
+
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../../core/network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
8
15
|
import { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
9
16
|
import type { NewPasswordRequiredStateParametersV2 } from "./ResetPasswordStateParametersV2.js";
|
|
10
17
|
import type { SubmitNewPasswordResultV2 } from "../result/SubmitNewPasswordResultV2.js";
|
|
11
18
|
|
|
12
19
|
/**
|
|
13
20
|
* State returned when the user must supply a new password to complete the flow.
|
|
14
|
-
* A successful submission
|
|
15
|
-
* sign
|
|
21
|
+
* A successful submission can require registration or return a continuation
|
|
22
|
+
* for sign-in.
|
|
16
23
|
*/
|
|
17
24
|
export class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<NewPasswordRequiredStateParametersV2> {
|
|
18
25
|
readonly stateType = "newPasswordRequired";
|
|
19
26
|
|
|
20
27
|
/**
|
|
21
|
-
* Submits the new password to complete the reset.
|
|
22
|
-
* sign-in
|
|
28
|
+
* Submits the new password to complete the reset. Enrollment may be
|
|
29
|
+
* required before sign-in; a rejected password returns an error.
|
|
23
30
|
* @param password - The new password to set.
|
|
24
31
|
* @returns The result of submitting the new password.
|
|
25
32
|
*/
|
|
@@ -39,18 +46,43 @@ export class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<
|
|
|
39
46
|
continuationState,
|
|
40
47
|
newPassword: password,
|
|
41
48
|
});
|
|
49
|
+
const resultType: string = result.type;
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
new
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
if (result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2) {
|
|
52
|
+
return new CustomAuthResultV2(
|
|
53
|
+
new AuthMethodRegistrationRequiredStateV2({
|
|
54
|
+
correlationId: result.correlationId,
|
|
55
|
+
logger,
|
|
56
|
+
config: this.stateParameters.config,
|
|
57
|
+
flowClient,
|
|
58
|
+
continuationState: result.continuationState,
|
|
59
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
60
|
+
methods: result.methods,
|
|
61
|
+
}),
|
|
62
|
+
undefined,
|
|
63
|
+
result.continuationState.scenario
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
68
|
+
return new CustomAuthResultV2(
|
|
69
|
+
new SignInContinuationStateV2({
|
|
70
|
+
correlationId: result.correlationId,
|
|
71
|
+
logger,
|
|
72
|
+
config: this.stateParameters.config,
|
|
73
|
+
flowClient,
|
|
74
|
+
continuationState: result.continuationState,
|
|
75
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
76
|
+
}),
|
|
77
|
+
undefined,
|
|
78
|
+
result.continuationState.scenario
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
throw new CustomAuthError(
|
|
83
|
+
UNSUPPORTED_FLOW_TRANSITION,
|
|
84
|
+
`Password submission result type '${resultType}' is not supported.`,
|
|
85
|
+
correlationId
|
|
54
86
|
);
|
|
55
87
|
} catch (error) {
|
|
56
88
|
logger.errorPii(
|
|
@@ -10,6 +10,7 @@ import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/Cu
|
|
|
10
10
|
import type { PasswordRequiredStateV2 } from "../state/PasswordRequiredStateV2.js";
|
|
11
11
|
import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
12
12
|
import type { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
13
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* States returned when native auth V2 sign-in starts.
|
|
@@ -18,6 +19,7 @@ export type SignInStartResultStateV2 =
|
|
|
18
19
|
| PasswordRequiredStateV2
|
|
19
20
|
| CodeRequiredStateV2
|
|
20
21
|
| AuthMethodSelectionRequiredStateV2
|
|
22
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
21
23
|
| CompletedStateV2
|
|
22
24
|
| FailedStateV2;
|
|
23
25
|
|
|
@@ -7,11 +7,13 @@ import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResu
|
|
|
7
7
|
import type { CompletedStateV2 } from "../../../../core/auth_flow/v2/state/CompletedStateV2.js";
|
|
8
8
|
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
9
9
|
import type { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
10
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
10
11
|
import type { CustomAuthAccountData } from "../../../../get_account/auth_flow/CustomAuthAccountData.js";
|
|
11
12
|
|
|
12
13
|
export type SubmitPasswordResultStateV2 =
|
|
13
14
|
| CompletedStateV2
|
|
14
15
|
| AuthMethodSelectionRequiredStateV2
|
|
16
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
15
17
|
| FailedStateV2;
|
|
16
18
|
|
|
17
19
|
export type SubmitPasswordResultV2 = CustomAuthResultV2<
|
|
@@ -12,11 +12,13 @@ import type { SubmitPasswordResultV2 } from "../result/SubmitPasswordResultV2.js
|
|
|
12
12
|
import { AuthMethodSelectionRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.js";
|
|
13
13
|
import {
|
|
14
14
|
FLOW_COMPLETED_V2,
|
|
15
|
+
FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
|
|
15
16
|
FLOW_MFA_REQUIRED_V2,
|
|
16
17
|
} from "../../../../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
17
18
|
import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
|
|
18
19
|
import { UNSUPPORTED_FLOW_TRANSITION } from "../../../../core/network_client/custom_auth_api/v2/ErrorCodesV2.js";
|
|
19
20
|
import { AuthenticationFactorV2 } from "../../../../core/network_client/custom_auth_api/v2/result/BaseResultsV2.js";
|
|
21
|
+
import { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
24
|
* State returned when the selected sign-in method requires the user's
|
|
@@ -59,6 +61,22 @@ export class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase<Pas
|
|
|
59
61
|
);
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
if (result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2) {
|
|
65
|
+
return new CustomAuthResultV2(
|
|
66
|
+
new AuthMethodRegistrationRequiredStateV2({
|
|
67
|
+
correlationId: result.correlationId,
|
|
68
|
+
logger,
|
|
69
|
+
config: this.stateParameters.config,
|
|
70
|
+
flowClient,
|
|
71
|
+
continuationState: result.continuationState,
|
|
72
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
73
|
+
methods: result.methods,
|
|
74
|
+
}),
|
|
75
|
+
undefined,
|
|
76
|
+
result.continuationState.scenario
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
62
80
|
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
63
81
|
return new CustomAuthResultV2(
|
|
64
82
|
new AuthMethodSelectionRequiredStateV2({
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
|
+
import type { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
7
8
|
import type { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
8
9
|
import type { FailedStateV2 } from "../../../../core/auth_flow/v2/state/FailedStateV2.js";
|
|
9
10
|
import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2/state/SignInContinuationStateV2.js";
|
|
@@ -11,6 +12,7 @@ import type { SignInContinuationStateV2 } from "../../../../sign_in/auth_flow/v2
|
|
|
11
12
|
export type SubmitAttributesResultStateV2 =
|
|
12
13
|
| CodeRequiredStateV2
|
|
13
14
|
| SignInContinuationStateV2
|
|
15
|
+
| AuthMethodRegistrationRequiredStateV2
|
|
14
16
|
| FailedStateV2;
|
|
15
17
|
|
|
16
18
|
export type SubmitAttributesResultV2 =
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CustomAuthResultV2 } from "../../../../core/auth_flow/v2/CustomAuthResultV2.js";
|
|
7
|
+
import { AuthMethodRegistrationRequiredStateV2 } from "../../../../core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.js";
|
|
7
8
|
import { CodeRequiredStateV2 } from "../../../../core/auth_flow/v2/state/CodeRequiredStateV2.js";
|
|
8
9
|
import { CustomAuthError } from "../../../../core/error/CustomAuthError.js";
|
|
9
10
|
import {
|
|
10
11
|
FLOW_ATTRIBUTES_REQUIRED_V2,
|
|
12
|
+
FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2,
|
|
11
13
|
FLOW_CODE_REQUIRED_V2,
|
|
12
14
|
FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2,
|
|
13
15
|
type FlowAttributesRequiredResultV2,
|
|
@@ -54,6 +56,17 @@ export class SignUpStateTransitionHandlerV2 {
|
|
|
54
56
|
);
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
if (result.type === FLOW_AUTH_METHOD_REGISTRATION_REQUIRED_V2) {
|
|
60
|
+
return new CustomAuthResultV2(
|
|
61
|
+
new AuthMethodRegistrationRequiredStateV2({
|
|
62
|
+
...commonStateParameters,
|
|
63
|
+
methods: result.methods,
|
|
64
|
+
}),
|
|
65
|
+
undefined,
|
|
66
|
+
result.continuationState.scenario
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
57
70
|
throw new CustomAuthError(
|
|
58
71
|
UNSUPPORTED_FLOW_TRANSITION,
|
|
59
72
|
`Sign-up ${submission} submission result type '${result.type}' is not supported.`,
|