@azure/msal-browser 5.29.1 → 5.31.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 +4 -2
- package/dist/app/IPublicClientApplication.mjs +4 -1
- package/dist/app/IPublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientApplication.mjs +14 -2
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +10 -23
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +2 -3
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +40 -4
- 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 +11 -2
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +26 -5
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +44 -11
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +189 -5
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -4
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +11 -4
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +3 -3
- package/dist/custom_auth/core/CustomAuthAuthority.mjs.map +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 -4
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -3
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +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 -8
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +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 -3
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -3
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +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 -7
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +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 -2
- 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 +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +2 -5
- 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 +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +1 -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 -2
- 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 +1 -2
- 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 +1 -2
- 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 +2 -3
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.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 +32 -27
- 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 +6 -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 +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +7 -5
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +12 -3
- 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 +9 -39
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +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 +1 -1
- 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 +1 -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 +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +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 +2 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
- package/dist/custom_auth/index.mjs +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 +1 -2
- 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 +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 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +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 +1 -2
- 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 +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 -2
- 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 +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +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 +3 -2
- package/dist/error/BrowserAuthErrorCodes.mjs.map +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 +4 -2
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +18 -5
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +27 -21
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +8 -10
- 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 +5 -8
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +2 -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 +13 -9
- 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 +24 -6
- package/dist/popup_relay/constants.mjs.map +1 -1
- package/dist/popup_relay/index.mjs +142 -44
- package/dist/popup_relay/index.mjs.map +1 -1
- package/dist/popup_relay/relayClient.mjs +66 -23
- package/dist/popup_relay/relayClient.mjs.map +1 -1
- package/dist/protocol/Authorize.mjs +71 -13
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +2 -1
- package/dist/request/RequestHelpers.mjs.map +1 -1
- package/dist/request/SilentRequestHelpers.mjs +7 -4
- 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 +14 -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 +13 -9
- package/lib/custom-auth-path/msal-custom-auth.cjs +764 -314
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +764 -314
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +13 -9
- package/lib/msal-browser.cjs +791 -215
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +791 -215
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +231 -60
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +231 -60
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +2 -2
- 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/IPublicClientApplication.ts +16 -0
- package/src/app/PublicClientApplication.ts +22 -0
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +11 -44
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +1 -2
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +2 -6
- package/src/cache/BrowserCacheManager.ts +66 -6
- package/src/config/Configuration.ts +35 -0
- package/src/controllers/NestedAppAuthController.ts +35 -2
- package/src/controllers/StandardController.ts +76 -12
- package/src/controllers/UnknownOperatingContextController.ts +10 -0
- package/src/crypto/BrowserCrypto.ts +367 -2
- package/src/custom_auth/CustomAuthActionInputs.ts +0 -9
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +0 -3
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +0 -3
- package/src/custom_auth/controller/CustomAuthStandardController.ts +15 -2
- package/src/custom_auth/core/CustomAuthAuthority.ts +2 -1
- package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.ts +0 -3
- package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.ts +0 -7
- package/src/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/mfa/state/MfaState.ts +0 -6
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +0 -4
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +0 -3
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +8 -6
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +1 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +43 -29
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +21 -2
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +12 -8
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +35 -4
- package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +10 -47
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +9 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +5 -5
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +2 -5
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +2 -4
- package/src/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.ts +1 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +0 -2
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +0 -1
- package/src/custom_auth/sign_in/auth_flow/result/SignInResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +0 -1
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +0 -1
- package/src/error/AsymmetricEarSubErrors.ts +18 -0
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/BaseInteractionClient.ts +6 -1
- package/src/interaction_client/PlatformAuthInteractionClient.ts +28 -8
- package/src/interaction_client/PopupClient.ts +59 -29
- package/src/interaction_client/RedirectClient.ts +10 -13
- package/src/interaction_client/SilentIframeClient.ts +9 -13
- package/src/interaction_client/StandardInteractionClient.ts +1 -0
- package/src/packageMetadata.ts +1 -1
- package/src/popup_relay/constants.ts +34 -3
- package/src/popup_relay/index.ts +200 -45
- package/src/popup_relay/relayClient.ts +108 -24
- package/src/protocol/Authorize.ts +123 -11
- package/src/request/EndSessionPopupRequest.ts +3 -0
- package/src/request/PopupRequest.ts +1 -0
- package/src/request/RedirectRequest.ts +4 -0
- package/src/request/RequestHelpers.ts +5 -0
- package/src/request/SilentRequestHelpers.ts +10 -4
- package/src/request/SsoSilentRequest.ts +1 -0
- package/src/telemetry/BrowserPerformanceEvents.ts +14 -0
- package/types/app/IPublicClientApplication.d.ts +8 -0
- package/types/app/IPublicClientApplication.d.ts.map +1 -1
- package/types/app/PublicClientApplication.d.ts +6 -1
- package/types/app/PublicClientApplication.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +0 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +2 -6
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/cache/BrowserCacheManager.d.ts +20 -2
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/config/Configuration.d.ts +14 -0
- package/types/config/Configuration.d.ts.map +1 -1
- package/types/controllers/NestedAppAuthController.d.ts +5 -0
- package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +4 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/controllers/UnknownOperatingContextController.d.ts +5 -0
- package/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/types/crypto/BrowserCrypto.d.ts +34 -0
- package/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +0 -9
- 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 +0 -3
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +0 -3
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/CustomAuthAuthority.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
- package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
- package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +0 -1
- 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 +0 -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 +0 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +0 -1
- 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 +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +0 -2
- 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 +0 -2
- 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 +0 -2
- 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 +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +0 -2
- 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 +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +0 -1
- 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 +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +0 -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/CompletedStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +0 -1
- 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 +0 -1
- 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 +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.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 +3 -2
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +10 -1
- 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/BaseApiClientV2.d.ts +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -1
- 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/HrefResolverV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +1 -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 +8 -0
- 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 +4 -5
- 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 -6
- 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 +2 -5
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
- package/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +0 -2
- 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 +0 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +0 -2
- 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 +0 -2
- 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 +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +0 -2
- 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 +0 -2
- 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 +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
- package/types/error/AsymmetricEarSubErrors.d.ts +14 -0
- package/types/error/AsymmetricEarSubErrors.d.ts.map +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/types/interaction_client/BaseInteractionClient.d.ts +3 -2
- package/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts +3 -1
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts +0 -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/popup_relay/constants.d.ts +10 -3
- package/types/popup_relay/constants.d.ts.map +1 -1
- package/types/popup_relay/index.d.ts +27 -11
- package/types/popup_relay/index.d.ts.map +1 -1
- package/types/popup_relay/relayClient.d.ts +9 -11
- package/types/popup_relay/relayClient.d.ts.map +1 -1
- package/types/protocol/Authorize.d.ts +5 -0
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/EndSessionPopupRequest.d.ts +3 -0
- package/types/request/EndSessionPopupRequest.d.ts.map +1 -1
- package/types/request/PopupRequest.d.ts +1 -1
- package/types/request/PopupRequest.d.ts.map +1 -1
- package/types/request/RedirectRequest.d.ts +4 -1
- package/types/request/RedirectRequest.d.ts.map +1 -1
- package/types/request/RequestHelpers.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/request/SsoSilentRequest.d.ts +1 -1
- package/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +12 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
|
@@ -10,6 +10,14 @@ import {
|
|
|
10
10
|
import { KEY_FORMAT_JWK } from "../utils/BrowserConstants.js";
|
|
11
11
|
import { base64Encode, urlEncodeArr } from "../encode/Base64Encode.js";
|
|
12
12
|
import { base64Decode, base64DecToArr } from "../encode/Base64Decode.js";
|
|
13
|
+
import {
|
|
14
|
+
AuthError,
|
|
15
|
+
invokeAsync,
|
|
16
|
+
IPerformanceClient,
|
|
17
|
+
Logger,
|
|
18
|
+
} from "@azure/msal-common/browser";
|
|
19
|
+
import { AsymmetricEarSubErrors } from "../error/AsymmetricEarSubErrors.js";
|
|
20
|
+
import * as BrowserPerformanceEvents from "../telemetry/BrowserPerformanceEvents.js";
|
|
13
21
|
|
|
14
22
|
/**
|
|
15
23
|
* This file defines functions used by the browser library to perform cryptography operations such as
|
|
@@ -27,6 +35,10 @@ const HKDF = "HKDF";
|
|
|
27
35
|
const S256_HASH_ALG = "SHA-256";
|
|
28
36
|
// JWK values used by browser-internal WebCrypto helpers.
|
|
29
37
|
const JSON_WEB_KEY_CURVE_P256 = "P-256";
|
|
38
|
+
const ECDH_P384_ALGORITHM: EcKeyGenParams = {
|
|
39
|
+
name: "ECDH",
|
|
40
|
+
namedCurve: "P-384",
|
|
41
|
+
};
|
|
30
42
|
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
31
43
|
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
32
44
|
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
@@ -263,6 +275,357 @@ export async function generateEarKey(): Promise<string> {
|
|
|
263
275
|
return base64Encode(JSON.stringify(jwk));
|
|
264
276
|
}
|
|
265
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Local asymmetric EAR key material, separate from serializable request metadata.
|
|
280
|
+
* @internal
|
|
281
|
+
*/
|
|
282
|
+
export type AsymmetricEarKey = {
|
|
283
|
+
privateJwk: JsonWebKey;
|
|
284
|
+
publicJwk: JsonWebKey;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
|
|
289
|
+
* @internal
|
|
290
|
+
*/
|
|
291
|
+
export async function generateAsymmetricEarKey(): Promise<AsymmetricEarKey> {
|
|
292
|
+
const keyPair = await generateKeyPair(
|
|
293
|
+
true,
|
|
294
|
+
["deriveBits"],
|
|
295
|
+
ECDH_P384_ALGORITHM
|
|
296
|
+
);
|
|
297
|
+
const publicJwk = await exportJwk(keyPair.publicKey);
|
|
298
|
+
const privateJwk = await exportJwk(keyPair.privateKey);
|
|
299
|
+
|
|
300
|
+
return {
|
|
301
|
+
privateJwk,
|
|
302
|
+
publicJwk,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
|
|
308
|
+
* @internal
|
|
309
|
+
*/
|
|
310
|
+
export async function importAsymmetricEarKey(
|
|
311
|
+
privateJwk: JsonWebKey,
|
|
312
|
+
correlationId = ""
|
|
313
|
+
): Promise<CryptoKey> {
|
|
314
|
+
if (
|
|
315
|
+
privateJwk?.kty !== "EC" ||
|
|
316
|
+
privateJwk.crv !== "P-384" ||
|
|
317
|
+
!privateJwk.d
|
|
318
|
+
) {
|
|
319
|
+
throw createBrowserAuthError(
|
|
320
|
+
BrowserAuthErrorCodes.asymmetricEarKeyError,
|
|
321
|
+
correlationId,
|
|
322
|
+
AsymmetricEarSubErrors.InvalidPrivateKey
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
try {
|
|
326
|
+
return await importJwk(
|
|
327
|
+
privateJwk,
|
|
328
|
+
false,
|
|
329
|
+
["deriveBits"],
|
|
330
|
+
ECDH_P384_ALGORITHM
|
|
331
|
+
);
|
|
332
|
+
} catch {
|
|
333
|
+
throw createBrowserAuthError(
|
|
334
|
+
BrowserAuthErrorCodes.asymmetricEarKeyError,
|
|
335
|
+
correlationId,
|
|
336
|
+
AsymmetricEarSubErrors.PrivateKeyImportFailed
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Encodes the EAR client party information with a fresh 192-bit nonce.
|
|
343
|
+
* @internal
|
|
344
|
+
*/
|
|
345
|
+
export function generateAsymmetricEarApv(publicJwk: JsonWebKey): string {
|
|
346
|
+
const point = new Uint8Array(
|
|
347
|
+
concatEarBytes(
|
|
348
|
+
new Uint8Array([4]),
|
|
349
|
+
decodeEarBase64Url(publicJwk.x || ""),
|
|
350
|
+
decodeEarBase64Url(publicJwk.y || "")
|
|
351
|
+
)
|
|
352
|
+
);
|
|
353
|
+
if (point.length !== 97) {
|
|
354
|
+
throw createBrowserAuthError(
|
|
355
|
+
BrowserAuthErrorCodes.asymmetricEarKeyError,
|
|
356
|
+
"",
|
|
357
|
+
AsymmetricEarSubErrors.InvalidPublicKeyCoordinates
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
const nonce = new Uint8Array(24);
|
|
361
|
+
window.crypto.getRandomValues(nonce);
|
|
362
|
+
return urlEncodeArr(
|
|
363
|
+
new Uint8Array(
|
|
364
|
+
concatEarBytes(
|
|
365
|
+
lengthPrefixEarBytes(new TextEncoder().encode("EarClient")),
|
|
366
|
+
lengthPrefixEarBytes(point),
|
|
367
|
+
lengthPrefixEarBytes(nonce)
|
|
368
|
+
)
|
|
369
|
+
)
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
|
|
375
|
+
* Party information is used byte-for-byte; the service need not echo the request APV.
|
|
376
|
+
* @internal
|
|
377
|
+
*/
|
|
378
|
+
export async function decryptAsymmetricEarResponse(
|
|
379
|
+
privateJwk: JsonWebKey,
|
|
380
|
+
apv: string,
|
|
381
|
+
earJwe: string,
|
|
382
|
+
requestApv = apv,
|
|
383
|
+
telemetry?: {
|
|
384
|
+
logger: Logger;
|
|
385
|
+
performanceClient: IPerformanceClient;
|
|
386
|
+
correlationId: string;
|
|
387
|
+
}
|
|
388
|
+
): Promise<string> {
|
|
389
|
+
const correlationId = telemetry?.correlationId || "";
|
|
390
|
+
const measure = <T>(
|
|
391
|
+
eventName: string,
|
|
392
|
+
operation: () => Promise<T>
|
|
393
|
+
): Promise<T> =>
|
|
394
|
+
telemetry
|
|
395
|
+
? invokeAsync(
|
|
396
|
+
operation,
|
|
397
|
+
eventName,
|
|
398
|
+
telemetry.logger,
|
|
399
|
+
telemetry.performanceClient,
|
|
400
|
+
correlationId
|
|
401
|
+
)()
|
|
402
|
+
: operation();
|
|
403
|
+
if (apv !== requestApv) {
|
|
404
|
+
throw createBrowserAuthError(
|
|
405
|
+
BrowserAuthErrorCodes.asymmetricEarKeyError,
|
|
406
|
+
correlationId,
|
|
407
|
+
AsymmetricEarSubErrors.RequestApvMismatch
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
const parts = earJwe.split(".");
|
|
411
|
+
if (parts.length !== 5 || parts[1] !== "") {
|
|
412
|
+
throw createBrowserAuthError(
|
|
413
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
414
|
+
correlationId,
|
|
415
|
+
AsymmetricEarSubErrors.InvalidJweFormatOrHeader
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
let header: {
|
|
419
|
+
alg: string;
|
|
420
|
+
enc: string;
|
|
421
|
+
crit?: unknown;
|
|
422
|
+
zip?: unknown;
|
|
423
|
+
apv?: string;
|
|
424
|
+
apu: string;
|
|
425
|
+
epk: {
|
|
426
|
+
kty: string;
|
|
427
|
+
crv: string;
|
|
428
|
+
x: string;
|
|
429
|
+
y: string;
|
|
430
|
+
d?: string;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
try {
|
|
434
|
+
header = JSON.parse(
|
|
435
|
+
new TextDecoder("utf-8", { fatal: true }).decode(
|
|
436
|
+
decodeEarBase64Url(parts[0], correlationId)
|
|
437
|
+
)
|
|
438
|
+
);
|
|
439
|
+
} catch {
|
|
440
|
+
throw createBrowserAuthError(
|
|
441
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
442
|
+
correlationId,
|
|
443
|
+
AsymmetricEarSubErrors.InvalidJweFormatOrHeader
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
if (
|
|
447
|
+
!header ||
|
|
448
|
+
header.alg !== "ECDH-ES" ||
|
|
449
|
+
header.enc !== "A256GCM" ||
|
|
450
|
+
header.crit !== undefined ||
|
|
451
|
+
header.zip !== undefined ||
|
|
452
|
+
header.epk?.kty !== "EC" ||
|
|
453
|
+
header.epk.crv !== "P-384" ||
|
|
454
|
+
header.epk.d !== undefined ||
|
|
455
|
+
(header.apv !== undefined && header.apv !== apv)
|
|
456
|
+
) {
|
|
457
|
+
throw createBrowserAuthError(
|
|
458
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
459
|
+
correlationId,
|
|
460
|
+
AsymmetricEarSubErrors.InvalidJweFormatOrHeader
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
const x = decodeEarBase64Url(header.epk.x, correlationId);
|
|
464
|
+
const y = decodeEarBase64Url(header.epk.y, correlationId);
|
|
465
|
+
const apuBytes = decodeEarBase64Url(header.apu, correlationId);
|
|
466
|
+
const apvBytes = decodeEarBase64Url(apv, correlationId);
|
|
467
|
+
const iv = decodeEarBase64Url(parts[2], correlationId);
|
|
468
|
+
const ciphertext = decodeEarBase64Url(parts[3], correlationId);
|
|
469
|
+
const tag = decodeEarBase64Url(parts[4], correlationId);
|
|
470
|
+
if (
|
|
471
|
+
x.length !== 48 ||
|
|
472
|
+
y.length !== 48 ||
|
|
473
|
+
iv.length !== 12 ||
|
|
474
|
+
tag.length !== 16
|
|
475
|
+
) {
|
|
476
|
+
throw createBrowserAuthError(
|
|
477
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
478
|
+
correlationId,
|
|
479
|
+
AsymmetricEarSubErrors.InvalidJweFormatOrHeader
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
let key: CryptoKey;
|
|
484
|
+
try {
|
|
485
|
+
const privateKey = await measure(
|
|
486
|
+
BrowserPerformanceEvents.ImportAsymmetricEarKey,
|
|
487
|
+
() => importAsymmetricEarKey(privateJwk, correlationId)
|
|
488
|
+
);
|
|
489
|
+
const publicKey = await measure(
|
|
490
|
+
BrowserPerformanceEvents.ImportAsymmetricEarPublicKey,
|
|
491
|
+
() =>
|
|
492
|
+
importJwk(
|
|
493
|
+
{
|
|
494
|
+
kty: "EC",
|
|
495
|
+
crv: "P-384",
|
|
496
|
+
x: header.epk.x,
|
|
497
|
+
y: header.epk.y,
|
|
498
|
+
},
|
|
499
|
+
false,
|
|
500
|
+
[],
|
|
501
|
+
ECDH_P384_ALGORITHM
|
|
502
|
+
)
|
|
503
|
+
);
|
|
504
|
+
const secret = new Uint8Array(
|
|
505
|
+
await measure(
|
|
506
|
+
BrowserPerformanceEvents.DeriveAsymmetricEarSecret,
|
|
507
|
+
() =>
|
|
508
|
+
window.crypto.subtle.deriveBits(
|
|
509
|
+
{ name: "ECDH", public: publicKey },
|
|
510
|
+
privateKey,
|
|
511
|
+
384
|
|
512
|
+
)
|
|
513
|
+
)
|
|
514
|
+
);
|
|
515
|
+
// RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
|
|
516
|
+
const input = new Uint8Array(
|
|
517
|
+
concatEarBytes(
|
|
518
|
+
earUint32(1),
|
|
519
|
+
secret,
|
|
520
|
+
lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")),
|
|
521
|
+
lengthPrefixEarBytes(apuBytes),
|
|
522
|
+
lengthPrefixEarBytes(apvBytes),
|
|
523
|
+
earUint32(256)
|
|
524
|
+
)
|
|
525
|
+
);
|
|
526
|
+
let derivedKey: ArrayBuffer;
|
|
527
|
+
try {
|
|
528
|
+
derivedKey = await measure(
|
|
529
|
+
BrowserPerformanceEvents.AsymmetricEarConcatKdf,
|
|
530
|
+
() => window.crypto.subtle.digest(S256_HASH_ALG, input)
|
|
531
|
+
);
|
|
532
|
+
} finally {
|
|
533
|
+
secret.fill(0);
|
|
534
|
+
input.fill(0);
|
|
535
|
+
}
|
|
536
|
+
try {
|
|
537
|
+
key = await measure(
|
|
538
|
+
BrowserPerformanceEvents.ImportAsymmetricEarContentKey,
|
|
539
|
+
() =>
|
|
540
|
+
window.crypto.subtle.importKey(
|
|
541
|
+
RAW,
|
|
542
|
+
derivedKey,
|
|
543
|
+
AES_GCM,
|
|
544
|
+
false,
|
|
545
|
+
[DECRYPT]
|
|
546
|
+
)
|
|
547
|
+
);
|
|
548
|
+
} finally {
|
|
549
|
+
new Uint8Array(derivedKey).fill(0);
|
|
550
|
+
}
|
|
551
|
+
} catch (error) {
|
|
552
|
+
if (error instanceof AuthError) {
|
|
553
|
+
throw error;
|
|
554
|
+
}
|
|
555
|
+
throw createBrowserAuthError(
|
|
556
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
557
|
+
correlationId,
|
|
558
|
+
AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
try {
|
|
562
|
+
const plaintext = await measure(
|
|
563
|
+
BrowserPerformanceEvents.DecryptAsymmetricEarResponse,
|
|
564
|
+
() =>
|
|
565
|
+
window.crypto.subtle.decrypt(
|
|
566
|
+
{
|
|
567
|
+
name: AES_GCM,
|
|
568
|
+
iv,
|
|
569
|
+
tagLength: 128,
|
|
570
|
+
additionalData: new TextEncoder().encode(parts[0]),
|
|
571
|
+
},
|
|
572
|
+
key,
|
|
573
|
+
concatEarBytes(ciphertext, tag)
|
|
574
|
+
)
|
|
575
|
+
);
|
|
576
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
|
|
577
|
+
} catch {
|
|
578
|
+
throw createBrowserAuthError(
|
|
579
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
580
|
+
correlationId,
|
|
581
|
+
AsymmetricEarSubErrors.JweDecryptionFailed
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
|
|
587
|
+
function decodeEarBase64Url(value: string, correlationId = ""): Uint8Array {
|
|
588
|
+
// Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
|
|
589
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
590
|
+
throw createBrowserAuthError(
|
|
591
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
592
|
+
correlationId,
|
|
593
|
+
AsymmetricEarSubErrors.InvalidJweFormatOrHeader
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
const bytes = new Uint8Array(base64DecToArr(value));
|
|
597
|
+
if (urlEncodeArr(bytes) !== value) {
|
|
598
|
+
throw createBrowserAuthError(
|
|
599
|
+
BrowserAuthErrorCodes.failedToDecryptEarResponse,
|
|
600
|
+
correlationId,
|
|
601
|
+
AsymmetricEarSubErrors.InvalidJweFormatOrHeader
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
return bytes;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
function earUint32(value: number): Uint8Array {
|
|
608
|
+
const bytes = new Uint8Array(4);
|
|
609
|
+
new DataView(bytes.buffer).setUint32(0, value);
|
|
610
|
+
return bytes;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
function concatEarBytes(...parts: Uint8Array[]): ArrayBuffer {
|
|
614
|
+
const bytes = new Uint8Array(
|
|
615
|
+
parts.reduce((length, part) => length + part.length, 0)
|
|
616
|
+
);
|
|
617
|
+
let offset = 0;
|
|
618
|
+
for (const part of parts) {
|
|
619
|
+
bytes.set(part, offset);
|
|
620
|
+
offset += part.length;
|
|
621
|
+
}
|
|
622
|
+
return bytes.buffer;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
function lengthPrefixEarBytes(bytes: Uint8Array): Uint8Array {
|
|
626
|
+
return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
|
|
627
|
+
}
|
|
628
|
+
|
|
266
629
|
/**
|
|
267
630
|
* Parses earJwk for encryption key and returns CryptoKey object
|
|
268
631
|
* @param earJwk
|
|
@@ -311,7 +674,9 @@ export async function decryptEarResponse(
|
|
|
311
674
|
const iv = base64DecToArr(earJweParts[2]);
|
|
312
675
|
const ciphertext = base64DecToArr(earJweParts[3]);
|
|
313
676
|
const tag = base64DecToArr(earJweParts[4]);
|
|
314
|
-
|
|
677
|
+
if (tag.byteLength !== 16) {
|
|
678
|
+
throw new Error("Invalid AES-GCM authentication tag length");
|
|
679
|
+
}
|
|
315
680
|
|
|
316
681
|
// Concat ciphertext and tag
|
|
317
682
|
const encryptedData = new Uint8Array(ciphertext.length + tag.length);
|
|
@@ -322,7 +687,7 @@ export async function decryptEarResponse(
|
|
|
322
687
|
{
|
|
323
688
|
name: AES_GCM,
|
|
324
689
|
iv: iv,
|
|
325
|
-
tagLength:
|
|
690
|
+
tagLength: 128,
|
|
326
691
|
additionalData: header,
|
|
327
692
|
},
|
|
328
693
|
key,
|
|
@@ -39,27 +39,18 @@ 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
|
-
*/
|
|
45
42
|
export type SignInInputsV2 = CustomAuthActionInputs & {
|
|
46
43
|
username: string;
|
|
47
44
|
scopes?: Array<string>;
|
|
48
45
|
claims?: string;
|
|
49
46
|
};
|
|
50
47
|
|
|
51
|
-
/**
|
|
52
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
53
|
-
*/
|
|
54
48
|
export type ResetPasswordInputsV2 = CustomAuthActionInputs & {
|
|
55
49
|
username: string;
|
|
56
50
|
scopes?: Array<string>;
|
|
57
51
|
claims?: string;
|
|
58
52
|
};
|
|
59
53
|
|
|
60
|
-
/**
|
|
61
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
62
|
-
*/
|
|
63
54
|
export type SignUpInputsV2 = CustomAuthActionInputs & {
|
|
64
55
|
username: string;
|
|
65
56
|
attributes?: UserAccountAttributes;
|
|
@@ -122,7 +122,6 @@ export class CustomAuthPublicClientApplication
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
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
125
|
* @param inputs - Inputs for the sign-in V2 flow.
|
|
127
126
|
* @returns A promise that resolves to the sign-in start result.
|
|
128
127
|
*/
|
|
@@ -132,7 +131,6 @@ export class CustomAuthPublicClientApplication
|
|
|
132
131
|
|
|
133
132
|
/**
|
|
134
133
|
* 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.
|
|
136
134
|
* @param inputs - Inputs for the sign-up V2 flow.
|
|
137
135
|
* @returns A promise that resolves to the sign-up start result.
|
|
138
136
|
*/
|
|
@@ -142,7 +140,6 @@ export class CustomAuthPublicClientApplication
|
|
|
142
140
|
|
|
143
141
|
/**
|
|
144
142
|
* 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.
|
|
146
143
|
* @param {ResetPasswordInputsV2} inputs - Inputs for the reset-password V2 flow
|
|
147
144
|
* @returns {Promise<ResetPasswordStartResultV2>} - A promise that resolves to ResetPasswordStartResultV2
|
|
148
145
|
*/
|
|
@@ -20,7 +20,6 @@ export interface ICustomAuthPublicClientApplicationV2
|
|
|
20
20
|
extends ICustomAuthPublicClientApplication {
|
|
21
21
|
/**
|
|
22
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
23
|
* @param inputs - Inputs for the sign-in V2 flow.
|
|
25
24
|
* @returns A promise that resolves to the sign-in start result.
|
|
26
25
|
*/
|
|
@@ -28,7 +27,6 @@ export interface ICustomAuthPublicClientApplicationV2
|
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* 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.
|
|
32
30
|
* @param inputs - Inputs for the sign-up V2 flow.
|
|
33
31
|
* @returns A promise that resolves to the sign-up start result.
|
|
34
32
|
*/
|
|
@@ -36,7 +34,6 @@ export interface ICustomAuthPublicClientApplicationV2
|
|
|
36
34
|
|
|
37
35
|
/**
|
|
38
36
|
* 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.
|
|
40
37
|
* @param {ResetPasswordInputsV2} inputs - Inputs for the reset-password V2 flow
|
|
41
38
|
* @returns {Promise<ResetPasswordStartResultV2>} A promise that resolves to ResetPasswordStartResultV2
|
|
42
39
|
*/
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
FLOW_CODE_REQUIRED_V2,
|
|
39
39
|
FLOW_EXISTING_ACCOUNT_CODE_REQUIRED_V2,
|
|
40
40
|
FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2,
|
|
41
|
+
FLOW_EXISTING_ACCOUNT_START_V2,
|
|
41
42
|
FLOW_METHOD_SELECTION_REQUIRED_V2,
|
|
42
43
|
FLOW_PASSWORD_REQUIRED_V2,
|
|
43
44
|
} from "../core/interaction_client/v2/result/FlowActionResultV2.js";
|
|
@@ -845,6 +846,8 @@ export class CustomAuthStandardController
|
|
|
845
846
|
|
|
846
847
|
async signUpV2(inputs: SignUpInputsV2): Promise<SignUpStartResultV2> {
|
|
847
848
|
const correlationId = this.getCorrelationId(inputs);
|
|
849
|
+
let scenario: CustomAuthFlowScenarioV2 =
|
|
850
|
+
CustomAuthFlowScenarioV2.SignUp;
|
|
848
851
|
|
|
849
852
|
try {
|
|
850
853
|
ArgumentValidator.ensureArgumentIsNotNullOrUndefined(
|
|
@@ -874,7 +877,7 @@ export class CustomAuthStandardController
|
|
|
874
877
|
correlationId
|
|
875
878
|
);
|
|
876
879
|
|
|
877
|
-
const
|
|
880
|
+
const startResult = await this.flowClientV2.signUp({
|
|
878
881
|
correlationId,
|
|
879
882
|
username: inputs.username,
|
|
880
883
|
scopes: inputs.scopes,
|
|
@@ -882,6 +885,16 @@ export class CustomAuthStandardController
|
|
|
882
885
|
attributes: inputs.attributes,
|
|
883
886
|
});
|
|
884
887
|
|
|
888
|
+
if (startResult.type === FLOW_EXISTING_ACCOUNT_START_V2) {
|
|
889
|
+
scenario = startResult.continuationState.scenario;
|
|
890
|
+
}
|
|
891
|
+
const result =
|
|
892
|
+
startResult.type === FLOW_EXISTING_ACCOUNT_START_V2
|
|
893
|
+
? await this.flowClientV2.challengeExistingAccount(
|
|
894
|
+
startResult
|
|
895
|
+
)
|
|
896
|
+
: startResult;
|
|
897
|
+
|
|
885
898
|
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
886
899
|
return new CustomAuthResultV2(
|
|
887
900
|
new CodeRequiredStateV2({
|
|
@@ -971,7 +984,7 @@ export class CustomAuthStandardController
|
|
|
971
984
|
);
|
|
972
985
|
|
|
973
986
|
return CustomAuthResultV2.createWithError(error, {
|
|
974
|
-
scenario
|
|
987
|
+
scenario,
|
|
975
988
|
correlationId,
|
|
976
989
|
});
|
|
977
990
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import {
|
|
7
7
|
Authority,
|
|
8
8
|
AuthorityOptions,
|
|
9
|
+
formatAuthorityUri,
|
|
9
10
|
INetworkModule,
|
|
10
11
|
IPerformanceClient,
|
|
11
12
|
Logger,
|
|
@@ -38,7 +39,7 @@ export class CustomAuthAuthority extends Authority {
|
|
|
38
39
|
private customAuthProxyDomain?: string
|
|
39
40
|
) {
|
|
40
41
|
const ciamAuthorityUrl = CustomAuthAuthority.transformCIAMAuthority(
|
|
41
|
-
authority,
|
|
42
|
+
formatAuthorityUri(authority),
|
|
42
43
|
""
|
|
43
44
|
);
|
|
44
45
|
|
package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.ts
CHANGED
|
@@ -44,7 +44,6 @@ export class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultB
|
|
|
44
44
|
/**
|
|
45
45
|
* Checks if the result indicates that verification is required.
|
|
46
46
|
* @returns true if verification is required, false otherwise.
|
|
47
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
48
47
|
*/
|
|
49
48
|
isVerificationRequired(): this is AuthMethodRegistrationChallengeMethodResult & {
|
|
50
49
|
state: AuthMethodVerificationRequiredState;
|
|
@@ -58,7 +57,6 @@ export class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultB
|
|
|
58
57
|
/**
|
|
59
58
|
* Checks if the result indicates that registration is completed (fast-pass scenario).
|
|
60
59
|
* @returns true if registration is completed, false otherwise.
|
|
61
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
62
60
|
*/
|
|
63
61
|
isCompleted(): this is AuthMethodRegistrationChallengeMethodResult & {
|
|
64
62
|
state: AuthMethodRegistrationCompletedState;
|
|
@@ -72,7 +70,6 @@ export class AuthMethodRegistrationChallengeMethodResult extends AuthFlowResultB
|
|
|
72
70
|
/**
|
|
73
71
|
* Checks if the result is in a failed state.
|
|
74
72
|
* @returns true if the result is failed, false otherwise.
|
|
75
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
76
73
|
*/
|
|
77
74
|
isFailed(): this is AuthMethodRegistrationChallengeMethodResult & {
|
|
78
75
|
state: AuthMethodRegistrationFailedState;
|
package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.ts
CHANGED
|
@@ -41,7 +41,6 @@ export class AuthMethodRegistrationSubmitChallengeResult extends AuthFlowResultB
|
|
|
41
41
|
/**
|
|
42
42
|
* Checks if the result indicates that registration is completed.
|
|
43
43
|
* @returns true if registration is completed, false otherwise.
|
|
44
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
45
44
|
*/
|
|
46
45
|
isCompleted(): this is AuthMethodRegistrationSubmitChallengeResult & {
|
|
47
46
|
state: AuthMethodRegistrationCompletedState;
|
|
@@ -55,7 +54,6 @@ export class AuthMethodRegistrationSubmitChallengeResult extends AuthFlowResultB
|
|
|
55
54
|
/**
|
|
56
55
|
* Checks if the result is in a failed state.
|
|
57
56
|
* @returns true if the result is failed, false otherwise.
|
|
58
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
59
57
|
*/
|
|
60
58
|
isFailed(): this is AuthMethodRegistrationSubmitChallengeResult & {
|
|
61
59
|
state: AuthMethodRegistrationFailedState;
|
|
@@ -146,7 +146,6 @@ export class AuthMethodRegistrationRequiredState extends AuthMethodRegistrationS
|
|
|
146
146
|
/**
|
|
147
147
|
* Gets the available authentication methods for registration.
|
|
148
148
|
* @returns Array of available authentication methods.
|
|
149
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
150
149
|
*/
|
|
151
150
|
getAuthMethods(): AuthenticationMethod[] {
|
|
152
151
|
return this.stateParameters.authMethods;
|
|
@@ -156,7 +155,6 @@ export class AuthMethodRegistrationRequiredState extends AuthMethodRegistrationS
|
|
|
156
155
|
* Challenges an authentication method for registration.
|
|
157
156
|
* @param authMethodDetails The authentication method details to challenge.
|
|
158
157
|
* @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
|
|
159
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
160
158
|
*/
|
|
161
159
|
async challengeAuthMethod(
|
|
162
160
|
authMethodDetails: AuthMethodDetails
|
|
@@ -177,7 +175,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
|
|
|
177
175
|
/**
|
|
178
176
|
* Gets the length of the expected verification code.
|
|
179
177
|
* @returns The code length.
|
|
180
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
181
178
|
*/
|
|
182
179
|
getCodeLength(): number {
|
|
183
180
|
return this.stateParameters.codeLength;
|
|
@@ -186,7 +183,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
|
|
|
186
183
|
/**
|
|
187
184
|
* Gets the channel through which the challenge was sent.
|
|
188
185
|
* @returns The challenge channel (e.g., "email").
|
|
189
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
190
186
|
*/
|
|
191
187
|
getChannel(): string {
|
|
192
188
|
return this.stateParameters.challengeChannel;
|
|
@@ -195,7 +191,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
|
|
|
195
191
|
/**
|
|
196
192
|
* Gets the target label indicating where the challenge was sent.
|
|
197
193
|
* @returns The challenge target label (e.g., masked email address).
|
|
198
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
199
194
|
*/
|
|
200
195
|
getSentTo(): string {
|
|
201
196
|
return this.stateParameters.challengeTargetLabel;
|
|
@@ -205,7 +200,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
|
|
|
205
200
|
* Submits the verification challenge to complete the authentication method registration.
|
|
206
201
|
* @param code The verification code entered by the user.
|
|
207
202
|
* @returns Promise that resolves to AuthMethodRegistrationSubmitChallengeResult.
|
|
208
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
209
203
|
*/
|
|
210
204
|
async submitChallenge(
|
|
211
205
|
code: string
|
|
@@ -264,7 +258,6 @@ export class AuthMethodVerificationRequiredState extends AuthMethodRegistrationS
|
|
|
264
258
|
* Challenges a different authentication method for registration.
|
|
265
259
|
* @param authMethodDetails The authentication method details to challenge.
|
|
266
260
|
* @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
|
|
267
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
268
261
|
*/
|
|
269
262
|
async challengeAuthMethod(
|
|
270
263
|
authMethodDetails: AuthMethodDetails
|
|
@@ -36,7 +36,6 @@ export class MfaRequestChallengeResult extends AuthFlowResultBase<
|
|
|
36
36
|
/**
|
|
37
37
|
* Checks if the result indicates that verification is required.
|
|
38
38
|
* @returns true if verification is required, false otherwise.
|
|
39
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
40
39
|
*/
|
|
41
40
|
isVerificationRequired(): this is MfaRequestChallengeResult & {
|
|
42
41
|
state: MfaVerificationRequiredState;
|
|
@@ -47,7 +46,6 @@ export class MfaRequestChallengeResult extends AuthFlowResultBase<
|
|
|
47
46
|
/**
|
|
48
47
|
* Checks if the result is in a failed state.
|
|
49
48
|
* @returns true if the result is failed, false otherwise.
|
|
50
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
51
49
|
*/
|
|
52
50
|
isFailed(): this is MfaRequestChallengeResult & {
|
|
53
51
|
state: MfaFailedState;
|
|
@@ -37,7 +37,6 @@ export class MfaSubmitChallengeResult extends AuthFlowResultBase<
|
|
|
37
37
|
/**
|
|
38
38
|
* Checks if the MFA flow is completed successfully.
|
|
39
39
|
* @returns true if completed, false otherwise.
|
|
40
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
41
40
|
*/
|
|
42
41
|
isCompleted(): this is MfaSubmitChallengeResult & {
|
|
43
42
|
state: MfaCompletedState;
|
|
@@ -48,7 +47,6 @@ export class MfaSubmitChallengeResult extends AuthFlowResultBase<
|
|
|
48
47
|
/**
|
|
49
48
|
* Checks if the result is in a failed state.
|
|
50
49
|
* @returns true if the result is failed, false otherwise.
|
|
51
|
-
* @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
|
|
52
50
|
*/
|
|
53
51
|
isFailed(): this is MfaSubmitChallengeResult & {
|
|
54
52
|
state: MfaFailedState;
|