@azure/msal-browser 5.25.1 → 5.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +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 +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +7 -2
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +49 -19
- 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 +8 -7
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +4 -3
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +174 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +67 -17
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +3 -4
- 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 +7 -15
- 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 +1 -5
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +3 -2
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +1 -1
- package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +61 -52
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +6 -3
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +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 -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 +12 -10
- 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 +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +3 -3
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs.map +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 +3 -7
- 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 +2 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs.map +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/SignUpResultsV2.mjs +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 +8 -2
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom_auth/index.mjs +2 -11
- 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 +1 -3
- 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 +5 -5
- 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 +5 -16
- 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 +35 -0
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -0
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -3
- 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/SignUpAttributesRequiredStateBaseV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +1 -3
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +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 +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 +1 -1
- package/dist/interaction_client/PopupClient.mjs +4 -3
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +4 -3
- 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 +4 -3
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +6 -6
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/request/SilentRequestHelpers.mjs +9 -3
- 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 +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 +53 -0
- package/dist/utils/BrowserDetection.mjs.map +1 -0
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +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 +6 -6
- package/lib/custom-auth-path/msal-custom-auth.cjs +601 -657
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +602 -658
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +7 -3
- package/lib/msal-browser.cjs +136 -78
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +136 -78
- 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/controllers/NestedAppAuthController.ts +6 -1
- package/src/custom_auth/CustomAuthActionInputs.ts +16 -6
- package/src/custom_auth/controller/CustomAuthStandardController.ts +78 -17
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +18 -30
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +1 -0
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +239 -0
- package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +2 -5
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +13 -10
- package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +19 -0
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +3 -6
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +4 -6
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +114 -17
- package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +6 -3
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +17 -19
- package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +5 -5
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +0 -4
- package/src/custom_auth/core/error/CustomAuthApiError.ts +2 -1
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +3 -4
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +75 -68
- package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +6 -3
- package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +2 -4
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +0 -1
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +17 -15
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.ts +1 -1
- package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +3 -11
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +2 -3
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +2 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +1 -1
- package/src/custom_auth/core/utils/ArgumentValidator.ts +13 -0
- package/src/custom_auth/index.ts +4 -14
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +6 -10
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +3 -6
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +2 -4
- package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +2 -4
- package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +5 -4
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +4 -23
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +56 -0
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +1 -5
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +2 -5
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -2
- package/src/interaction_client/PopupClient.ts +9 -1
- package/src/interaction_client/RedirectClient.ts +9 -4
- package/src/interaction_client/SilentIframeClient.ts +9 -2
- package/src/packageMetadata.ts +1 -1
- package/src/request/SilentRequestHelpers.ts +11 -2
- package/src/utils/BrowserDetection.ts +85 -0
- package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +16 -5
- package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts +1 -0
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +9 -11
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +1 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +90 -0
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +1 -2
- package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +1 -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 +8 -7
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts +13 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +1 -0
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +2 -3
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +5 -6
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +9 -6
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +2 -2
- 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 +5 -3
- 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/error/CustomAuthApiError.d.ts +2 -1
- package/types/custom_auth/core/error/CustomAuthApiError.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +1 -3
- 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 +2 -2
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +2 -2
- package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +2 -4
- package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +0 -1
- 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/BaseApiClientV2.d.ts +2 -2
- 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/ErrorCodesV2.d.ts +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.d.ts.map +1 -1
- 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 +1 -2
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts +2 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts +1 -0
- package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
- package/types/custom_auth/index.d.ts +3 -12
- package/types/custom_auth/index.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +5 -7
- 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.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -6
- 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 +3 -4
- 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 +3 -4
- 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_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +4 -9
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts +9 -0
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -0
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +1 -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 +1 -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.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/request/SilentRequestHelpers.d.ts +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/utils/BrowserDetection.d.ts +17 -0
- package/types/utils/BrowserDetection.d.ts.map +1 -0
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs +0 -102
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs +0 -20
- package/dist/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs +0 -36
- package/dist/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs +0 -29
- package/dist/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs +0 -36
- package/dist/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.mjs.map +0 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs +0 -61
- package/dist/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.mjs.map +0 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs +0 -29
- package/dist/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs +0 -18
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs +0 -37
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs +0 -23
- package/dist/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs +0 -25
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.mjs.map +0 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs +0 -33
- package/dist/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.mjs.map +0 -1
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.ts +0 -146
- package/src/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.ts +0 -15
- package/src/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.ts +0 -33
- package/src/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.ts +0 -25
- package/src/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.ts +0 -18
- package/src/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.ts +0 -59
- package/src/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.ts +0 -76
- package/src/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.ts +0 -25
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.ts +0 -13
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.ts +0 -35
- package/src/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.ts +0 -19
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.ts +0 -21
- package/src/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.ts +0 -32
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts +0 -40
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorBaseV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts +0 -11
- package/types/custom_auth/core/auth_flow/v2/error/RequestChallengeErrorV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts +0 -23
- package/types/custom_auth/core/auth_flow/v2/error/ResetPasswordStartErrorV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts +0 -18
- package/types/custom_auth/core/auth_flow/v2/error/VerifyChallengeErrorV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts +0 -7
- package/types/custom_auth/core/auth_flow/v2/result/MFARequestChallengeResultV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts +0 -17
- package/types/custom_auth/core/auth_flow/v2/state/AuthenticationMethodSelectionStateBaseV2.d.ts.map +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts +0 -18
- package/types/custom_auth/core/auth_flow/v2/state/MFARequiredStateV2.d.ts.map +0 -1
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts +0 -18
- package/types/custom_auth/reset_password/auth_flow/v2/error_type/SubmitNewPasswordErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts +0 -9
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInContinuationErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts +0 -22
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SignInStartErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts +0 -12
- package/types/custom_auth/sign_in/auth_flow/v2/error_type/SubmitPasswordErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts +0 -14
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SignUpStartErrorV2.d.ts.map +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts +0 -20
- package/types/custom_auth/sign_up/auth_flow/v2/error_type/SubmitAttributesErrorV2.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.26.0 2026-10-21 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v16.14.
|
|
5
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -56,7 +56,7 @@ const RESOURCE = "resource";
|
|
|
56
56
|
const CLI_DATA = "clidata";
|
|
57
57
|
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
58
58
|
|
|
59
|
-
/*! @azure/msal-common v16.14.
|
|
59
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
60
60
|
/*
|
|
61
61
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
62
62
|
* Licensed under the MIT License.
|
|
@@ -290,7 +290,7 @@ const JsonWebTokenTypes = {
|
|
|
290
290
|
// Token renewal offset default in seconds
|
|
291
291
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
292
292
|
|
|
293
|
-
/*! @azure/msal-common v16.14.
|
|
293
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
294
294
|
/*
|
|
295
295
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
296
296
|
* Licensed under the MIT License.
|
|
@@ -319,7 +319,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
319
319
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
/*! @azure/msal-common v16.14.
|
|
322
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
323
323
|
|
|
324
324
|
/*
|
|
325
325
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -342,7 +342,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
342
342
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
/*! @azure/msal-common v16.14.
|
|
345
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
346
346
|
/*
|
|
347
347
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
348
348
|
* Licensed under the MIT License.
|
|
@@ -380,7 +380,7 @@ const methodNotImplemented = "method_not_implemented";
|
|
|
380
380
|
const resourceParameterRequired = "resource_parameter_required";
|
|
381
381
|
const misplacedResourceParam = "misplaced_resource_parameter";
|
|
382
382
|
|
|
383
|
-
/*! @azure/msal-common v16.14.
|
|
383
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
384
384
|
|
|
385
385
|
/*
|
|
386
386
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -418,7 +418,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
-
/*! @azure/msal-common v16.14.
|
|
421
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
422
422
|
|
|
423
423
|
/*
|
|
424
424
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -484,7 +484,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
484
484
|
return matches[2];
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
/*! @azure/msal-common v16.14.
|
|
487
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
488
488
|
|
|
489
489
|
/*
|
|
490
490
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -572,7 +572,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
572
572
|
return updatedAccountInfo;
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
/*! @azure/msal-common v16.14.
|
|
575
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
576
576
|
/*
|
|
577
577
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
578
578
|
* Licensed under the MIT License.
|
|
@@ -586,7 +586,7 @@ const AuthorityType = {
|
|
|
586
586
|
Ciam: 3,
|
|
587
587
|
};
|
|
588
588
|
|
|
589
|
-
/*! @azure/msal-common v16.14.
|
|
589
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
590
590
|
/*
|
|
591
591
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
592
592
|
* Licensed under the MIT License.
|
|
@@ -608,7 +608,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
608
608
|
return null;
|
|
609
609
|
}
|
|
610
610
|
|
|
611
|
-
/*! @azure/msal-common v16.14.
|
|
611
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
612
612
|
/*
|
|
613
613
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
614
614
|
* Licensed under the MIT License.
|
|
@@ -632,7 +632,7 @@ const ProtocolMode = {
|
|
|
632
632
|
EAR: "EAR",
|
|
633
633
|
};
|
|
634
634
|
|
|
635
|
-
/*! @azure/msal-common v16.14.
|
|
635
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
636
636
|
/**
|
|
637
637
|
* Returns the AccountInfo interface for this account.
|
|
638
638
|
* @internal
|
|
@@ -821,7 +821,7 @@ function isAccountEntity(entity) {
|
|
|
821
821
|
entity.hasOwnProperty("authorityType"));
|
|
822
822
|
}
|
|
823
823
|
|
|
824
|
-
/*! @azure/msal-common v16.14.
|
|
824
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
825
825
|
/*
|
|
826
826
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
827
827
|
* Licensed under the MIT License.
|
|
@@ -831,7 +831,7 @@ function isAccountEntity(entity) {
|
|
|
831
831
|
*/
|
|
832
832
|
const unexpectedError = "unexpected_error";
|
|
833
833
|
|
|
834
|
-
/*! @azure/msal-common v16.14.
|
|
834
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
835
835
|
|
|
836
836
|
/*
|
|
837
837
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -851,7 +851,7 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
851
851
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
852
852
|
}
|
|
853
853
|
|
|
854
|
-
/*! @azure/msal-common v16.14.
|
|
854
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
855
855
|
/*
|
|
856
856
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
857
857
|
* Licensed under the MIT License.
|
|
@@ -882,7 +882,7 @@ const invalidDpopHtu = "invalid_dpop_htu";
|
|
|
882
882
|
const invalidDpopNonce = "invalid_dpop_nonce";
|
|
883
883
|
const dpopMissingResourceContext = "dpop_missing_resource_context";
|
|
884
884
|
|
|
885
|
-
/*! @azure/msal-common v16.14.
|
|
885
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
886
886
|
/*
|
|
887
887
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
888
888
|
* Licensed under the MIT License.
|
|
@@ -894,7 +894,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
894
894
|
response.hasOwnProperty("jwks_uri"));
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
-
/*! @azure/msal-common v16.14.
|
|
897
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
898
898
|
/*
|
|
899
899
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
900
900
|
* Licensed under the MIT License.
|
|
@@ -974,7 +974,7 @@ class StringUtils {
|
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
|
|
977
|
-
/*! @azure/msal-common v16.14.
|
|
977
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
978
978
|
|
|
979
979
|
/*
|
|
980
980
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1132,7 +1132,7 @@ class UrlString {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
|
|
1135
|
-
/*! @azure/msal-common v16.14.
|
|
1135
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1136
1136
|
|
|
1137
1137
|
/*
|
|
1138
1138
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1286,7 +1286,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1286
1286
|
return null;
|
|
1287
1287
|
}
|
|
1288
1288
|
|
|
1289
|
-
/*! @azure/msal-common v16.14.
|
|
1289
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1290
1290
|
/*
|
|
1291
1291
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1292
1292
|
* Licensed under the MIT License.
|
|
@@ -1295,7 +1295,7 @@ const AzureCloudInstance = {
|
|
|
1295
1295
|
// AzureCloudInstance is not specified.
|
|
1296
1296
|
None: "none"};
|
|
1297
1297
|
|
|
1298
|
-
/*! @azure/msal-common v16.14.
|
|
1298
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1299
1299
|
/*
|
|
1300
1300
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1301
1301
|
* Licensed under the MIT License.
|
|
@@ -1305,7 +1305,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1305
1305
|
response.hasOwnProperty("metadata"));
|
|
1306
1306
|
}
|
|
1307
1307
|
|
|
1308
|
-
/*! @azure/msal-common v16.14.
|
|
1308
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1309
1309
|
/*
|
|
1310
1310
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1311
1311
|
* Licensed under the MIT License.
|
|
@@ -1315,7 +1315,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1315
1315
|
response.hasOwnProperty("error_description"));
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
1318
|
-
/*! @azure/msal-common v16.14.
|
|
1318
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1319
1319
|
/*
|
|
1320
1320
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1321
1321
|
* Licensed under the MIT License.
|
|
@@ -1386,7 +1386,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1386
1386
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1387
1387
|
const SetUserData = "setUserData";
|
|
1388
1388
|
|
|
1389
|
-
/*! @azure/msal-common v16.14.
|
|
1389
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1390
1390
|
/*
|
|
1391
1391
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1392
1392
|
* Licensed under the MIT License.
|
|
@@ -1479,7 +1479,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1479
1479
|
};
|
|
1480
1480
|
};
|
|
1481
1481
|
|
|
1482
|
-
/*! @azure/msal-common v16.14.
|
|
1482
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1483
1483
|
|
|
1484
1484
|
/*
|
|
1485
1485
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1590,7 +1590,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1590
1590
|
},
|
|
1591
1591
|
};
|
|
1592
1592
|
|
|
1593
|
-
/*! @azure/msal-common v16.14.
|
|
1593
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1594
1594
|
/*
|
|
1595
1595
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1596
1596
|
* Licensed under the MIT License.
|
|
@@ -1655,7 +1655,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
1655
1655
|
return cachedAtSec > nowSeconds();
|
|
1656
1656
|
}
|
|
1657
1657
|
|
|
1658
|
-
/*! @azure/msal-common v16.14.
|
|
1658
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1659
1659
|
|
|
1660
1660
|
/*
|
|
1661
1661
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1942,7 +1942,7 @@ function serializeAttributeTokens(attributeTokens) {
|
|
|
1942
1942
|
return [...attributeTokens].sort().join(" ");
|
|
1943
1943
|
}
|
|
1944
1944
|
|
|
1945
|
-
/*! @azure/msal-common v16.14.
|
|
1945
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
1946
1946
|
|
|
1947
1947
|
/*
|
|
1948
1948
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2910,7 +2910,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
2910
2910
|
};
|
|
2911
2911
|
}
|
|
2912
2912
|
|
|
2913
|
-
/*! @azure/msal-common v16.14.
|
|
2913
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
2914
2914
|
|
|
2915
2915
|
/*
|
|
2916
2916
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2944,7 +2944,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
2946
|
|
|
2947
|
-
/*! @azure/msal-common v16.14.
|
|
2947
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
2948
2948
|
|
|
2949
2949
|
/*
|
|
2950
2950
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3140,7 +3140,7 @@ class ScopeSet {
|
|
|
3140
3140
|
}
|
|
3141
3141
|
}
|
|
3142
3142
|
|
|
3143
|
-
/*! @azure/msal-common v16.14.
|
|
3143
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
3144
3144
|
|
|
3145
3145
|
/*
|
|
3146
3146
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3626,7 +3626,7 @@ function addAttributeTokens(parameters, attributeTokens) {
|
|
|
3626
3626
|
}
|
|
3627
3627
|
}
|
|
3628
3628
|
|
|
3629
|
-
/*! @azure/msal-common v16.14.
|
|
3629
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
3630
3630
|
|
|
3631
3631
|
/*
|
|
3632
3632
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3748,7 +3748,7 @@ function validateUrl(url, logger, correlationId) {
|
|
|
3748
3748
|
}
|
|
3749
3749
|
}
|
|
3750
3750
|
|
|
3751
|
-
/*! @azure/msal-common v16.14.
|
|
3751
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
3752
3752
|
|
|
3753
3753
|
/*
|
|
3754
3754
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3796,7 +3796,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3796
3796
|
},
|
|
3797
3797
|
};
|
|
3798
3798
|
|
|
3799
|
-
/*! @azure/msal-common v16.14.
|
|
3799
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
3800
3800
|
|
|
3801
3801
|
/*
|
|
3802
3802
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3819,7 +3819,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
|
|
|
3819
3819
|
},
|
|
3820
3820
|
};
|
|
3821
3821
|
|
|
3822
|
-
/*! @azure/msal-common v16.14.
|
|
3822
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
3823
3823
|
/*
|
|
3824
3824
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3825
3825
|
* Licensed under the MIT License.
|
|
@@ -4094,12 +4094,12 @@ class Logger {
|
|
|
4094
4094
|
}
|
|
4095
4095
|
}
|
|
4096
4096
|
|
|
4097
|
-
/*! @azure/msal-common v16.14.
|
|
4097
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
4098
4098
|
/* eslint-disable header/header */
|
|
4099
4099
|
const name$1 = "@azure/msal-common";
|
|
4100
|
-
const version$1 = "16.14.
|
|
4100
|
+
const version$1 = "16.14.3";
|
|
4101
4101
|
|
|
4102
|
-
/*! @azure/msal-common v16.14.
|
|
4102
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
4103
4103
|
/*
|
|
4104
4104
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4105
4105
|
* Licensed under the MIT License.
|
|
@@ -4107,7 +4107,7 @@ const version$1 = "16.14.2";
|
|
|
4107
4107
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4108
4108
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4109
4109
|
|
|
4110
|
-
/*! @azure/msal-common v16.14.
|
|
4110
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
4111
4111
|
|
|
4112
4112
|
/*
|
|
4113
4113
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4145,7 +4145,7 @@ function createCacheError(e) {
|
|
|
4145
4145
|
}
|
|
4146
4146
|
}
|
|
4147
4147
|
|
|
4148
|
-
/*! @azure/msal-common v16.14.
|
|
4148
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
4149
4149
|
|
|
4150
4150
|
/*
|
|
4151
4151
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5332,7 +5332,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5332
5332
|
}
|
|
5333
5333
|
}
|
|
5334
5334
|
|
|
5335
|
-
/*! @azure/msal-common v16.14.
|
|
5335
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5336
5336
|
/*
|
|
5337
5337
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5338
5338
|
* Licensed under the MIT License.
|
|
@@ -5346,7 +5346,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5346
5346
|
const PerformanceEventStatus = {
|
|
5347
5347
|
InProgress: 1};
|
|
5348
5348
|
|
|
5349
|
-
/*! @azure/msal-common v16.14.
|
|
5349
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5350
5350
|
|
|
5351
5351
|
/*
|
|
5352
5352
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5404,7 +5404,7 @@ class StubPerformanceClient {
|
|
|
5404
5404
|
}
|
|
5405
5405
|
}
|
|
5406
5406
|
|
|
5407
|
-
/*! @azure/msal-common v16.14.
|
|
5407
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5408
5408
|
|
|
5409
5409
|
/*
|
|
5410
5410
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5502,7 +5502,7 @@ function isOidcProtocolMode(config) {
|
|
|
5502
5502
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5503
5503
|
}
|
|
5504
5504
|
|
|
5505
|
-
/*! @azure/msal-common v16.14.
|
|
5505
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5506
5506
|
/*
|
|
5507
5507
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5508
5508
|
* Licensed under the MIT License.
|
|
@@ -5529,7 +5529,7 @@ function isOidcProtocolMode(config) {
|
|
|
5529
5529
|
}
|
|
5530
5530
|
}
|
|
5531
5531
|
|
|
5532
|
-
/*! @azure/msal-common v16.14.
|
|
5532
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5533
5533
|
|
|
5534
5534
|
/*
|
|
5535
5535
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5550,7 +5550,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
5550
5550
|
return new JoseHeaderError(code, correlationId);
|
|
5551
5551
|
}
|
|
5552
5552
|
|
|
5553
|
-
/*! @azure/msal-common v16.14.
|
|
5553
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5554
5554
|
/*
|
|
5555
5555
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5556
5556
|
* Licensed under the MIT License.
|
|
@@ -5575,7 +5575,7 @@ function isPlainObject(value) {
|
|
|
5575
5575
|
return Object.getPrototypeOf(value) === proto;
|
|
5576
5576
|
}
|
|
5577
5577
|
|
|
5578
|
-
/*! @azure/msal-common v16.14.
|
|
5578
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5579
5579
|
/*
|
|
5580
5580
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5581
5581
|
* Licensed under the MIT License.
|
|
@@ -5585,7 +5585,7 @@ const missingAlgError = "missing_alg_error";
|
|
|
5585
5585
|
const missingJwkError = "missing_jwk_error";
|
|
5586
5586
|
const invalidJwkError = "invalid_jwk_error";
|
|
5587
5587
|
|
|
5588
|
-
/*! @azure/msal-common v16.14.
|
|
5588
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5589
5589
|
|
|
5590
5590
|
/*
|
|
5591
5591
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5651,7 +5651,7 @@ class JoseHeader {
|
|
|
5651
5651
|
}
|
|
5652
5652
|
}
|
|
5653
5653
|
|
|
5654
|
-
/*! @azure/msal-common v16.14.
|
|
5654
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5655
5655
|
|
|
5656
5656
|
/*
|
|
5657
5657
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5752,7 +5752,7 @@ class PopTokenGenerator {
|
|
|
5752
5752
|
}
|
|
5753
5753
|
}
|
|
5754
5754
|
|
|
5755
|
-
/*! @azure/msal-common v16.14.
|
|
5755
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5756
5756
|
|
|
5757
5757
|
/*
|
|
5758
5758
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5897,7 +5897,7 @@ class DpopProofGenerator {
|
|
|
5897
5897
|
}
|
|
5898
5898
|
}
|
|
5899
5899
|
|
|
5900
|
-
/*! @azure/msal-common v16.14.
|
|
5900
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5901
5901
|
/*
|
|
5902
5902
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5903
5903
|
* Licensed under the MIT License.
|
|
@@ -5948,7 +5948,7 @@ const badToken = "bad_token";
|
|
|
5948
5948
|
*/
|
|
5949
5949
|
const interruptedUser = "interrupted_user";
|
|
5950
5950
|
|
|
5951
|
-
/*! @azure/msal-common v16.14.
|
|
5951
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
5952
5952
|
|
|
5953
5953
|
/*
|
|
5954
5954
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6015,7 +6015,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
6015
6015
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6016
6016
|
}
|
|
6017
6017
|
|
|
6018
|
-
/*! @azure/msal-common v16.14.
|
|
6018
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6019
6019
|
|
|
6020
6020
|
/*
|
|
6021
6021
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6034,7 +6034,7 @@ class ServerError extends AuthError {
|
|
|
6034
6034
|
}
|
|
6035
6035
|
}
|
|
6036
6036
|
|
|
6037
|
-
/*! @azure/msal-common v16.14.
|
|
6037
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6038
6038
|
|
|
6039
6039
|
/*
|
|
6040
6040
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6105,7 +6105,7 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
6105
6105
|
}
|
|
6106
6106
|
}
|
|
6107
6107
|
|
|
6108
|
-
/*! @azure/msal-common v16.14.
|
|
6108
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6109
6109
|
|
|
6110
6110
|
/*
|
|
6111
6111
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6533,7 +6533,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6533
6533
|
return baseAccount;
|
|
6534
6534
|
}
|
|
6535
6535
|
|
|
6536
|
-
/*! @azure/msal-common v16.14.
|
|
6536
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6537
6537
|
/*
|
|
6538
6538
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6539
6539
|
* Licensed under the MIT License.
|
|
@@ -6543,7 +6543,7 @@ const CcsCredentialType = {
|
|
|
6543
6543
|
UPN: "UPN",
|
|
6544
6544
|
};
|
|
6545
6545
|
|
|
6546
|
-
/*! @azure/msal-common v16.14.
|
|
6546
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6547
6547
|
/*
|
|
6548
6548
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6549
6549
|
* Licensed under the MIT License.
|
|
@@ -6562,7 +6562,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6562
6562
|
}
|
|
6563
6563
|
}
|
|
6564
6564
|
|
|
6565
|
-
/*! @azure/msal-common v16.14.
|
|
6565
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6566
6566
|
|
|
6567
6567
|
/*
|
|
6568
6568
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6586,7 +6586,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6586
6586
|
};
|
|
6587
6587
|
}
|
|
6588
6588
|
|
|
6589
|
-
/*! @azure/msal-common v16.14.
|
|
6589
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6590
6590
|
|
|
6591
6591
|
/*
|
|
6592
6592
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6672,7 +6672,7 @@ class ThrottlingUtils {
|
|
|
6672
6672
|
}
|
|
6673
6673
|
}
|
|
6674
6674
|
|
|
6675
|
-
/*! @azure/msal-common v16.14.
|
|
6675
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6676
6676
|
|
|
6677
6677
|
/*
|
|
6678
6678
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6703,7 +6703,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
6703
6703
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6704
6704
|
}
|
|
6705
6705
|
|
|
6706
|
-
/*! @azure/msal-common v16.14.
|
|
6706
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6707
6707
|
|
|
6708
6708
|
/*
|
|
6709
6709
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6836,7 +6836,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
6836
6836
|
return response;
|
|
6837
6837
|
}
|
|
6838
6838
|
|
|
6839
|
-
/*! @azure/msal-common v16.14.
|
|
6839
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
6840
6840
|
|
|
6841
6841
|
/*
|
|
6842
6842
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7100,7 +7100,7 @@ class AuthorizationCodeClient {
|
|
|
7100
7100
|
}
|
|
7101
7101
|
}
|
|
7102
7102
|
|
|
7103
|
-
/*! @azure/msal-common v16.14.
|
|
7103
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
7104
7104
|
|
|
7105
7105
|
/*
|
|
7106
7106
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7327,7 +7327,7 @@ function extractLoginHint(account) {
|
|
|
7327
7327
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7328
7328
|
}
|
|
7329
7329
|
|
|
7330
|
-
/*! @azure/msal-common v16.14.
|
|
7330
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
7331
7331
|
|
|
7332
7332
|
/*
|
|
7333
7333
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7562,7 +7562,7 @@ class RefreshTokenClient {
|
|
|
7562
7562
|
}
|
|
7563
7563
|
}
|
|
7564
7564
|
|
|
7565
|
-
/*! @azure/msal-common v16.14.
|
|
7565
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
7566
7566
|
|
|
7567
7567
|
/*
|
|
7568
7568
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7855,7 +7855,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
|
|
|
7855
7855
|
clearNativeBrokerErrorCode() { }
|
|
7856
7856
|
}
|
|
7857
7857
|
|
|
7858
|
-
/*! @azure/msal-common v16.14.
|
|
7858
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
7859
7859
|
|
|
7860
7860
|
/*
|
|
7861
7861
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7982,7 +7982,7 @@ class SilentFlowClient {
|
|
|
7982
7982
|
}
|
|
7983
7983
|
}
|
|
7984
7984
|
|
|
7985
|
-
/*! @azure/msal-common v16.14.
|
|
7985
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
7986
7986
|
|
|
7987
7987
|
/*
|
|
7988
7988
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7998,7 +7998,7 @@ const StubbedNetworkModule = {
|
|
|
7998
7998
|
},
|
|
7999
7999
|
};
|
|
8000
8000
|
|
|
8001
|
-
/*! @azure/msal-common v16.14.
|
|
8001
|
+
/*! @azure/msal-common v16.14.3 2026-10-21 */
|
|
8002
8002
|
|
|
8003
8003
|
/*
|
|
8004
8004
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8153,13 +8153,14 @@ class RedirectError extends CustomAuthError {
|
|
|
8153
8153
|
* Custom Auth API error.
|
|
8154
8154
|
*/
|
|
8155
8155
|
class CustomAuthApiError extends CustomAuthError {
|
|
8156
|
-
constructor(error, errorDescription, correlationId, errorCodes, subError, attributes, continuationToken, traceId, timestamp, attributeValidationDetails) {
|
|
8156
|
+
constructor(error, errorDescription, correlationId, errorCodes, subError, attributes, continuationToken, traceId, timestamp, attributeValidationDetails, innerErrorCode) {
|
|
8157
8157
|
super(error, errorDescription, correlationId, errorCodes, subError);
|
|
8158
8158
|
this.attributes = attributes;
|
|
8159
8159
|
this.continuationToken = continuationToken;
|
|
8160
8160
|
this.traceId = traceId;
|
|
8161
8161
|
this.timestamp = timestamp;
|
|
8162
8162
|
this.attributeValidationDetails = attributeValidationDetails;
|
|
8163
|
+
this.innerErrorCode = innerErrorCode;
|
|
8163
8164
|
Object.setPrototypeOf(this, CustomAuthApiError.prototype);
|
|
8164
8165
|
}
|
|
8165
8166
|
}
|
|
@@ -8201,7 +8202,7 @@ const INVALID_EXPIRES_IN = "invalid_expires_in";
|
|
|
8201
8202
|
const INVALID_TOKEN_TYPE = "invalid_token_type";
|
|
8202
8203
|
const HTTP_REQUEST_FAILED$1 = "http_request_failed";
|
|
8203
8204
|
const INVALID_REQUEST = "invalid_request";
|
|
8204
|
-
const USER_NOT_FOUND = "user_not_found";
|
|
8205
|
+
const USER_NOT_FOUND$1 = "user_not_found";
|
|
8205
8206
|
const INVALID_GRANT = "invalid_grant";
|
|
8206
8207
|
const CREDENTIAL_REQUIRED = "credential_required";
|
|
8207
8208
|
const ATTRIBUTES_REQUIRED = "attributes_required";
|
|
@@ -8241,7 +8242,7 @@ class AuthFlowErrorBase {
|
|
|
8241
8242
|
this.errorData = errorData;
|
|
8242
8243
|
}
|
|
8243
8244
|
isUserNotFoundError() {
|
|
8244
|
-
return this.errorData.error === USER_NOT_FOUND;
|
|
8245
|
+
return this.errorData.error === USER_NOT_FOUND$1;
|
|
8245
8246
|
}
|
|
8246
8247
|
isUserInvalidError() {
|
|
8247
8248
|
return ((this.errorData instanceof InvalidArgumentError &&
|
|
@@ -8423,11 +8424,17 @@ function ensureArgumentIsJSONString(argName, argValue, correlationId) {
|
|
|
8423
8424
|
}
|
|
8424
8425
|
throw e; // Rethrow unexpected errors
|
|
8425
8426
|
}
|
|
8427
|
+
}
|
|
8428
|
+
function ensureArgumentIsStringArray(argName, argValue, correlationId) {
|
|
8429
|
+
if (!Array.isArray(argValue) ||
|
|
8430
|
+
!argValue.every((value) => typeof value === "string")) {
|
|
8431
|
+
throw new InvalidArgumentError(argName, correlationId);
|
|
8432
|
+
}
|
|
8426
8433
|
}
|
|
8427
8434
|
|
|
8428
8435
|
/* eslint-disable header/header */
|
|
8429
8436
|
const name = "@azure/msal-browser";
|
|
8430
|
-
const version = "5.
|
|
8437
|
+
const version = "5.26.0";
|
|
8431
8438
|
|
|
8432
8439
|
/*
|
|
8433
8440
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8637,7 +8644,7 @@ class SignInError extends AuthActionErrorBase {
|
|
|
8637
8644
|
* @returns true if the error is due to the user not being found, false otherwise.
|
|
8638
8645
|
*/
|
|
8639
8646
|
isUserNotFound() {
|
|
8640
|
-
return this.errorData.error === USER_NOT_FOUND;
|
|
8647
|
+
return this.errorData.error === USER_NOT_FOUND$1;
|
|
8641
8648
|
}
|
|
8642
8649
|
/**
|
|
8643
8650
|
* Checks if the error is due to the username being invalid.
|
|
@@ -12145,7 +12152,7 @@ function filterCustomHeaders(headers, logger, correlationId) {
|
|
|
12145
12152
|
* Licensed under the MIT License.
|
|
12146
12153
|
*/
|
|
12147
12154
|
const HTTP_REQUEST_FAILED = "http_request_failed";
|
|
12148
|
-
const
|
|
12155
|
+
const WEB_REDIRECT_REQUIRED = "web_redirect_required";
|
|
12149
12156
|
const UNEXPECTED_ERROR = "unexpected_error";
|
|
12150
12157
|
const AUTH_CODE_MISSING = "authorization_code_missing";
|
|
12151
12158
|
const INVALID_TOKEN_RESPONSE = "invalid_token_response";
|
|
@@ -12197,6 +12204,7 @@ function normalizeOAuthError(response) {
|
|
|
12197
12204
|
code: readString(response.error) ?? UNEXPECTED_ERROR,
|
|
12198
12205
|
message: readString(response.error_description),
|
|
12199
12206
|
errorCodes: readNumberArray(response.error_codes),
|
|
12207
|
+
subError: readString(response.suberror),
|
|
12200
12208
|
correlationId: readString(response.correlation_id),
|
|
12201
12209
|
traceId: readString(response.trace_id),
|
|
12202
12210
|
timestamp: readString(response.timestamp),
|
|
@@ -12212,32 +12220,6 @@ function readNumberArray(value) {
|
|
|
12212
12220
|
return undefined;
|
|
12213
12221
|
}
|
|
12214
12222
|
|
|
12215
|
-
/*
|
|
12216
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12217
|
-
* Licensed under the MIT License.
|
|
12218
|
-
*/
|
|
12219
|
-
// Content type used by V2 JSON `/api` requests.
|
|
12220
|
-
const JSON_CONTENT_TYPE = "application/json";
|
|
12221
|
-
// Server action returned after successful credential verification.
|
|
12222
|
-
const UPDATE_RELATION = "update";
|
|
12223
|
-
const CHALLENGE_RELATION = "challenge";
|
|
12224
|
-
const VERIFY_RELATION = "verify";
|
|
12225
|
-
const RISK_VERIFY_RELATION = "riskverify";
|
|
12226
|
-
const COLLECT_ATTRIBUTES_RELATION = "collectAttributes";
|
|
12227
|
-
const AuthenticationMethodTypeV2 = {
|
|
12228
|
-
EMAIL: "email",
|
|
12229
|
-
PASSWORD: "password",
|
|
12230
|
-
SMS: "sms",
|
|
12231
|
-
};
|
|
12232
|
-
/*
|
|
12233
|
-
* Known `state` values on a HAL response. Kept open (the body field is typed as string) because
|
|
12234
|
-
* the server may introduce new values; response parsing and flow logic branch on these constants.
|
|
12235
|
-
*/
|
|
12236
|
-
const ResponseStateV2 = {
|
|
12237
|
-
CONTINUE: "continue",
|
|
12238
|
-
WEB_FALLBACK_REQUIRED: "webFallbackRequired",
|
|
12239
|
-
};
|
|
12240
|
-
|
|
12241
12223
|
/*
|
|
12242
12224
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12243
12225
|
* Licensed under the MIT License.
|
|
@@ -12258,17 +12240,14 @@ class ResponseHandlerV2 {
|
|
|
12258
12240
|
const correlationId = response.headers.get(HttpHeaderKeys.X_MS_REQUEST_ID) ??
|
|
12259
12241
|
requestCorrelationId;
|
|
12260
12242
|
const json = await this.parseBody(response, correlationId);
|
|
12261
|
-
const state = typeof json.state === "string" ? json.state : undefined;
|
|
12262
12243
|
const continuationToken = (typeof json.continuationToken === "string"
|
|
12263
12244
|
? json.continuationToken
|
|
12264
12245
|
: undefined) ??
|
|
12265
12246
|
(typeof json.continuation_token === "string"
|
|
12266
12247
|
? json.continuation_token
|
|
12267
12248
|
: undefined);
|
|
12268
|
-
const flatError = typeof json.error === "string" ? json.error : undefined;
|
|
12269
|
-
const isWebFallbackRequired = flatError === REDIRECT_TO_WEB ||
|
|
12270
|
-
state === ResponseStateV2.WEB_FALLBACK_REQUIRED;
|
|
12271
12249
|
const error = normalizeServerErrorV2(json);
|
|
12250
|
+
const isWebFallbackRequired = error?.subError === WEB_REDIRECT_REQUIRED;
|
|
12272
12251
|
// Surface the header correlation id on the body (HalResponseBaseV2.correlationId).
|
|
12273
12252
|
json.correlationId = correlationId;
|
|
12274
12253
|
return {
|
|
@@ -12384,6 +12363,31 @@ function apiPath(path) {
|
|
|
12384
12363
|
return path.startsWith("/") ? path : `/${path}`;
|
|
12385
12364
|
}
|
|
12386
12365
|
|
|
12366
|
+
/*
|
|
12367
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12368
|
+
* Licensed under the MIT License.
|
|
12369
|
+
*/
|
|
12370
|
+
// Content type used by V2 JSON `/api` requests.
|
|
12371
|
+
const JSON_CONTENT_TYPE = "application/json";
|
|
12372
|
+
// Server action returned after successful credential verification.
|
|
12373
|
+
const UPDATE_RELATION = "update";
|
|
12374
|
+
const CHALLENGE_RELATION = "challenge";
|
|
12375
|
+
const VERIFY_RELATION = "verify";
|
|
12376
|
+
const RISK_VERIFY_RELATION = "riskverify";
|
|
12377
|
+
const COLLECT_ATTRIBUTES_RELATION = "collectAttributes";
|
|
12378
|
+
const AuthenticationMethodTypeV2 = {
|
|
12379
|
+
EMAIL: "email",
|
|
12380
|
+
PASSWORD: "password",
|
|
12381
|
+
SMS: "sms",
|
|
12382
|
+
};
|
|
12383
|
+
/*
|
|
12384
|
+
* Known `state` values on a HAL response. Kept open (the body field is typed as string) because
|
|
12385
|
+
* the server may introduce new values; response parsing and flow logic branch on these constants.
|
|
12386
|
+
*/
|
|
12387
|
+
const ResponseStateV2 = {
|
|
12388
|
+
CONTINUE: "continue",
|
|
12389
|
+
};
|
|
12390
|
+
|
|
12387
12391
|
/*
|
|
12388
12392
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12389
12393
|
* Licensed under the MIT License.
|
|
@@ -12426,13 +12430,16 @@ class BaseApiClientV2 {
|
|
|
12426
12430
|
/*
|
|
12427
12431
|
* Starts authorization and returns the initial continuation token and flow links.
|
|
12428
12432
|
*/
|
|
12429
|
-
async authorizeChallengeStart(context, scopes) {
|
|
12433
|
+
async authorizeChallengeStart(context, scopes, claims) {
|
|
12430
12434
|
const request = {
|
|
12431
12435
|
client_id: this.clientId,
|
|
12432
12436
|
};
|
|
12433
12437
|
if (scopes?.length) {
|
|
12434
12438
|
request.scope = scopes.join(" ");
|
|
12435
12439
|
}
|
|
12440
|
+
if (claims) {
|
|
12441
|
+
request.claims = claims;
|
|
12442
|
+
}
|
|
12436
12443
|
const parsedResponse = await this.postOAuthForm(AUTHORIZE_CHALLENGE, request, context);
|
|
12437
12444
|
const { continuationToken, correlationId, error, body } = parsedResponse;
|
|
12438
12445
|
/*
|
|
@@ -12459,7 +12466,7 @@ class BaseApiClientV2 {
|
|
|
12459
12466
|
*/
|
|
12460
12467
|
async completeWithTokens(request, context) {
|
|
12461
12468
|
const code = await this.authorizeChallengeContinue(request.continuationToken, context);
|
|
12462
|
-
return this.token(code,
|
|
12469
|
+
return this.token(code, context);
|
|
12463
12470
|
}
|
|
12464
12471
|
/*
|
|
12465
12472
|
* Redeems a continuation token for an authorization code.
|
|
@@ -12480,7 +12487,7 @@ class BaseApiClientV2 {
|
|
|
12480
12487
|
/*
|
|
12481
12488
|
* Exchanges an authorization code for tokens.
|
|
12482
12489
|
*/
|
|
12483
|
-
async token(code,
|
|
12490
|
+
async token(code, context) {
|
|
12484
12491
|
const request = {
|
|
12485
12492
|
client_id: this.clientId,
|
|
12486
12493
|
grant_type: GrantType$1.AUTHORIZATION_CODE_GRANT,
|
|
@@ -12488,9 +12495,6 @@ class BaseApiClientV2 {
|
|
|
12488
12495
|
// Required so the server returns the client_info blob MSAL uses to build the home account id.
|
|
12489
12496
|
client_info: "1",
|
|
12490
12497
|
};
|
|
12491
|
-
if (scopes.length > 0) {
|
|
12492
|
-
request.scope = scopes.join(" ");
|
|
12493
|
-
}
|
|
12494
12498
|
const parsedResponse = await this.postOAuthForm(SIGNIN_TOKEN, request, context);
|
|
12495
12499
|
this.throwOnApiError(parsedResponse);
|
|
12496
12500
|
this.ensureTokenResponseIsValid(parsedResponse.body, parsedResponse.correlationId);
|
|
@@ -12543,11 +12547,13 @@ class BaseApiClientV2 {
|
|
|
12543
12547
|
}
|
|
12544
12548
|
}
|
|
12545
12549
|
toApiError(serverError, correlationId) {
|
|
12546
|
-
return new CustomAuthApiError(serverError.code, serverError.message ?? "", serverError.correlationId ?? correlationId, serverError.errorCodes, serverError.
|
|
12550
|
+
return new CustomAuthApiError(serverError.code, serverError.message ?? "", serverError.correlationId ?? correlationId, serverError.errorCodes, serverError.subError, undefined, undefined, serverError.traceId, serverError.timestamp, serverError.attributeValidationDetails, serverError.innerErrorCode);
|
|
12547
12551
|
}
|
|
12548
12552
|
throwOnWebFallback(parsedResponse) {
|
|
12549
12553
|
if (parsedResponse.isWebFallbackRequired) {
|
|
12550
|
-
|
|
12554
|
+
if (parsedResponse.error?.subError === WEB_REDIRECT_REQUIRED) {
|
|
12555
|
+
throw this.toApiError(parsedResponse.error, parsedResponse.correlationId);
|
|
12556
|
+
}
|
|
12551
12557
|
}
|
|
12552
12558
|
}
|
|
12553
12559
|
ensureTokenResponseIsValid(tokenResponse, correlationId) {
|
|
@@ -12875,13 +12881,16 @@ class InteractionClientBaseV2 extends StandardInteractionClient {
|
|
|
12875
12881
|
...defaultScopes.filter((scope) => !seenScopes.has(scope.toLowerCase())),
|
|
12876
12882
|
];
|
|
12877
12883
|
}
|
|
12878
|
-
async handleTokenResponse(tokenResponse,
|
|
12884
|
+
async handleTokenResponse(tokenResponse, requestedScopes, correlationId, apiId) {
|
|
12879
12885
|
this.logger.verbose("1aahxi", correlationId);
|
|
12880
12886
|
const requestTimestamp = Math.round(new Date().getTime() / 1000.0);
|
|
12887
|
+
const responseScopes = tokenResponse.scope
|
|
12888
|
+
? tokenResponse.scope.split(" ").filter((scope) => !!scope)
|
|
12889
|
+
: requestedScopes;
|
|
12881
12890
|
const result = await this.tokenResponseHandler.handleServerTokenResponse(tokenResponse, this.customAuthAuthority, requestTimestamp, {
|
|
12882
12891
|
authority: this.customAuthAuthority.canonicalAuthority,
|
|
12883
12892
|
correlationId,
|
|
12884
|
-
scopes:
|
|
12893
|
+
scopes: responseScopes,
|
|
12885
12894
|
}, apiId);
|
|
12886
12895
|
return result;
|
|
12887
12896
|
}
|
|
@@ -13005,13 +13014,15 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13005
13014
|
this.apiClient = apiClient;
|
|
13006
13015
|
}
|
|
13007
13016
|
/*
|
|
13008
|
-
* Starts sign-in using
|
|
13017
|
+
* Starts sign-in by automatically using a sole supported method or returning
|
|
13018
|
+
* multiple supported methods for user selection.
|
|
13009
13019
|
*/
|
|
13010
13020
|
async signIn(parameters) {
|
|
13011
13021
|
const correlationId = parameters.correlationId;
|
|
13012
13022
|
const context = this.createRequestContext(SIGN_IN_V2_START, correlationId);
|
|
13013
13023
|
this.logger.verbose("1jeyrn", correlationId);
|
|
13014
|
-
const
|
|
13024
|
+
const scopes = this.getScopes(parameters.scopes);
|
|
13025
|
+
const entryResult = await this.apiClient.authorizeChallengeStart(context, scopes, parameters.claims);
|
|
13015
13026
|
const startResult = await this.apiClient.signInStart(this.requireLink(correlationId, entryResult.signInHref, {
|
|
13016
13027
|
code: SIGN_IN_UNSUPPORTED,
|
|
13017
13028
|
message: "The authorize-challenge entry response did not include a sign-in link.",
|
|
@@ -13023,10 +13034,8 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13023
13034
|
const continuationState = {
|
|
13024
13035
|
continuationToken: startResult.continuationToken,
|
|
13025
13036
|
scenario: CustomAuthFlowScenarioV2.SignIn,
|
|
13037
|
+
scopes,
|
|
13026
13038
|
links: {},
|
|
13027
|
-
tokenRequest: {
|
|
13028
|
-
scopes: parameters.scopes,
|
|
13029
|
-
},
|
|
13030
13039
|
};
|
|
13031
13040
|
const methods = startResult.methods.map((method) => ({
|
|
13032
13041
|
id: method.id,
|
|
@@ -13034,7 +13043,15 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13034
13043
|
hint: method.hint,
|
|
13035
13044
|
challengeHref: method.challengeHref,
|
|
13036
13045
|
}));
|
|
13037
|
-
const
|
|
13046
|
+
const supportedMethods = this.getSupportedSignInMethods(methods, correlationId);
|
|
13047
|
+
if (supportedMethods.length > 1) {
|
|
13048
|
+
return createFlowMethodSelectionRequiredResultV2({
|
|
13049
|
+
correlationId,
|
|
13050
|
+
continuationState,
|
|
13051
|
+
methods: supportedMethods,
|
|
13052
|
+
});
|
|
13053
|
+
}
|
|
13054
|
+
const selectedMethod = supportedMethods[0];
|
|
13038
13055
|
const challengeResult = await this.requestChallenge({
|
|
13039
13056
|
correlationId,
|
|
13040
13057
|
continuationState: {
|
|
@@ -13067,7 +13084,8 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13067
13084
|
const correlationId = parameters.correlationId;
|
|
13068
13085
|
const context = this.createRequestContext(SIGN_UP_V2_START, correlationId);
|
|
13069
13086
|
this.logger.verbose("19e1ak", correlationId);
|
|
13070
|
-
const
|
|
13087
|
+
const scopes = this.getScopes(parameters.scopes);
|
|
13088
|
+
const entryResult = await this.apiClient.authorizeChallengeStart(context, scopes, parameters.claims);
|
|
13071
13089
|
const startResult = await this.apiClient.signUpStart(this.requireLink(correlationId, entryResult.signUpHref, {
|
|
13072
13090
|
code: SIGN_UP_UNSUPPORTED,
|
|
13073
13091
|
message: "The authorize-challenge entry response did not include a sign-up link.",
|
|
@@ -13087,10 +13105,8 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13087
13105
|
const continuationState = {
|
|
13088
13106
|
continuationToken: startResult.continuationToken,
|
|
13089
13107
|
scenario: CustomAuthFlowScenarioV2.SignUp,
|
|
13108
|
+
scopes,
|
|
13090
13109
|
links: {},
|
|
13091
|
-
tokenRequest: {
|
|
13092
|
-
scopes: parameters.scopes,
|
|
13093
|
-
},
|
|
13094
13110
|
signUp: {
|
|
13095
13111
|
passwordWasSupplied: attributes.password !== undefined,
|
|
13096
13112
|
},
|
|
@@ -13111,7 +13127,8 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13111
13127
|
const correlationId = parameters.correlationId;
|
|
13112
13128
|
const context = this.createRequestContext(RESET_PASSWORD_V2_START, correlationId);
|
|
13113
13129
|
this.logger.verbose("1en88i", correlationId);
|
|
13114
|
-
const
|
|
13130
|
+
const scopes = this.getScopes(parameters.scopes);
|
|
13131
|
+
const entryResult = await this.apiClient.authorizeChallengeStart(context, scopes, parameters.claims);
|
|
13115
13132
|
const startResult = await this.apiClient.resetPasswordStart(this.requireLink(correlationId, entryResult.resetPasswordHref, {
|
|
13116
13133
|
code: RESET_PASSWORD_UNSUPPORTED,
|
|
13117
13134
|
message: "The authorize-challenge entry response did not include a reset-password link.",
|
|
@@ -13123,6 +13140,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13123
13140
|
const continuationState = {
|
|
13124
13141
|
continuationToken: startResult.continuationToken,
|
|
13125
13142
|
scenario: CustomAuthFlowScenarioV2.PasswordReset,
|
|
13143
|
+
scopes,
|
|
13126
13144
|
links: {},
|
|
13127
13145
|
};
|
|
13128
13146
|
const methods = startResult.methods.map((method) => ({
|
|
@@ -13177,21 +13195,30 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13177
13195
|
*/
|
|
13178
13196
|
async requestChallenge(parameters) {
|
|
13179
13197
|
const challengeResult = await this.sendMethodChallenge(parameters, "requestChallenge");
|
|
13180
|
-
const challengeType = challengeResult.type
|
|
13198
|
+
const challengeType = challengeResult.type;
|
|
13199
|
+
const normalizedChallengeType = challengeType?.toLowerCase();
|
|
13181
13200
|
const continuationState = this.createChallengeContinuationState(parameters.continuationState, challengeResult);
|
|
13182
|
-
if (
|
|
13201
|
+
if (normalizedChallengeType === AuthenticationMethodTypeV2.PASSWORD) {
|
|
13183
13202
|
return createFlowPasswordRequiredResultV2({
|
|
13184
13203
|
correlationId: parameters.correlationId,
|
|
13185
13204
|
continuationState,
|
|
13186
13205
|
});
|
|
13187
13206
|
}
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13207
|
+
if (normalizedChallengeType === AuthenticationMethodTypeV2.EMAIL ||
|
|
13208
|
+
normalizedChallengeType === AuthenticationMethodTypeV2.SMS) {
|
|
13209
|
+
return createFlowCodeRequiredResultV2({
|
|
13210
|
+
correlationId: parameters.correlationId,
|
|
13211
|
+
continuationState,
|
|
13212
|
+
channel: challengeType,
|
|
13213
|
+
sentTo: challengeResult.hint,
|
|
13214
|
+
codeLength: challengeResult.codeLength,
|
|
13215
|
+
});
|
|
13216
|
+
}
|
|
13217
|
+
const message = challengeType
|
|
13218
|
+
? `Challenge type '${challengeType}' is not supported.`
|
|
13219
|
+
: "Challenge type is missing.";
|
|
13220
|
+
this.logger.error(message, parameters.correlationId);
|
|
13221
|
+
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, parameters.correlationId);
|
|
13195
13222
|
}
|
|
13196
13223
|
/*
|
|
13197
13224
|
* Verifies the submitted one-time code using the server-provided link. The
|
|
@@ -13216,6 +13243,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13216
13243
|
continuationState: {
|
|
13217
13244
|
continuationToken: verifyResult.continuationToken,
|
|
13218
13245
|
scenario: continuationState.scenario,
|
|
13246
|
+
scopes: continuationState.scopes,
|
|
13219
13247
|
links: { update: verifyResult.updateHref },
|
|
13220
13248
|
},
|
|
13221
13249
|
});
|
|
@@ -13230,10 +13258,10 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13230
13258
|
const nextContinuationState = {
|
|
13231
13259
|
continuationToken: verifyResult.continuationToken,
|
|
13232
13260
|
scenario: continuationState.scenario,
|
|
13261
|
+
scopes: continuationState.scopes,
|
|
13233
13262
|
links: {
|
|
13234
13263
|
submitAttributes: verifyResult.submitAttributesHref,
|
|
13235
13264
|
},
|
|
13236
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13237
13265
|
signUp: continuationState.signUp,
|
|
13238
13266
|
};
|
|
13239
13267
|
const attributes = verifyResult.attributes.filter((attribute) => attribute.attributeId.toLowerCase() !== "password");
|
|
@@ -13259,8 +13287,8 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13259
13287
|
continuationState: {
|
|
13260
13288
|
continuationToken: verifyResult.continuationToken,
|
|
13261
13289
|
scenario: continuationState.scenario,
|
|
13290
|
+
scopes: continuationState.scopes,
|
|
13262
13291
|
links: {},
|
|
13263
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13264
13292
|
},
|
|
13265
13293
|
});
|
|
13266
13294
|
}
|
|
@@ -13337,6 +13365,7 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13337
13365
|
continuationState: {
|
|
13338
13366
|
continuationToken: completionToken,
|
|
13339
13367
|
scenario: continuationState.scenario,
|
|
13368
|
+
scopes: continuationState.scopes,
|
|
13340
13369
|
links: {},
|
|
13341
13370
|
},
|
|
13342
13371
|
});
|
|
@@ -13358,12 +13387,10 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13358
13387
|
const apiId = this.resolveStepApiId(continuationState.scenario, "signInWithContinuation", correlationId);
|
|
13359
13388
|
const context = this.createRequestContext(apiId, correlationId);
|
|
13360
13389
|
this.logger.verbose("09mk3f", correlationId);
|
|
13361
|
-
const scopes = this.getScopes(parameters.scopes);
|
|
13362
13390
|
const tokenResponse = await this.apiClient.completeWithTokens({
|
|
13363
13391
|
continuationToken: continuationState.continuationToken,
|
|
13364
|
-
scopes,
|
|
13365
13392
|
}, context);
|
|
13366
|
-
const authenticationResult = await this.handleTokenResponse(tokenResponse, scopes, correlationId, apiId);
|
|
13393
|
+
const authenticationResult = await this.handleTokenResponse(tokenResponse, continuationState.scopes, correlationId, apiId);
|
|
13367
13394
|
this.logger.verbose("15nu4j", correlationId);
|
|
13368
13395
|
return createFlowCompletedResultV2({
|
|
13369
13396
|
correlationId,
|
|
@@ -13378,8 +13405,8 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13378
13405
|
continuationState: {
|
|
13379
13406
|
continuationToken: verifyResult.continuationToken,
|
|
13380
13407
|
scenario: continuationState.scenario,
|
|
13408
|
+
scopes: continuationState.scopes,
|
|
13381
13409
|
links: {},
|
|
13382
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13383
13410
|
},
|
|
13384
13411
|
methods: verifyResult.methods.map((method) => ({
|
|
13385
13412
|
id: method.id,
|
|
@@ -13396,23 +13423,17 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13396
13423
|
this.logger.error(message, correlationId);
|
|
13397
13424
|
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
|
|
13398
13425
|
}
|
|
13399
|
-
|
|
13400
|
-
const
|
|
13401
|
-
|
|
13402
|
-
|
|
13403
|
-
|
|
13404
|
-
|
|
13405
|
-
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
this.logger.error(message, correlationId);
|
|
13409
|
-
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
|
|
13410
|
-
}
|
|
13411
|
-
const selectedMethod = emailMethod ?? passwordMethod;
|
|
13412
|
-
if (selectedMethod) {
|
|
13413
|
-
return selectedMethod;
|
|
13426
|
+
getSupportedSignInMethods(methods, correlationId) {
|
|
13427
|
+
const supportedMethods = methods.filter((method) => {
|
|
13428
|
+
const methodType = method.type.toLowerCase();
|
|
13429
|
+
return (methodType === AuthenticationMethodTypeV2.EMAIL ||
|
|
13430
|
+
methodType === AuthenticationMethodTypeV2.PASSWORD ||
|
|
13431
|
+
methodType === AuthenticationMethodTypeV2.SMS);
|
|
13432
|
+
});
|
|
13433
|
+
if (supportedMethods.length > 0) {
|
|
13434
|
+
return supportedMethods;
|
|
13414
13435
|
}
|
|
13415
|
-
const message = "The sign-in start response did not include a supported email or password method.";
|
|
13436
|
+
const message = "The sign-in start response did not include a supported email, SMS, or password method.";
|
|
13416
13437
|
this.logger.error(message, correlationId);
|
|
13417
13438
|
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, message, correlationId);
|
|
13418
13439
|
}
|
|
@@ -13424,11 +13445,11 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13424
13445
|
continuationState: {
|
|
13425
13446
|
continuationToken: result.continuationToken,
|
|
13426
13447
|
scenario: continuationState.scenario,
|
|
13448
|
+
scopes: continuationState.scopes,
|
|
13427
13449
|
links: {
|
|
13428
13450
|
verify: result.verifyHref,
|
|
13429
13451
|
resend: result.resendHref,
|
|
13430
13452
|
},
|
|
13431
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13432
13453
|
signUp: continuationState.signUp,
|
|
13433
13454
|
},
|
|
13434
13455
|
channel: result.type,
|
|
@@ -13443,10 +13464,10 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13443
13464
|
const nextContinuationState = {
|
|
13444
13465
|
continuationToken: result.continuationToken,
|
|
13445
13466
|
scenario: continuationState.scenario,
|
|
13467
|
+
scopes: continuationState.scopes,
|
|
13446
13468
|
links: {
|
|
13447
13469
|
submitAttributes: result.submitAttributesHref,
|
|
13448
13470
|
},
|
|
13449
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13450
13471
|
signUp: continuationState.signUp,
|
|
13451
13472
|
};
|
|
13452
13473
|
const attributes = result.attributes.filter((attribute) => attribute.attributeId.toLowerCase() !== "password");
|
|
@@ -13471,8 +13492,8 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13471
13492
|
continuationState: {
|
|
13472
13493
|
continuationToken: result.continuationToken,
|
|
13473
13494
|
scenario: continuationState.scenario,
|
|
13495
|
+
scopes: continuationState.scopes,
|
|
13474
13496
|
links: {},
|
|
13475
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13476
13497
|
},
|
|
13477
13498
|
});
|
|
13478
13499
|
}
|
|
@@ -13503,10 +13524,9 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13503
13524
|
continuationState: {
|
|
13504
13525
|
continuationToken,
|
|
13505
13526
|
scenario: continuationState.scenario,
|
|
13527
|
+
scopes: continuationState.scopes,
|
|
13506
13528
|
links: {},
|
|
13507
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13508
13529
|
},
|
|
13509
|
-
scopes: continuationState.tokenRequest?.scopes,
|
|
13510
13530
|
});
|
|
13511
13531
|
}
|
|
13512
13532
|
async sendMethodChallenge(parameters, step) {
|
|
@@ -13535,15 +13555,13 @@ class FlowInteractionClientV2 extends InteractionClientBaseV2 {
|
|
|
13535
13555
|
return {
|
|
13536
13556
|
continuationToken: challengeResult.continuationToken,
|
|
13537
13557
|
scenario: continuationState.scenario,
|
|
13558
|
+
scopes: continuationState.scopes,
|
|
13538
13559
|
links: {
|
|
13539
13560
|
challenge: continuationState.links.challenge,
|
|
13540
13561
|
verify: challengeResult.verifyHref,
|
|
13541
13562
|
resend: challengeResult.resendHref ??
|
|
13542
13563
|
continuationState.links.resend,
|
|
13543
13564
|
},
|
|
13544
|
-
...(continuationState.tokenRequest && {
|
|
13545
|
-
tokenRequest: continuationState.tokenRequest,
|
|
13546
|
-
}),
|
|
13547
13565
|
...(continuationState.signUp && {
|
|
13548
13566
|
signUp: continuationState.signUp,
|
|
13549
13567
|
}),
|
|
@@ -13586,93 +13604,24 @@ class FailedStateV2 extends AuthFlowStateBase {
|
|
|
13586
13604
|
}
|
|
13587
13605
|
}
|
|
13588
13606
|
|
|
13589
|
-
/*
|
|
13590
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13591
|
-
* Licensed under the MIT License.
|
|
13592
|
-
*/
|
|
13593
|
-
/**
|
|
13594
|
-
* Result of a native auth V2 operation. Use {@link CustomAuthResultV2.isState}
|
|
13595
|
-
* to narrow the state before accessing its members.
|
|
13596
|
-
*/
|
|
13597
|
-
class CustomAuthResultV2 {
|
|
13598
|
-
constructor(state, data, scenario = CustomAuthFlowScenarioV2.Unknown) {
|
|
13599
|
-
this.state = state;
|
|
13600
|
-
this.data = data;
|
|
13601
|
-
this.scenario = scenario;
|
|
13602
|
-
}
|
|
13603
|
-
/**
|
|
13604
|
-
* Narrows the result to a specific state by its `stateType` discriminator.
|
|
13605
|
-
* A successful match makes the state's properties available without a cast.
|
|
13606
|
-
* @param stateType - The state type to test for.
|
|
13607
|
-
* @returns True (and narrows `state`) when the current state matches `stateType`.
|
|
13608
|
-
*/
|
|
13609
|
-
isState(stateType) {
|
|
13610
|
-
return this.state.stateType === stateType;
|
|
13611
|
-
}
|
|
13612
|
-
/**
|
|
13613
|
-
* Checks whether the result is in the terminal failed state. A failed result
|
|
13614
|
-
* contains the flow-specific error.
|
|
13615
|
-
* @returns True (and narrows `state`) when the operation failed.
|
|
13616
|
-
*/
|
|
13617
|
-
isFailed() {
|
|
13618
|
-
return this.state.stateType === "failed";
|
|
13619
|
-
}
|
|
13620
|
-
/**
|
|
13621
|
-
* Creates a failed result from the supplied error. The result uses the
|
|
13622
|
-
* shared {@link FailedStateV2} terminal state.
|
|
13623
|
-
* @param error - The error that occurred.
|
|
13624
|
-
* @param options - The flow-error type and error context.
|
|
13625
|
-
* @returns A failed result carrying the flow-specific error.
|
|
13626
|
-
*/
|
|
13627
|
-
static createWithError(error, options) {
|
|
13628
|
-
const { errorType: ErrorType, scenario = CustomAuthFlowScenarioV2.Unknown, correlationId, } = options;
|
|
13629
|
-
const errorData = CustomAuthResultV2.createErrorData(error, correlationId);
|
|
13630
|
-
const flowError = new ErrorType(errorData, scenario);
|
|
13631
|
-
const result = new CustomAuthResultV2(new FailedStateV2(), undefined, scenario);
|
|
13632
|
-
result.error = flowError;
|
|
13633
|
-
return result;
|
|
13634
|
-
}
|
|
13635
|
-
static createErrorData(error, correlationId) {
|
|
13636
|
-
if (error instanceof CustomAuthError) {
|
|
13637
|
-
return error;
|
|
13638
|
-
}
|
|
13639
|
-
if (error instanceof AuthError) {
|
|
13640
|
-
const errorCodes = [];
|
|
13641
|
-
if ("errorNo" in error) {
|
|
13642
|
-
if (typeof error.errorNo === "string") {
|
|
13643
|
-
const code = Number(error.errorNo);
|
|
13644
|
-
if (!isNaN(code)) {
|
|
13645
|
-
errorCodes.push(code);
|
|
13646
|
-
}
|
|
13647
|
-
}
|
|
13648
|
-
else if (typeof error.errorNo === "number") {
|
|
13649
|
-
errorCodes.push(error.errorNo);
|
|
13650
|
-
}
|
|
13651
|
-
}
|
|
13652
|
-
return new MsalCustomAuthError(error.errorCode, error.errorMessage, error.subError, errorCodes, error.correlationId);
|
|
13653
|
-
}
|
|
13654
|
-
return new UnexpectedError(error, correlationId);
|
|
13655
|
-
}
|
|
13656
|
-
}
|
|
13657
|
-
|
|
13658
13607
|
/*
|
|
13659
13608
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13660
13609
|
* Licensed under the MIT License.
|
|
13661
13610
|
*/
|
|
13662
13611
|
const INVALID_ONE_TIME_CODE = "invalidOneTimeCode";
|
|
13663
13612
|
const INVALID_USERNAME_OR_PASSWORD = "invalidUserNameOrPassword";
|
|
13664
|
-
const PASSWORD_TOO_WEAK = "passwordTooWeak";
|
|
13613
|
+
const PASSWORD_TOO_WEAK = "passwordTooWeak";
|
|
13614
|
+
const USER_NOT_FOUND = "userNotFound";
|
|
13665
13615
|
|
|
13666
13616
|
/*
|
|
13667
13617
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13668
13618
|
* Licensed under the MIT License.
|
|
13669
13619
|
*/
|
|
13670
|
-
|
|
13671
|
-
*
|
|
13672
|
-
*
|
|
13673
|
-
* the detectors relevant to its own action.
|
|
13620
|
+
/**
|
|
13621
|
+
* Error returned by a native authentication V2 operation. Use its classifiers
|
|
13622
|
+
* to handle known failures while retaining raw diagnostics through `errorData`.
|
|
13674
13623
|
*/
|
|
13675
|
-
class
|
|
13624
|
+
class AuthFlowErrorV2 {
|
|
13676
13625
|
constructor(errorData, scenario = CustomAuthFlowScenarioV2.Unknown) {
|
|
13677
13626
|
this.errorData = errorData;
|
|
13678
13627
|
this.scenario = scenario;
|
|
@@ -13686,14 +13635,32 @@ class AuthFlowErrorBaseV2 {
|
|
|
13686
13635
|
get errorDescription() {
|
|
13687
13636
|
return this.errorData.errorDescription;
|
|
13688
13637
|
}
|
|
13638
|
+
get innerErrorCode() {
|
|
13639
|
+
return this.errorData instanceof CustomAuthApiError
|
|
13640
|
+
? this.errorData.innerErrorCode
|
|
13641
|
+
: undefined;
|
|
13642
|
+
}
|
|
13643
|
+
/**
|
|
13644
|
+
* Gets the attribute ids that the service reports as required.
|
|
13645
|
+
*/
|
|
13646
|
+
get requiredAttributes() {
|
|
13647
|
+
return this.getAttributeIdsByCode("attributeRequired");
|
|
13648
|
+
}
|
|
13649
|
+
/**
|
|
13650
|
+
* Gets the attribute ids whose submitted values failed validation.
|
|
13651
|
+
*/
|
|
13652
|
+
get invalidAttributes() {
|
|
13653
|
+
return this.getAttributeIdsByCode("attributeValidationFailed");
|
|
13654
|
+
}
|
|
13689
13655
|
/**
|
|
13690
13656
|
* Checks if the error requires the flow to continue in the browser. The
|
|
13691
|
-
* server surfaces this as
|
|
13692
|
-
*
|
|
13657
|
+
* server surfaces this as the `web_redirect_required` OAuth suberror, so a
|
|
13658
|
+
* browser hand-off arrives as a `FailedStateV2` on which this detector
|
|
13659
|
+
* returns true.
|
|
13693
13660
|
* @returns True if the browser is required, false otherwise.
|
|
13694
13661
|
*/
|
|
13695
13662
|
isBrowserRequired() {
|
|
13696
|
-
return this.errorData.
|
|
13663
|
+
return this.errorData.subError === WEB_REDIRECT_REQUIRED;
|
|
13697
13664
|
}
|
|
13698
13665
|
/**
|
|
13699
13666
|
* Checks if the error is due to a caller-supplied argument failing
|
|
@@ -13705,6 +13672,47 @@ class AuthFlowErrorBaseV2 {
|
|
|
13705
13672
|
isInvalidInput() {
|
|
13706
13673
|
return this.errorData instanceof InvalidArgumentError;
|
|
13707
13674
|
}
|
|
13675
|
+
/**
|
|
13676
|
+
* Checks whether the service rejected the username parameter. Use it to ask
|
|
13677
|
+
* the user to correct the supplied username.
|
|
13678
|
+
* @returns True when the username is invalid, otherwise false.
|
|
13679
|
+
*/
|
|
13680
|
+
isInvalidUsername() {
|
|
13681
|
+
return this.isUserInvalidError();
|
|
13682
|
+
}
|
|
13683
|
+
/**
|
|
13684
|
+
* Checks whether the supplied username does not identify an account. Use it
|
|
13685
|
+
* to distinguish a missing account from other request failures.
|
|
13686
|
+
* @returns True when the service reports that the user was not found.
|
|
13687
|
+
*/
|
|
13688
|
+
isUserNotFound() {
|
|
13689
|
+
return this.isUserNotFoundError();
|
|
13690
|
+
}
|
|
13691
|
+
/**
|
|
13692
|
+
* Checks whether the service rejected the supplied sign-in credentials. This
|
|
13693
|
+
* classifier does not identify new-password policy failures.
|
|
13694
|
+
* @returns True when the username or password is incorrect.
|
|
13695
|
+
*/
|
|
13696
|
+
isInvalidCredentials() {
|
|
13697
|
+
return this.isPasswordIncorrectError();
|
|
13698
|
+
}
|
|
13699
|
+
/**
|
|
13700
|
+
* Checks whether the service rejected a one-time code. Use it to prompt the
|
|
13701
|
+
* user to re-enter the code or request a new one.
|
|
13702
|
+
* @returns True when the one-time code is invalid, otherwise false.
|
|
13703
|
+
*/
|
|
13704
|
+
isInvalidCode() {
|
|
13705
|
+
return this.isInvalidCodeError();
|
|
13706
|
+
}
|
|
13707
|
+
/**
|
|
13708
|
+
* Checks whether a new password violates password policy. It recognizes
|
|
13709
|
+
* both weak-password responses and password-targeted validation details.
|
|
13710
|
+
* @returns True when the new password is invalid, otherwise false.
|
|
13711
|
+
*/
|
|
13712
|
+
isInvalidPassword() {
|
|
13713
|
+
return (this.isInvalidPasswordError() ||
|
|
13714
|
+
this.isPasswordPolicyViolationError());
|
|
13715
|
+
}
|
|
13708
13716
|
/**
|
|
13709
13717
|
* Checks whether an account already exists for the supplied identifier.
|
|
13710
13718
|
* This can occur at different stages while completing sign-up.
|
|
@@ -13713,15 +13721,19 @@ class AuthFlowErrorBaseV2 {
|
|
|
13713
13721
|
isUserAlreadyExists() {
|
|
13714
13722
|
return this.getAttributeValidationDetails().some((detail) => detail.code === "userAlreadyExists");
|
|
13715
13723
|
}
|
|
13716
|
-
|
|
13717
|
-
*
|
|
13718
|
-
*
|
|
13719
|
-
*
|
|
13724
|
+
/**
|
|
13725
|
+
* Checks whether the service requires attributes omitted from the request.
|
|
13726
|
+
* Use it to collect the required attributes before resubmitting.
|
|
13727
|
+
* @returns True when required attributes are missing, otherwise false.
|
|
13720
13728
|
*/
|
|
13721
|
-
|
|
13729
|
+
isMissingRequiredAttributes() {
|
|
13730
|
+
return this.requiredAttributes.length > 0;
|
|
13731
|
+
}
|
|
13722
13732
|
isUserNotFoundError() {
|
|
13723
13733
|
return (this.errorData.error === "invalidRequest" &&
|
|
13724
|
-
this.
|
|
13734
|
+
(this.innerErrorCode === USER_NOT_FOUND ||
|
|
13735
|
+
this.errorData.errorDescription?.includes("AADSTS50034") ===
|
|
13736
|
+
true));
|
|
13725
13737
|
}
|
|
13726
13738
|
isUserInvalidError() {
|
|
13727
13739
|
return (this.errorData.error === "invalidRequest" &&
|
|
@@ -13730,23 +13742,26 @@ class AuthFlowErrorBaseV2 {
|
|
|
13730
13742
|
.toLowerCase()
|
|
13731
13743
|
.includes("username parameter"));
|
|
13732
13744
|
}
|
|
13733
|
-
// The verification endpoint uses this outer/inner code pair for an invalid one-time code.
|
|
13734
13745
|
isInvalidCodeError() {
|
|
13735
13746
|
return (this.errorData.error === "invalidGrant" &&
|
|
13736
|
-
this.
|
|
13747
|
+
this.innerErrorCode === INVALID_ONE_TIME_CODE);
|
|
13737
13748
|
}
|
|
13738
|
-
// New password rejected by policy: inner `passwordTooWeak` (AADSTS120002).
|
|
13739
13749
|
isInvalidPasswordError() {
|
|
13740
13750
|
return (this.errorData.error === "invalidRequest" &&
|
|
13741
|
-
this.
|
|
13751
|
+
this.innerErrorCode === PASSWORD_TOO_WEAK);
|
|
13742
13752
|
}
|
|
13743
13753
|
isPasswordPolicyViolationError() {
|
|
13744
|
-
return this.getAttributeValidationDetails().some((detail) =>
|
|
13745
|
-
|
|
13754
|
+
return this.getAttributeValidationDetails().some((detail) => {
|
|
13755
|
+
const attributeIds = detail.attributeIds;
|
|
13756
|
+
return (detail.code === "passwordPolicyViolation" &&
|
|
13757
|
+
Array.isArray(attributeIds) &&
|
|
13758
|
+
attributeIds.some((attributeId) => typeof attributeId === "string" &&
|
|
13759
|
+
attributeId.toLowerCase() === "password"));
|
|
13760
|
+
});
|
|
13746
13761
|
}
|
|
13747
13762
|
isPasswordIncorrectError() {
|
|
13748
13763
|
return (this.errorData.error === "invalidGrant" &&
|
|
13749
|
-
this.
|
|
13764
|
+
this.innerErrorCode === INVALID_USERNAME_OR_PASSWORD);
|
|
13750
13765
|
}
|
|
13751
13766
|
getAttributeValidationDetails() {
|
|
13752
13767
|
const details = this.errorData.attributeValidationDetails;
|
|
@@ -13754,6 +13769,12 @@ class AuthFlowErrorBaseV2 {
|
|
|
13754
13769
|
? details.filter((detail) => typeof detail === "object" && detail !== null)
|
|
13755
13770
|
: [];
|
|
13756
13771
|
}
|
|
13772
|
+
getAttributeIdsByCode(code) {
|
|
13773
|
+
const attributeIds = this.getAttributeValidationDetails().flatMap((detail) => detail.code === code && Array.isArray(detail.attributeIds)
|
|
13774
|
+
? detail.attributeIds.filter((attributeId) => typeof attributeId === "string")
|
|
13775
|
+
: []);
|
|
13776
|
+
return [...new Set(attributeIds)];
|
|
13777
|
+
}
|
|
13757
13778
|
}
|
|
13758
13779
|
|
|
13759
13780
|
/*
|
|
@@ -13761,35 +13782,67 @@ class AuthFlowErrorBaseV2 {
|
|
|
13761
13782
|
* Licensed under the MIT License.
|
|
13762
13783
|
*/
|
|
13763
13784
|
/**
|
|
13764
|
-
*
|
|
13765
|
-
*
|
|
13766
|
-
* `RequestChallengeResultV2` and returned regardless of which entry flow reached
|
|
13767
|
-
* it. It currently exposes no action-specific detectors — only the inherited
|
|
13768
|
-
* `isBrowserRequired()`.
|
|
13769
|
-
*/
|
|
13770
|
-
class RequestChallengeErrorV2 extends AuthFlowErrorBaseV2 {
|
|
13771
|
-
}
|
|
13772
|
-
|
|
13773
|
-
/*
|
|
13774
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13775
|
-
* Licensed under the MIT License.
|
|
13776
|
-
*/
|
|
13777
|
-
/**
|
|
13778
|
-
* Error raised when verifying a challenge (submitting a one-time code). It
|
|
13779
|
-
* exposes the detectors relevant to code verification so the app can respond to
|
|
13780
|
-
* a rejected code specifically. Unrecognised failures carry no specific
|
|
13781
|
-
* detector; inspect the error code (`unexpected_error` when the server gives
|
|
13782
|
-
* none) and `errorDescription`.
|
|
13785
|
+
* Result of a native auth V2 operation. Use {@link CustomAuthResultV2.isState}
|
|
13786
|
+
* to narrow the state before accessing its members.
|
|
13783
13787
|
*/
|
|
13784
|
-
class
|
|
13788
|
+
class CustomAuthResultV2 {
|
|
13789
|
+
constructor(state, data, scenario = CustomAuthFlowScenarioV2.Unknown) {
|
|
13790
|
+
this.state = state;
|
|
13791
|
+
this.data = data;
|
|
13792
|
+
this.scenario = scenario;
|
|
13793
|
+
}
|
|
13785
13794
|
/**
|
|
13786
|
-
*
|
|
13787
|
-
*
|
|
13788
|
-
*
|
|
13789
|
-
* @returns True
|
|
13795
|
+
* Narrows the result to a specific state by its `stateType` discriminator.
|
|
13796
|
+
* A successful match makes the state's properties available without a cast.
|
|
13797
|
+
* @param stateType - The state type to test for.
|
|
13798
|
+
* @returns True (and narrows `state`) when the current state matches `stateType`.
|
|
13790
13799
|
*/
|
|
13791
|
-
|
|
13792
|
-
return this.
|
|
13800
|
+
isState(stateType) {
|
|
13801
|
+
return this.state.stateType === stateType;
|
|
13802
|
+
}
|
|
13803
|
+
/**
|
|
13804
|
+
* Checks whether the result is in the terminal failed state. A failed result
|
|
13805
|
+
* contains the unified V2 flow error.
|
|
13806
|
+
* @returns True (and narrows `state`) when the operation failed.
|
|
13807
|
+
*/
|
|
13808
|
+
isFailed() {
|
|
13809
|
+
return this.state.stateType === "failed";
|
|
13810
|
+
}
|
|
13811
|
+
/**
|
|
13812
|
+
* Creates a failed result from the supplied error. The result uses the
|
|
13813
|
+
* shared {@link FailedStateV2} terminal state and unified V2 flow error.
|
|
13814
|
+
* @param error - The error that occurred.
|
|
13815
|
+
* @param options - The flow-error context.
|
|
13816
|
+
* @returns A failed result carrying the unified V2 flow error.
|
|
13817
|
+
*/
|
|
13818
|
+
static createWithError(error, options) {
|
|
13819
|
+
const { scenario = CustomAuthFlowScenarioV2.Unknown, correlationId } = options;
|
|
13820
|
+
const errorData = CustomAuthResultV2.createErrorData(error, correlationId);
|
|
13821
|
+
const flowError = new AuthFlowErrorV2(errorData, scenario);
|
|
13822
|
+
const result = new CustomAuthResultV2(new FailedStateV2(), undefined, scenario);
|
|
13823
|
+
result.error = flowError;
|
|
13824
|
+
return result;
|
|
13825
|
+
}
|
|
13826
|
+
static createErrorData(error, correlationId) {
|
|
13827
|
+
if (error instanceof CustomAuthError) {
|
|
13828
|
+
return error;
|
|
13829
|
+
}
|
|
13830
|
+
if (error instanceof AuthError) {
|
|
13831
|
+
const errorCodes = [];
|
|
13832
|
+
if ("errorNo" in error) {
|
|
13833
|
+
if (typeof error.errorNo === "string") {
|
|
13834
|
+
const code = Number(error.errorNo);
|
|
13835
|
+
if (!isNaN(code)) {
|
|
13836
|
+
errorCodes.push(code);
|
|
13837
|
+
}
|
|
13838
|
+
}
|
|
13839
|
+
else if (typeof error.errorNo === "number") {
|
|
13840
|
+
errorCodes.push(error.errorNo);
|
|
13841
|
+
}
|
|
13842
|
+
}
|
|
13843
|
+
return new MsalCustomAuthError(error.errorCode, error.errorMessage, error.subError, errorCodes, error.correlationId);
|
|
13844
|
+
}
|
|
13845
|
+
return new UnexpectedError(error, correlationId);
|
|
13793
13846
|
}
|
|
13794
13847
|
}
|
|
13795
13848
|
|
|
@@ -13810,18 +13863,6 @@ class CompletedStateV2 extends AuthFlowStateBase {
|
|
|
13810
13863
|
}
|
|
13811
13864
|
}
|
|
13812
13865
|
|
|
13813
|
-
/*
|
|
13814
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13815
|
-
* Licensed under the MIT License.
|
|
13816
|
-
*/
|
|
13817
|
-
/**
|
|
13818
|
-
* Error raised when redeeming a completed V2 flow's continuation for tokens.
|
|
13819
|
-
* It adds no action-specific detectors beyond the inherited
|
|
13820
|
-
* `isBrowserRequired()`; the app typically retries or starts sign-in explicitly.
|
|
13821
|
-
*/
|
|
13822
|
-
class SignInContinuationErrorV2 extends AuthFlowErrorBaseV2 {
|
|
13823
|
-
}
|
|
13824
|
-
|
|
13825
13866
|
/*
|
|
13826
13867
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13827
13868
|
* Licensed under the MIT License.
|
|
@@ -13838,25 +13879,17 @@ class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
13838
13879
|
}
|
|
13839
13880
|
/**
|
|
13840
13881
|
* Signs the user in using the continuation established by the completed V2
|
|
13841
|
-
* flow.
|
|
13842
|
-
*
|
|
13843
|
-
*
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
* supports them on authorize-challenge.
|
|
13847
|
-
* @returns The result of signing in after the password reset.
|
|
13848
|
-
*/
|
|
13849
|
-
async signIn(inputs) {
|
|
13882
|
+
* flow. The result either reaches the completed state with the signed-in
|
|
13883
|
+
* account data or reports why the follow-up sign-in could not complete.
|
|
13884
|
+
* @returns The result of completing the continuation sign-in.
|
|
13885
|
+
*/
|
|
13886
|
+
async signIn() {
|
|
13850
13887
|
const { correlationId, logger, continuationState, flowClient } = this.stateParameters;
|
|
13851
13888
|
try {
|
|
13852
|
-
if (inputs?.claims) {
|
|
13853
|
-
ensureArgumentIsJSONString("inputs.claims", inputs.claims, correlationId);
|
|
13854
|
-
}
|
|
13855
13889
|
logger.verbose("09mk3f", correlationId);
|
|
13856
13890
|
const result = await flowClient.signInWithContinuation({
|
|
13857
13891
|
correlationId,
|
|
13858
13892
|
continuationState,
|
|
13859
|
-
scopes: inputs?.scopes,
|
|
13860
13893
|
});
|
|
13861
13894
|
const account = new CustomAuthAccountData(result.authenticationResult.account, this.stateParameters.config, this.stateParameters.cacheClient, logger, correlationId);
|
|
13862
13895
|
return new CustomAuthResultV2(new CompletedStateV2(), account, continuationState.scenario);
|
|
@@ -13864,7 +13897,6 @@ class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
13864
13897
|
catch (error) {
|
|
13865
13898
|
logger.errorPii(`0zoo5u ${error}`, correlationId);
|
|
13866
13899
|
return CustomAuthResultV2.createWithError(error, {
|
|
13867
|
-
errorType: SignInContinuationErrorV2,
|
|
13868
13900
|
scenario: continuationState.scenario,
|
|
13869
13901
|
correlationId,
|
|
13870
13902
|
});
|
|
@@ -13872,29 +13904,6 @@ class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
13872
13904
|
}
|
|
13873
13905
|
}
|
|
13874
13906
|
|
|
13875
|
-
/*
|
|
13876
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13877
|
-
* Licensed under the MIT License.
|
|
13878
|
-
*/
|
|
13879
|
-
/**
|
|
13880
|
-
* Error raised when submitting a new password. It exposes the detectors relevant
|
|
13881
|
-
* to password submission so the app can react to a rejected password
|
|
13882
|
-
* specifically. Unrecognised failures carry no specific detector; inspect the
|
|
13883
|
-
* error code (`unexpected_error` when the server gives none) and
|
|
13884
|
-
* `errorDescription`.
|
|
13885
|
-
*/
|
|
13886
|
-
class SubmitNewPasswordErrorV2 extends AuthFlowErrorBaseV2 {
|
|
13887
|
-
/**
|
|
13888
|
-
* Checks if the error is due to the new password being invalid, for example
|
|
13889
|
-
* because it fails the tenant's complexity policy. Use it to prompt the user
|
|
13890
|
-
* for a stronger password rather than restarting the reset flow.
|
|
13891
|
-
* @returns True if the new password is invalid, false otherwise.
|
|
13892
|
-
*/
|
|
13893
|
-
isInvalidPassword() {
|
|
13894
|
-
return this.isInvalidPasswordError();
|
|
13895
|
-
}
|
|
13896
|
-
}
|
|
13897
|
-
|
|
13898
13907
|
/*
|
|
13899
13908
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13900
13909
|
* Licensed under the MIT License.
|
|
@@ -13937,7 +13946,6 @@ class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
13937
13946
|
catch (error) {
|
|
13938
13947
|
logger.errorPii(`03m081 ${error}`, correlationId);
|
|
13939
13948
|
return CustomAuthResultV2.createWithError(error, {
|
|
13940
|
-
errorType: SubmitNewPasswordErrorV2,
|
|
13941
13949
|
scenario: continuationState.scenario,
|
|
13942
13950
|
correlationId,
|
|
13943
13951
|
});
|
|
@@ -13958,9 +13966,7 @@ class ChallengeVerificationStateBaseV2 extends AuthFlowActionRequiredStateBase {
|
|
|
13958
13966
|
this.codeLength = stateParameters.codeLength;
|
|
13959
13967
|
}
|
|
13960
13968
|
async submitCodeCore(code) {
|
|
13961
|
-
|
|
13962
|
-
this.ensureCodeIsValid(code, this.codeLength);
|
|
13963
|
-
}
|
|
13969
|
+
ensureArgumentIsNotNullOrUndefined("code", code, this.stateParameters.correlationId);
|
|
13964
13970
|
return this.stateParameters.flowClient.submitCode({
|
|
13965
13971
|
correlationId: this.stateParameters.correlationId,
|
|
13966
13972
|
continuationState: this.stateParameters.continuationState,
|
|
@@ -13975,157 +13981,6 @@ class ChallengeVerificationStateBaseV2 extends AuthFlowActionRequiredStateBase {
|
|
|
13975
13981
|
}
|
|
13976
13982
|
}
|
|
13977
13983
|
|
|
13978
|
-
/*
|
|
13979
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13980
|
-
* Licensed under the MIT License.
|
|
13981
|
-
*/
|
|
13982
|
-
/**
|
|
13983
|
-
* State returned when sign-in requires verification of an email or SMS MFA
|
|
13984
|
-
* challenge. It allows the app to submit the challenge or request a replacement.
|
|
13985
|
-
*/
|
|
13986
|
-
class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
13987
|
-
constructor() {
|
|
13988
|
-
super(...arguments);
|
|
13989
|
-
this.stateType = "mfaVerificationRequired";
|
|
13990
|
-
}
|
|
13991
|
-
/**
|
|
13992
|
-
* Submits the email or SMS challenge as the second authentication factor.
|
|
13993
|
-
* Successful verification completes sign-in.
|
|
13994
|
-
* @param challenge - The challenge value to submit.
|
|
13995
|
-
* @returns The result of submitting the MFA challenge.
|
|
13996
|
-
*/
|
|
13997
|
-
async submitChallenge(challenge) {
|
|
13998
|
-
const { correlationId, logger, continuationState } = this.stateParameters;
|
|
13999
|
-
try {
|
|
14000
|
-
logger.verbose("10k0lc", correlationId);
|
|
14001
|
-
const result = await this.submitCodeCore(challenge);
|
|
14002
|
-
if (result.type !== FLOW_COMPLETED_V2) {
|
|
14003
|
-
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, `MFA challenge submission result type '${result.type}' is not supported.`, correlationId);
|
|
14004
|
-
}
|
|
14005
|
-
const account = new CustomAuthAccountData(result.authenticationResult.account, this.stateParameters.config, this.stateParameters.cacheClient, logger, correlationId);
|
|
14006
|
-
return new CustomAuthResultV2(new CompletedStateV2(), account, continuationState.scenario);
|
|
14007
|
-
}
|
|
14008
|
-
catch (error) {
|
|
14009
|
-
logger.errorPii(`178w0g ${error}`, correlationId);
|
|
14010
|
-
return CustomAuthResultV2.createWithError(error, {
|
|
14011
|
-
errorType: VerifyChallengeErrorV2,
|
|
14012
|
-
scenario: continuationState.scenario,
|
|
14013
|
-
correlationId,
|
|
14014
|
-
});
|
|
14015
|
-
}
|
|
14016
|
-
}
|
|
14017
|
-
/**
|
|
14018
|
-
* Requests a replacement challenge for the selected MFA method. The
|
|
14019
|
-
* returned state contains the refreshed email or SMS challenge metadata.
|
|
14020
|
-
* @returns The result of requesting a replacement MFA challenge.
|
|
14021
|
-
*/
|
|
14022
|
-
async resendChallenge() {
|
|
14023
|
-
const { correlationId, logger, continuationState } = this.stateParameters;
|
|
14024
|
-
try {
|
|
14025
|
-
logger.verbose("13st9u", correlationId);
|
|
14026
|
-
const result = await this.resendCodeCore();
|
|
14027
|
-
return new CustomAuthResultV2(new MFAVerificationRequiredStateV2({
|
|
14028
|
-
correlationId: result.correlationId,
|
|
14029
|
-
logger,
|
|
14030
|
-
config: this.stateParameters.config,
|
|
14031
|
-
flowClient: this.stateParameters.flowClient,
|
|
14032
|
-
continuationState: result.continuationState,
|
|
14033
|
-
cacheClient: this.stateParameters.cacheClient,
|
|
14034
|
-
method: this.method,
|
|
14035
|
-
sentTo: result.sentTo,
|
|
14036
|
-
channel: result.channel,
|
|
14037
|
-
codeLength: result.codeLength,
|
|
14038
|
-
}), undefined, result.continuationState.scenario);
|
|
14039
|
-
}
|
|
14040
|
-
catch (error) {
|
|
14041
|
-
logger.errorPii(`1qw1ey ${error}`, correlationId);
|
|
14042
|
-
return CustomAuthResultV2.createWithError(error, {
|
|
14043
|
-
errorType: RequestChallengeErrorV2,
|
|
14044
|
-
scenario: continuationState.scenario,
|
|
14045
|
-
correlationId,
|
|
14046
|
-
});
|
|
14047
|
-
}
|
|
14048
|
-
}
|
|
14049
|
-
}
|
|
14050
|
-
|
|
14051
|
-
/*
|
|
14052
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14053
|
-
* Licensed under the MIT License.
|
|
14054
|
-
*/
|
|
14055
|
-
class AuthenticationMethodSelectionStateBaseV2 extends AuthFlowActionRequiredStateBase {
|
|
14056
|
-
constructor(stateParameters) {
|
|
14057
|
-
super(stateParameters);
|
|
14058
|
-
this.methods = stateParameters.methods;
|
|
14059
|
-
}
|
|
14060
|
-
async requestSelectedMethodChallenge(method) {
|
|
14061
|
-
const { correlationId, continuationState, flowClient } = this.stateParameters;
|
|
14062
|
-
const selectedMethod = this.methods.find((candidate) => candidate.id === method.id);
|
|
14063
|
-
if (!selectedMethod) {
|
|
14064
|
-
throw new InvalidArgumentError("method", correlationId);
|
|
14065
|
-
}
|
|
14066
|
-
const result = await flowClient.requestChallenge({
|
|
14067
|
-
correlationId,
|
|
14068
|
-
continuationState: {
|
|
14069
|
-
...continuationState,
|
|
14070
|
-
links: {
|
|
14071
|
-
...continuationState.links,
|
|
14072
|
-
challenge: selectedMethod.challengeHref,
|
|
14073
|
-
},
|
|
14074
|
-
},
|
|
14075
|
-
});
|
|
14076
|
-
return { result, selectedMethod };
|
|
14077
|
-
}
|
|
14078
|
-
}
|
|
14079
|
-
|
|
14080
|
-
/*
|
|
14081
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14082
|
-
* Licensed under the MIT License.
|
|
14083
|
-
*/
|
|
14084
|
-
/**
|
|
14085
|
-
* State returned when sign-in requires a registered multi-factor
|
|
14086
|
-
* authentication method.
|
|
14087
|
-
*/
|
|
14088
|
-
class MFARequiredStateV2 extends AuthenticationMethodSelectionStateBaseV2 {
|
|
14089
|
-
constructor() {
|
|
14090
|
-
super(...arguments);
|
|
14091
|
-
this.stateType = "mfaRequired";
|
|
14092
|
-
}
|
|
14093
|
-
/**
|
|
14094
|
-
* Requests a challenge for a registered MFA method.
|
|
14095
|
-
* @param method - A method from {@link methods}.
|
|
14096
|
-
* @returns A result requiring challenge verification or describing failure.
|
|
14097
|
-
*/
|
|
14098
|
-
async requestChallenge(method) {
|
|
14099
|
-
const { correlationId, logger, continuationState, flowClient } = this.stateParameters;
|
|
14100
|
-
try {
|
|
14101
|
-
const { result, selectedMethod } = await this.requestSelectedMethodChallenge(method);
|
|
14102
|
-
if (result.type !== FLOW_CODE_REQUIRED_V2) {
|
|
14103
|
-
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, `MFA method selection expected a code challenge but received '${result.type}'.`, correlationId);
|
|
14104
|
-
}
|
|
14105
|
-
return new CustomAuthResultV2(new MFAVerificationRequiredStateV2({
|
|
14106
|
-
correlationId: result.correlationId,
|
|
14107
|
-
logger,
|
|
14108
|
-
config: this.stateParameters.config,
|
|
14109
|
-
flowClient,
|
|
14110
|
-
continuationState: result.continuationState,
|
|
14111
|
-
cacheClient: this.stateParameters.cacheClient,
|
|
14112
|
-
method: selectedMethod,
|
|
14113
|
-
sentTo: result.sentTo,
|
|
14114
|
-
channel: result.channel,
|
|
14115
|
-
codeLength: result.codeLength,
|
|
14116
|
-
}), undefined, result.continuationState.scenario);
|
|
14117
|
-
}
|
|
14118
|
-
catch (error) {
|
|
14119
|
-
logger.errorPii(`0ax1kt ${error}`, correlationId);
|
|
14120
|
-
return CustomAuthResultV2.createWithError(error, {
|
|
14121
|
-
errorType: RequestChallengeErrorV2,
|
|
14122
|
-
scenario: continuationState.scenario,
|
|
14123
|
-
correlationId,
|
|
14124
|
-
});
|
|
14125
|
-
}
|
|
14126
|
-
}
|
|
14127
|
-
}
|
|
14128
|
-
|
|
14129
13984
|
/*
|
|
14130
13985
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14131
13986
|
* Licensed under the MIT License.
|
|
@@ -14170,29 +14025,25 @@ class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
|
14170
14025
|
return signUpStateTransitionHandler.handleVerification(result, {
|
|
14171
14026
|
...this.stateParameters,
|
|
14172
14027
|
signUpStateTransitionHandler,
|
|
14173
|
-
});
|
|
14174
|
-
}
|
|
14175
|
-
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
14176
|
-
return new CustomAuthResultV2(new SignInContinuationStateV2({
|
|
14177
|
-
correlationId: result.correlationId,
|
|
14178
|
-
logger,
|
|
14179
|
-
config: this.stateParameters.config,
|
|
14180
|
-
flowClient: this.stateParameters.flowClient,
|
|
14181
|
-
continuationState: result.continuationState,
|
|
14182
|
-
cacheClient: this.stateParameters.cacheClient,
|
|
14183
|
-
}), undefined, result.continuationState.scenario);
|
|
14028
|
+
});
|
|
14184
14029
|
}
|
|
14185
|
-
if (result.type ===
|
|
14186
|
-
return new CustomAuthResultV2(new
|
|
14030
|
+
if (result.type === FLOW_SIGN_IN_CONTINUATION_REQUIRED_V2) {
|
|
14031
|
+
return new CustomAuthResultV2(new SignInContinuationStateV2({
|
|
14187
14032
|
correlationId: result.correlationId,
|
|
14188
14033
|
logger,
|
|
14189
14034
|
config: this.stateParameters.config,
|
|
14190
14035
|
flowClient: this.stateParameters.flowClient,
|
|
14191
14036
|
continuationState: result.continuationState,
|
|
14192
14037
|
cacheClient: this.stateParameters.cacheClient,
|
|
14193
|
-
methods: result.methods,
|
|
14194
14038
|
}), undefined, result.continuationState.scenario);
|
|
14195
14039
|
}
|
|
14040
|
+
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
14041
|
+
const signInStateTransitionHandler = this.stateParameters.signInStateTransitionHandler;
|
|
14042
|
+
if (!signInStateTransitionHandler) {
|
|
14043
|
+
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, "Sign-in state transition handler is missing.", correlationId);
|
|
14044
|
+
}
|
|
14045
|
+
return signInStateTransitionHandler.handleMfaRequired(result, this.stateParameters);
|
|
14046
|
+
}
|
|
14196
14047
|
if (result.type === FLOW_COMPLETED_V2) {
|
|
14197
14048
|
const account = new CustomAuthAccountData(result.authenticationResult.account, this.stateParameters.config, this.stateParameters.cacheClient, logger, correlationId);
|
|
14198
14049
|
return new CustomAuthResultV2(new CompletedStateV2(), account, continuationState.scenario);
|
|
@@ -14202,7 +14053,6 @@ class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
|
14202
14053
|
catch (error) {
|
|
14203
14054
|
logger.errorPii(`0br9qy ${error}`, correlationId);
|
|
14204
14055
|
return CustomAuthResultV2.createWithError(error, {
|
|
14205
|
-
errorType: VerifyChallengeErrorV2,
|
|
14206
14056
|
scenario: continuationState.scenario,
|
|
14207
14057
|
correlationId,
|
|
14208
14058
|
});
|
|
@@ -14226,6 +14076,7 @@ class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
|
14226
14076
|
continuationState: result.continuationState,
|
|
14227
14077
|
cacheClient: this.stateParameters.cacheClient,
|
|
14228
14078
|
signUpStateTransitionHandler: this.stateParameters.signUpStateTransitionHandler,
|
|
14079
|
+
signInStateTransitionHandler: this.stateParameters.signInStateTransitionHandler,
|
|
14229
14080
|
method: this.method,
|
|
14230
14081
|
sentTo: result.sentTo,
|
|
14231
14082
|
channel: result.channel,
|
|
@@ -14235,7 +14086,77 @@ class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
|
14235
14086
|
catch (error) {
|
|
14236
14087
|
logger.errorPii(`0eq23q ${error}`, correlationId);
|
|
14237
14088
|
return CustomAuthResultV2.createWithError(error, {
|
|
14238
|
-
|
|
14089
|
+
scenario: continuationState.scenario,
|
|
14090
|
+
correlationId,
|
|
14091
|
+
});
|
|
14092
|
+
}
|
|
14093
|
+
}
|
|
14094
|
+
}
|
|
14095
|
+
|
|
14096
|
+
/*
|
|
14097
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14098
|
+
* Licensed under the MIT License.
|
|
14099
|
+
*/
|
|
14100
|
+
/**
|
|
14101
|
+
* State returned when sign-in requires verification of an email or SMS MFA
|
|
14102
|
+
* challenge. It allows the app to submit the challenge or request a replacement.
|
|
14103
|
+
*/
|
|
14104
|
+
class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
14105
|
+
constructor() {
|
|
14106
|
+
super(...arguments);
|
|
14107
|
+
this.stateType = "mfaVerificationRequired";
|
|
14108
|
+
}
|
|
14109
|
+
/**
|
|
14110
|
+
* Submits the email or SMS challenge as the second authentication factor.
|
|
14111
|
+
* Successful verification completes sign-in.
|
|
14112
|
+
* @param challenge - The challenge value to submit.
|
|
14113
|
+
* @returns The result of submitting the MFA challenge.
|
|
14114
|
+
*/
|
|
14115
|
+
async submitChallenge(challenge) {
|
|
14116
|
+
const { correlationId, logger, continuationState } = this.stateParameters;
|
|
14117
|
+
try {
|
|
14118
|
+
logger.verbose("10k0lc", correlationId);
|
|
14119
|
+
const result = await this.submitCodeCore(challenge);
|
|
14120
|
+
if (result.type !== FLOW_COMPLETED_V2) {
|
|
14121
|
+
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, `MFA challenge submission result type '${result.type}' is not supported.`, correlationId);
|
|
14122
|
+
}
|
|
14123
|
+
const account = new CustomAuthAccountData(result.authenticationResult.account, this.stateParameters.config, this.stateParameters.cacheClient, logger, correlationId);
|
|
14124
|
+
return new CustomAuthResultV2(new CompletedStateV2(), account, continuationState.scenario);
|
|
14125
|
+
}
|
|
14126
|
+
catch (error) {
|
|
14127
|
+
logger.errorPii(`178w0g ${error}`, correlationId);
|
|
14128
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
14129
|
+
scenario: continuationState.scenario,
|
|
14130
|
+
correlationId,
|
|
14131
|
+
});
|
|
14132
|
+
}
|
|
14133
|
+
}
|
|
14134
|
+
/**
|
|
14135
|
+
* Requests a replacement challenge for the selected MFA method. The
|
|
14136
|
+
* returned state contains the refreshed email or SMS challenge metadata.
|
|
14137
|
+
* @returns The result of requesting a replacement MFA challenge.
|
|
14138
|
+
*/
|
|
14139
|
+
async resendChallenge() {
|
|
14140
|
+
const { correlationId, logger, continuationState } = this.stateParameters;
|
|
14141
|
+
try {
|
|
14142
|
+
logger.verbose("13st9u", correlationId);
|
|
14143
|
+
const result = await this.resendCodeCore();
|
|
14144
|
+
return new CustomAuthResultV2(new MFAVerificationRequiredStateV2({
|
|
14145
|
+
correlationId: result.correlationId,
|
|
14146
|
+
logger,
|
|
14147
|
+
config: this.stateParameters.config,
|
|
14148
|
+
flowClient: this.stateParameters.flowClient,
|
|
14149
|
+
continuationState: result.continuationState,
|
|
14150
|
+
cacheClient: this.stateParameters.cacheClient,
|
|
14151
|
+
method: this.method,
|
|
14152
|
+
sentTo: result.sentTo,
|
|
14153
|
+
channel: result.channel,
|
|
14154
|
+
codeLength: result.codeLength,
|
|
14155
|
+
}), undefined, result.continuationState.scenario);
|
|
14156
|
+
}
|
|
14157
|
+
catch (error) {
|
|
14158
|
+
logger.errorPii(`1qw1ey ${error}`, correlationId);
|
|
14159
|
+
return CustomAuthResultV2.createWithError(error, {
|
|
14239
14160
|
scenario: continuationState.scenario,
|
|
14240
14161
|
correlationId,
|
|
14241
14162
|
});
|
|
@@ -14253,23 +14174,23 @@ class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
|
|
|
14253
14174
|
* methods and lets the app request a challenge for the chosen one. The flow
|
|
14254
14175
|
* stays on this state until a challenge is successfully requested.
|
|
14255
14176
|
*/
|
|
14256
|
-
class AuthMethodSelectionRequiredStateV2 extends
|
|
14257
|
-
constructor() {
|
|
14258
|
-
super(
|
|
14177
|
+
class AuthMethodSelectionRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
14178
|
+
constructor(stateParameters) {
|
|
14179
|
+
super(stateParameters);
|
|
14259
14180
|
this.stateType = "authMethodSelectionRequired";
|
|
14181
|
+
this.methods = stateParameters.methods;
|
|
14260
14182
|
}
|
|
14261
14183
|
/**
|
|
14262
|
-
*
|
|
14184
|
+
* Selects an authentication method and requests its challenge. The returned
|
|
14263
14185
|
* state identifies the credential the application must collect.
|
|
14264
|
-
* @param method - The method to
|
|
14265
|
-
* @returns The result of
|
|
14186
|
+
* @param method - The method to select, from {@link methods}.
|
|
14187
|
+
* @returns The result of selecting the method and requesting its challenge.
|
|
14266
14188
|
*/
|
|
14267
|
-
async
|
|
14268
|
-
const { correlationId, logger, continuationState, flowClient } = this.stateParameters;
|
|
14189
|
+
async selectAuthMethod(method) {
|
|
14190
|
+
const { authenticationFactor, correlationId, logger, continuationState, flowClient, signInStateTransitionHandler, } = this.stateParameters;
|
|
14269
14191
|
try {
|
|
14270
14192
|
logger.verbose("1r2ypl", correlationId);
|
|
14271
14193
|
const { result, selectedMethod } = await this.requestSelectedMethodChallenge(method);
|
|
14272
|
-
const resultType = result.type;
|
|
14273
14194
|
const commonStateParameters = {
|
|
14274
14195
|
correlationId: result.correlationId,
|
|
14275
14196
|
logger,
|
|
@@ -14278,12 +14199,33 @@ class AuthMethodSelectionRequiredStateV2 extends AuthenticationMethodSelectionSt
|
|
|
14278
14199
|
continuationState: result.continuationState,
|
|
14279
14200
|
cacheClient: this.stateParameters.cacheClient,
|
|
14280
14201
|
};
|
|
14281
|
-
if (
|
|
14202
|
+
if (authenticationFactor === AuthenticationFactorV2.SINGLE_FACTOR &&
|
|
14203
|
+
result.type === FLOW_CODE_REQUIRED_V2 &&
|
|
14282
14204
|
(result.channel?.toLowerCase() ===
|
|
14283
14205
|
AuthenticationMethodTypeV2.EMAIL ||
|
|
14284
14206
|
result.channel?.toLowerCase() ===
|
|
14285
14207
|
AuthenticationMethodTypeV2.SMS)) {
|
|
14286
14208
|
return new CustomAuthResultV2(new CodeRequiredStateV2({
|
|
14209
|
+
...commonStateParameters,
|
|
14210
|
+
signInStateTransitionHandler,
|
|
14211
|
+
method: selectedMethod,
|
|
14212
|
+
sentTo: result.sentTo,
|
|
14213
|
+
channel: result.channel,
|
|
14214
|
+
codeLength: result.codeLength,
|
|
14215
|
+
}), undefined, result.continuationState.scenario);
|
|
14216
|
+
}
|
|
14217
|
+
if (continuationState.scenario ===
|
|
14218
|
+
CustomAuthFlowScenarioV2.SignIn &&
|
|
14219
|
+
authenticationFactor === AuthenticationFactorV2.SINGLE_FACTOR &&
|
|
14220
|
+
result.type === FLOW_PASSWORD_REQUIRED_V2) {
|
|
14221
|
+
if (!signInStateTransitionHandler) {
|
|
14222
|
+
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, "Sign-in method selection cannot map a password challenge without a sign-in transition handler.", correlationId);
|
|
14223
|
+
}
|
|
14224
|
+
return signInStateTransitionHandler.handlePasswordRequired(result, commonStateParameters);
|
|
14225
|
+
}
|
|
14226
|
+
if (authenticationFactor === AuthenticationFactorV2.MULTI_FACTOR &&
|
|
14227
|
+
result.type === FLOW_CODE_REQUIRED_V2) {
|
|
14228
|
+
return new CustomAuthResultV2(new MFAVerificationRequiredStateV2({
|
|
14287
14229
|
...commonStateParameters,
|
|
14288
14230
|
method: selectedMethod,
|
|
14289
14231
|
sentTo: result.sentTo,
|
|
@@ -14291,115 +14233,44 @@ class AuthMethodSelectionRequiredStateV2 extends AuthenticationMethodSelectionSt
|
|
|
14291
14233
|
codeLength: result.codeLength,
|
|
14292
14234
|
}), undefined, result.continuationState.scenario);
|
|
14293
14235
|
}
|
|
14294
|
-
|
|
14236
|
+
const expectedChallenge = authenticationFactor === AuthenticationFactorV2.SINGLE_FACTOR
|
|
14237
|
+
? continuationState.scenario ===
|
|
14238
|
+
CustomAuthFlowScenarioV2.SignIn
|
|
14239
|
+
? "an email or SMS code challenge or a password challenge for single-factor sign-in"
|
|
14240
|
+
: "an email or SMS code challenge for single-factor authentication"
|
|
14241
|
+
: "a code challenge for multi-factor authentication";
|
|
14242
|
+
const returnedChallenge = result.type === FLOW_CODE_REQUIRED_V2
|
|
14295
14243
|
? result.channel
|
|
14296
|
-
|
|
14244
|
+
? `a '${result.channel}' code challenge`
|
|
14245
|
+
: "a code challenge without a channel"
|
|
14246
|
+
: "a password challenge";
|
|
14247
|
+
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, `Authentication method selection expected ${expectedChallenge}, but the server returned ${returnedChallenge}.`, correlationId);
|
|
14297
14248
|
}
|
|
14298
14249
|
catch (error) {
|
|
14299
14250
|
logger.errorPii(`0z5x7r ${error}`, correlationId);
|
|
14300
14251
|
return CustomAuthResultV2.createWithError(error, {
|
|
14301
|
-
errorType: RequestChallengeErrorV2,
|
|
14302
14252
|
scenario: continuationState.scenario,
|
|
14303
14253
|
correlationId,
|
|
14304
14254
|
});
|
|
14305
14255
|
}
|
|
14306
14256
|
}
|
|
14307
|
-
|
|
14308
|
-
|
|
14309
|
-
|
|
14310
|
-
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
|
|
14314
|
-
|
|
14315
|
-
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
*/
|
|
14325
|
-
isInvalidUsername() {
|
|
14326
|
-
return this.isUserInvalidError();
|
|
14327
|
-
}
|
|
14328
|
-
/**
|
|
14329
|
-
* Checks if the error is due to the user not being found. Use it to tell the
|
|
14330
|
-
* user no account matches the supplied username, rather than exposing a
|
|
14331
|
-
* generic failure that hides the real cause.
|
|
14332
|
-
* @returns True if the user was not found, false otherwise.
|
|
14333
|
-
*/
|
|
14334
|
-
isUserNotFound() {
|
|
14335
|
-
return this.isUserNotFoundError();
|
|
14336
|
-
}
|
|
14337
|
-
}
|
|
14338
|
-
|
|
14339
|
-
/*
|
|
14340
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14341
|
-
* Licensed under the MIT License.
|
|
14342
|
-
*/
|
|
14343
|
-
/**
|
|
14344
|
-
* Error returned when native auth V2 sign-in cannot start.
|
|
14345
|
-
*/
|
|
14346
|
-
class SignInStartErrorV2 extends AuthFlowErrorBaseV2 {
|
|
14347
|
-
/**
|
|
14348
|
-
* Checks whether the service rejected the username parameter.
|
|
14349
|
-
* @returns True when the username was empty or invalid.
|
|
14350
|
-
*/
|
|
14351
|
-
isInvalidUsername() {
|
|
14352
|
-
return this.isUserInvalidError();
|
|
14353
|
-
}
|
|
14354
|
-
/**
|
|
14355
|
-
* Checks whether the supplied username does not identify an account.
|
|
14356
|
-
* @returns True when the service reports that the user was not found.
|
|
14357
|
-
*/
|
|
14358
|
-
isUserNotFound() {
|
|
14359
|
-
return this.isUserNotFoundError();
|
|
14360
|
-
}
|
|
14361
|
-
/**
|
|
14362
|
-
* Checks whether an automatically submitted password was rejected.
|
|
14363
|
-
* @returns True when the password is incorrect.
|
|
14364
|
-
*/
|
|
14365
|
-
isInvalidPassword() {
|
|
14366
|
-
return this.isPasswordIncorrectError();
|
|
14367
|
-
}
|
|
14368
|
-
}
|
|
14369
|
-
|
|
14370
|
-
/*
|
|
14371
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14372
|
-
* Licensed under the MIT License.
|
|
14373
|
-
*/
|
|
14374
|
-
/**
|
|
14375
|
-
* Error returned when native auth V2 sign-up cannot start. It exposes
|
|
14376
|
-
* detectors for failures that an app can correct without restarting the flow.
|
|
14377
|
-
*/
|
|
14378
|
-
class SignUpStartErrorV2 extends AuthFlowErrorBaseV2 {
|
|
14379
|
-
/**
|
|
14380
|
-
* Checks whether an upfront password violates the tenant's password policy.
|
|
14381
|
-
* Use it to prompt the user for a stronger password.
|
|
14382
|
-
* @returns True when the password violates policy, otherwise false.
|
|
14383
|
-
*/
|
|
14384
|
-
isInvalidPassword() {
|
|
14385
|
-
return this.isPasswordPolicyViolationError();
|
|
14386
|
-
}
|
|
14387
|
-
}
|
|
14388
|
-
|
|
14389
|
-
/*
|
|
14390
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14391
|
-
* Licensed under the MIT License.
|
|
14392
|
-
*/
|
|
14393
|
-
/**
|
|
14394
|
-
* Error returned when a password cannot be submitted for V2 sign-in.
|
|
14395
|
-
*/
|
|
14396
|
-
class SubmitPasswordErrorV2 extends AuthFlowErrorBaseV2 {
|
|
14397
|
-
/**
|
|
14398
|
-
* Checks whether the supplied password was rejected.
|
|
14399
|
-
* @returns True when the password is incorrect.
|
|
14400
|
-
*/
|
|
14401
|
-
isInvalidPassword() {
|
|
14402
|
-
return this.isPasswordIncorrectError();
|
|
14257
|
+
async requestSelectedMethodChallenge(method) {
|
|
14258
|
+
const { correlationId, continuationState, flowClient } = this.stateParameters;
|
|
14259
|
+
const selectedMethod = this.methods.find((candidate) => candidate.id === method.id);
|
|
14260
|
+
if (!selectedMethod) {
|
|
14261
|
+
throw new InvalidArgumentError("method", correlationId);
|
|
14262
|
+
}
|
|
14263
|
+
const result = await flowClient.requestChallenge({
|
|
14264
|
+
correlationId,
|
|
14265
|
+
continuationState: {
|
|
14266
|
+
...continuationState,
|
|
14267
|
+
links: {
|
|
14268
|
+
...continuationState.links,
|
|
14269
|
+
challenge: selectedMethod.challengeHref,
|
|
14270
|
+
},
|
|
14271
|
+
},
|
|
14272
|
+
});
|
|
14273
|
+
return { result, selectedMethod };
|
|
14403
14274
|
}
|
|
14404
14275
|
}
|
|
14405
14276
|
|
|
@@ -14436,7 +14307,7 @@ class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
14436
14307
|
return new CustomAuthResultV2(new CompletedStateV2(), account, continuationState.scenario);
|
|
14437
14308
|
}
|
|
14438
14309
|
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
14439
|
-
return new CustomAuthResultV2(new
|
|
14310
|
+
return new CustomAuthResultV2(new AuthMethodSelectionRequiredStateV2({
|
|
14440
14311
|
correlationId: result.correlationId,
|
|
14441
14312
|
logger,
|
|
14442
14313
|
config: this.stateParameters.config,
|
|
@@ -14444,6 +14315,7 @@ class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
14444
14315
|
continuationState: result.continuationState,
|
|
14445
14316
|
cacheClient: this.stateParameters.cacheClient,
|
|
14446
14317
|
methods: result.methods,
|
|
14318
|
+
authenticationFactor: AuthenticationFactorV2.MULTI_FACTOR,
|
|
14447
14319
|
}), undefined, result.continuationState.scenario);
|
|
14448
14320
|
}
|
|
14449
14321
|
throw new CustomAuthError(UNSUPPORTED_FLOW_TRANSITION, `Password verification result type '${resultType}' is not supported.`, correlationId);
|
|
@@ -14451,7 +14323,6 @@ class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
14451
14323
|
catch (error) {
|
|
14452
14324
|
logger.errorPii(`0qvjzk ${error}`, correlationId);
|
|
14453
14325
|
return CustomAuthResultV2.createWithError(error, {
|
|
14454
|
-
errorType: SubmitPasswordErrorV2,
|
|
14455
14326
|
scenario: continuationState.scenario,
|
|
14456
14327
|
correlationId,
|
|
14457
14328
|
});
|
|
@@ -14463,26 +14334,25 @@ class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
|
|
|
14463
14334
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14464
14335
|
* Licensed under the MIT License.
|
|
14465
14336
|
*/
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
* Use it to collect the required attributes before resubmitting.
|
|
14474
|
-
* @returns True when required attributes are missing, otherwise false.
|
|
14475
|
-
*/
|
|
14476
|
-
isMissingRequiredAttributes() {
|
|
14477
|
-
return this.getAttributeValidationDetails().some((detail) => detail.code === "attributeRequired");
|
|
14337
|
+
class SignInStateTransitionHandlerV2 {
|
|
14338
|
+
handlePasswordRequired(result, stateParameters) {
|
|
14339
|
+
return new CustomAuthResultV2(new PasswordRequiredStateV2({
|
|
14340
|
+
...stateParameters,
|
|
14341
|
+
correlationId: result.correlationId,
|
|
14342
|
+
continuationState: result.continuationState,
|
|
14343
|
+
}), undefined, result.continuationState.scenario);
|
|
14478
14344
|
}
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14345
|
+
handleMfaRequired(result, stateParameters) {
|
|
14346
|
+
return new CustomAuthResultV2(new AuthMethodSelectionRequiredStateV2({
|
|
14347
|
+
correlationId: result.correlationId,
|
|
14348
|
+
logger: stateParameters.logger,
|
|
14349
|
+
config: stateParameters.config,
|
|
14350
|
+
flowClient: stateParameters.flowClient,
|
|
14351
|
+
continuationState: result.continuationState,
|
|
14352
|
+
cacheClient: stateParameters.cacheClient,
|
|
14353
|
+
methods: result.methods,
|
|
14354
|
+
authenticationFactor: AuthenticationFactorV2.MULTI_FACTOR,
|
|
14355
|
+
}), undefined, result.continuationState.scenario);
|
|
14486
14356
|
}
|
|
14487
14357
|
}
|
|
14488
14358
|
|
|
@@ -14529,7 +14399,6 @@ class AttributesRequiredStateV2 extends SignUpAttributesRequiredStateBaseV2 {
|
|
|
14529
14399
|
catch (error) {
|
|
14530
14400
|
logger.errorPii(`0l4w01 ${error}`, correlationId);
|
|
14531
14401
|
return CustomAuthResultV2.createWithError(error, {
|
|
14532
|
-
errorType: SubmitAttributesErrorV2,
|
|
14533
14402
|
scenario: continuationState.scenario,
|
|
14534
14403
|
correlationId,
|
|
14535
14404
|
});
|
|
@@ -14568,7 +14437,6 @@ class SignUpPasswordRequiredStateV2 extends SignUpAttributesRequiredStateBaseV2
|
|
|
14568
14437
|
catch (error) {
|
|
14569
14438
|
logger.errorPii(`07t30r ${error}`, correlationId);
|
|
14570
14439
|
return CustomAuthResultV2.createWithError(error, {
|
|
14571
|
-
errorType: SubmitAttributesErrorV2,
|
|
14572
14440
|
scenario: continuationState.scenario,
|
|
14573
14441
|
correlationId,
|
|
14574
14442
|
});
|
|
@@ -20045,6 +19913,53 @@ class EventHandler {
|
|
|
20045
19913
|
}
|
|
20046
19914
|
}
|
|
20047
19915
|
|
|
19916
|
+
/*
|
|
19917
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19918
|
+
* Licensed under the MIT License.
|
|
19919
|
+
*/
|
|
19920
|
+
/**
|
|
19921
|
+
* Returns true when the supplied user agent is using Safari
|
|
19922
|
+
*
|
|
19923
|
+
* @internal
|
|
19924
|
+
*/
|
|
19925
|
+
function isSafari(userAgent = typeof navigator !== "undefined"
|
|
19926
|
+
? navigator.userAgent
|
|
19927
|
+
: "") {
|
|
19928
|
+
if (/OPR\/|OPiOS|PhantomJS|SamsungBrowser|Edge|EdgiOS|EdgA/.test(userAgent)) {
|
|
19929
|
+
return false;
|
|
19930
|
+
}
|
|
19931
|
+
const browserNavigator = typeof navigator !== "undefined"
|
|
19932
|
+
? navigator
|
|
19933
|
+
: undefined;
|
|
19934
|
+
if (/Edg/.test(userAgent) ||
|
|
19935
|
+
browserNavigator?.userAgentData?.brands?.some((brand) => brand?.brand === "Microsoft Edge")) {
|
|
19936
|
+
return false;
|
|
19937
|
+
}
|
|
19938
|
+
if (/Electron|CriOS|Chrome|Trident|FxiOS|Firefox/.test(userAgent)) {
|
|
19939
|
+
return false;
|
|
19940
|
+
}
|
|
19941
|
+
return /Safari/.test(userAgent) || /AppleWebKit/.test(userAgent);
|
|
19942
|
+
}
|
|
19943
|
+
/**
|
|
19944
|
+
* Returns true when EAR should be used for the current request.
|
|
19945
|
+
*
|
|
19946
|
+
* Safari cannot complete EAR's cross-origin form POST, so requests configured
|
|
19947
|
+
* for EAR transparently use authorization code flow instead.
|
|
19948
|
+
*
|
|
19949
|
+
* @internal
|
|
19950
|
+
*/
|
|
19951
|
+
function shouldUseEar(protocolMode, logger, performanceClient, correlationId, userAgent) {
|
|
19952
|
+
if (protocolMode !== ProtocolMode.EAR) {
|
|
19953
|
+
return false;
|
|
19954
|
+
}
|
|
19955
|
+
if (!isSafari(userAgent)) {
|
|
19956
|
+
return true;
|
|
19957
|
+
}
|
|
19958
|
+
logger.verbose("0wirye", correlationId);
|
|
19959
|
+
performanceClient.addFields({ "ext.earFallbackReason": "safari" }, correlationId);
|
|
19960
|
+
return false;
|
|
19961
|
+
}
|
|
19962
|
+
|
|
20048
19963
|
/*
|
|
20049
19964
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
20050
19965
|
* Licensed under the MIT License.
|
|
@@ -22723,7 +22638,7 @@ class PopupClient extends StandardInteractionClient {
|
|
|
22723
22638
|
}
|
|
22724
22639
|
const isPlatformBroker = isPlatformAuthAllowed(this.config, this.logger, this.correlationId, this.platformAuthProvider, request.authenticationScheme);
|
|
22725
22640
|
validRequest.platformBroker = isPlatformBroker;
|
|
22726
|
-
if (this.config.system.protocolMode
|
|
22641
|
+
if (shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)) {
|
|
22727
22642
|
return this.executeEarFlow(validRequest, popupParams, pkceCodes);
|
|
22728
22643
|
}
|
|
22729
22644
|
else {
|
|
@@ -23177,7 +23092,7 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
23177
23092
|
// Clear temporary cache if the back button is clicked during the redirect flow.
|
|
23178
23093
|
window.addEventListener("pageshow", handleBackButton);
|
|
23179
23094
|
try {
|
|
23180
|
-
const redirectOperation = this.config.system.protocolMode
|
|
23095
|
+
const redirectOperation = shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)
|
|
23181
23096
|
? this.executeEarFlow(validRequest)
|
|
23182
23097
|
: this.executeCodeFlow(validRequest);
|
|
23183
23098
|
await Promise.race([redirectOperation, backButtonCancellation]);
|
|
@@ -23679,7 +23594,7 @@ class SilentIframeClient extends StandardInteractionClient {
|
|
|
23679
23594
|
const silentRequest = await invokeAsync(initializeAuthorizationRequest, StandardInteractionClientInitializeAuthorizationRequest, this.logger, this.performanceClient, this.correlationId)(inputRequest, InteractionType.Silent, this.config, this.browserCrypto, this.browserStorage, this.logger, this.performanceClient, this.correlationId);
|
|
23680
23595
|
silentRequest.platformBroker = isPlatformAuthAllowed(this.config, this.logger, this.correlationId, this.platformAuthProvider, silentRequest.authenticationScheme);
|
|
23681
23596
|
preconnect(silentRequest.authority);
|
|
23682
|
-
if (this.config.system.protocolMode
|
|
23597
|
+
if (shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)) {
|
|
23683
23598
|
return this.executeEarFlow(silentRequest);
|
|
23684
23599
|
}
|
|
23685
23600
|
else {
|
|
@@ -24063,14 +23978,20 @@ function resolveSilentRequestPreparation(input, platformAuthProvider, logger, pe
|
|
|
24063
23978
|
return prepareRequest(input);
|
|
24064
23979
|
}
|
|
24065
23980
|
/**
|
|
24066
|
-
*
|
|
23981
|
+
* Extends the web thumbprint with silent-flow options while preserving caller-owned references.
|
|
24067
23982
|
*/
|
|
24068
23983
|
function prepareWebSilentRequest({ request, account, correlationId, config, }) {
|
|
24069
23984
|
const thumbprint = getRequestThumbprint(config.auth.clientId, {
|
|
24070
23985
|
...request,
|
|
24071
23986
|
authority: request.authority || config.auth.authority}, account.homeAccountId);
|
|
24072
23987
|
return {
|
|
24073
|
-
key: JSON.stringify(
|
|
23988
|
+
key: JSON.stringify({
|
|
23989
|
+
...thumbprint,
|
|
23990
|
+
forceRefresh: !!request.forceRefresh,
|
|
23991
|
+
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
23992
|
+
extraParameters: canonicalizeStringDict(request.extraParameters),
|
|
23993
|
+
extraQueryParameters: canonicalizeStringDict(request.extraQueryParameters),
|
|
23994
|
+
}),
|
|
24074
23995
|
request,
|
|
24075
23996
|
account,
|
|
24076
23997
|
};
|
|
@@ -25681,6 +25602,7 @@ class CustomAuthStandardController extends StandardController {
|
|
|
25681
25602
|
constructor(operatingContext, customAuthApiClient, customAuthApiClientV2) {
|
|
25682
25603
|
super(operatingContext);
|
|
25683
25604
|
this.signUpStateTransitionHandlerV2 = new SignUpStateTransitionHandlerV2();
|
|
25605
|
+
this.signInStateTransitionHandlerV2 = new SignInStateTransitionHandlerV2();
|
|
25684
25606
|
if (!this.isBrowserEnvironment) {
|
|
25685
25607
|
this.logger.verbose("1f7i3q", "");
|
|
25686
25608
|
throw new UnsupportedEnvironmentError();
|
|
@@ -25958,11 +25880,19 @@ class CustomAuthStandardController extends StandardController {
|
|
|
25958
25880
|
try {
|
|
25959
25881
|
ensureArgumentIsNotNullOrUndefined("inputs", inputs, correlationId);
|
|
25960
25882
|
ensureArgumentIsNotEmptyString("inputs.username", inputs.username, correlationId);
|
|
25883
|
+
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
25884
|
+
ensureArgumentIsStringArray("inputs.scopes", inputs.scopes, correlationId);
|
|
25885
|
+
}
|
|
25886
|
+
if (inputs.claims) {
|
|
25887
|
+
ensureArgumentIsJSONString("inputs.claims", inputs.claims, correlationId);
|
|
25888
|
+
}
|
|
25961
25889
|
this.ensureUserNotSignedIn(correlationId);
|
|
25962
25890
|
this.logger.verbose("0301h1", correlationId);
|
|
25963
25891
|
const result = await this.flowClientV2.resetPassword({
|
|
25964
25892
|
correlationId,
|
|
25965
25893
|
username: inputs.username,
|
|
25894
|
+
scopes: inputs.scopes,
|
|
25895
|
+
claims: inputs.claims,
|
|
25966
25896
|
});
|
|
25967
25897
|
this.logger.verbose("1yrzgs", correlationId);
|
|
25968
25898
|
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
@@ -25987,12 +25917,12 @@ class CustomAuthStandardController extends StandardController {
|
|
|
25987
25917
|
continuationState: result.continuationState,
|
|
25988
25918
|
cacheClient: this.cacheClient,
|
|
25989
25919
|
methods: result.methods,
|
|
25920
|
+
authenticationFactor: AuthenticationFactorV2.SINGLE_FACTOR,
|
|
25990
25921
|
}), undefined, result.continuationState.scenario);
|
|
25991
25922
|
}
|
|
25992
25923
|
catch (error) {
|
|
25993
25924
|
this.logger.errorPii(`1f279y ${error}`, correlationId);
|
|
25994
25925
|
return CustomAuthResultV2.createWithError(error, {
|
|
25995
|
-
errorType: ResetPasswordStartErrorV2,
|
|
25996
25926
|
scenario: CustomAuthFlowScenarioV2.PasswordReset,
|
|
25997
25927
|
correlationId,
|
|
25998
25928
|
});
|
|
@@ -26003,6 +25933,9 @@ class CustomAuthStandardController extends StandardController {
|
|
|
26003
25933
|
try {
|
|
26004
25934
|
ensureArgumentIsNotNullOrUndefined("inputs", inputs, correlationId);
|
|
26005
25935
|
ensureArgumentIsNotEmptyString("inputs.username", inputs.username, correlationId);
|
|
25936
|
+
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
25937
|
+
ensureArgumentIsStringArray("inputs.scopes", inputs.scopes, correlationId);
|
|
25938
|
+
}
|
|
26006
25939
|
if (inputs.claims) {
|
|
26007
25940
|
ensureArgumentIsJSONString("inputs.claims", inputs.claims, correlationId);
|
|
26008
25941
|
}
|
|
@@ -26013,19 +25946,19 @@ class CustomAuthStandardController extends StandardController {
|
|
|
26013
25946
|
username: inputs.username,
|
|
26014
25947
|
password: inputs.password,
|
|
26015
25948
|
scopes: inputs.scopes,
|
|
25949
|
+
claims: inputs.claims,
|
|
26016
25950
|
});
|
|
26017
25951
|
if (result.type === FLOW_COMPLETED_V2) {
|
|
26018
25952
|
return new CustomAuthResultV2(new CompletedStateV2(), new CustomAuthAccountData(result.authenticationResult.account, this.customAuthConfig, this.cacheClient, this.logger, correlationId), CustomAuthFlowScenarioV2.SignIn);
|
|
26019
25953
|
}
|
|
26020
|
-
if (result.type ===
|
|
26021
|
-
return new CustomAuthResultV2(new
|
|
25954
|
+
if (result.type === FLOW_PASSWORD_REQUIRED_V2) {
|
|
25955
|
+
return new CustomAuthResultV2(new PasswordRequiredStateV2({
|
|
26022
25956
|
correlationId: result.correlationId,
|
|
26023
25957
|
logger: this.logger,
|
|
26024
25958
|
config: this.customAuthConfig,
|
|
26025
25959
|
flowClient: this.flowClientV2,
|
|
26026
25960
|
continuationState: result.continuationState,
|
|
26027
25961
|
cacheClient: this.cacheClient,
|
|
26028
|
-
methods: result.methods,
|
|
26029
25962
|
}), undefined, result.continuationState.scenario);
|
|
26030
25963
|
}
|
|
26031
25964
|
if (result.type === FLOW_CODE_REQUIRED_V2) {
|
|
@@ -26036,20 +25969,36 @@ class CustomAuthStandardController extends StandardController {
|
|
|
26036
25969
|
flowClient: this.flowClientV2,
|
|
26037
25970
|
continuationState: result.continuationState,
|
|
26038
25971
|
cacheClient: this.cacheClient,
|
|
25972
|
+
signInStateTransitionHandler: this.signInStateTransitionHandlerV2,
|
|
26039
25973
|
method: result.method,
|
|
26040
25974
|
sentTo: result.sentTo,
|
|
26041
25975
|
channel: result.channel,
|
|
26042
25976
|
codeLength: result.codeLength,
|
|
26043
25977
|
}), undefined, result.continuationState.scenario);
|
|
26044
25978
|
}
|
|
26045
|
-
if (result.type ===
|
|
26046
|
-
return new CustomAuthResultV2(new
|
|
25979
|
+
if (result.type === FLOW_METHOD_SELECTION_REQUIRED_V2) {
|
|
25980
|
+
return new CustomAuthResultV2(new AuthMethodSelectionRequiredStateV2({
|
|
25981
|
+
correlationId: result.correlationId,
|
|
25982
|
+
logger: this.logger,
|
|
25983
|
+
config: this.customAuthConfig,
|
|
25984
|
+
flowClient: this.flowClientV2,
|
|
25985
|
+
continuationState: result.continuationState,
|
|
25986
|
+
cacheClient: this.cacheClient,
|
|
25987
|
+
methods: result.methods,
|
|
25988
|
+
authenticationFactor: AuthenticationFactorV2.SINGLE_FACTOR,
|
|
25989
|
+
signInStateTransitionHandler: this.signInStateTransitionHandlerV2,
|
|
25990
|
+
}), undefined, result.continuationState.scenario);
|
|
25991
|
+
}
|
|
25992
|
+
if (result.type === FLOW_MFA_REQUIRED_V2) {
|
|
25993
|
+
return new CustomAuthResultV2(new AuthMethodSelectionRequiredStateV2({
|
|
26047
25994
|
correlationId: result.correlationId,
|
|
26048
25995
|
logger: this.logger,
|
|
26049
25996
|
config: this.customAuthConfig,
|
|
26050
25997
|
flowClient: this.flowClientV2,
|
|
26051
25998
|
continuationState: result.continuationState,
|
|
26052
25999
|
cacheClient: this.cacheClient,
|
|
26000
|
+
methods: result.methods,
|
|
26001
|
+
authenticationFactor: AuthenticationFactorV2.MULTI_FACTOR,
|
|
26053
26002
|
}), undefined, result.continuationState.scenario);
|
|
26054
26003
|
}
|
|
26055
26004
|
throw new UnexpectedError("Unsupported native auth V2 sign-in result type.", correlationId);
|
|
@@ -26057,7 +26006,6 @@ class CustomAuthStandardController extends StandardController {
|
|
|
26057
26006
|
catch (error) {
|
|
26058
26007
|
this.logger.errorPii(`11afy0 ${error}`, correlationId);
|
|
26059
26008
|
return CustomAuthResultV2.createWithError(error, {
|
|
26060
|
-
errorType: SignInStartErrorV2,
|
|
26061
26009
|
scenario: CustomAuthFlowScenarioV2.SignIn,
|
|
26062
26010
|
correlationId,
|
|
26063
26011
|
});
|
|
@@ -26072,6 +26020,12 @@ class CustomAuthStandardController extends StandardController {
|
|
|
26072
26020
|
ensureArgumentIsNotNullOrUndefined("inputs.password", inputs.password, correlationId);
|
|
26073
26021
|
ensureArgumentIsNotEmptyString("inputs.password", inputs.password, correlationId);
|
|
26074
26022
|
}
|
|
26023
|
+
if (inputs.scopes !== undefined && inputs.scopes !== null) {
|
|
26024
|
+
ensureArgumentIsStringArray("inputs.scopes", inputs.scopes, correlationId);
|
|
26025
|
+
}
|
|
26026
|
+
if (inputs.claims) {
|
|
26027
|
+
ensureArgumentIsJSONString("inputs.claims", inputs.claims, correlationId);
|
|
26028
|
+
}
|
|
26075
26029
|
this.ensureUserNotSignedIn(correlationId);
|
|
26076
26030
|
this.logger.verbose("0010xn", correlationId);
|
|
26077
26031
|
const result = await this.flowClientV2.signUp({
|
|
@@ -26117,7 +26071,6 @@ class CustomAuthStandardController extends StandardController {
|
|
|
26117
26071
|
catch (error) {
|
|
26118
26072
|
this.logger.errorPii(`196wno ${error}`, correlationId);
|
|
26119
26073
|
return CustomAuthResultV2.createWithError(error, {
|
|
26120
|
-
errorType: SignUpStartErrorV2,
|
|
26121
26074
|
scenario: CustomAuthFlowScenarioV2.SignUp,
|
|
26122
26075
|
correlationId,
|
|
26123
26076
|
});
|
|
@@ -27051,6 +27004,7 @@ class UserAccountAttributeError extends CustomAuthError {
|
|
|
27051
27004
|
|
|
27052
27005
|
exports.AttributesRequiredStateV2 = AttributesRequiredStateV2;
|
|
27053
27006
|
exports.AuthFlowActionRequiredStateBase = AuthFlowActionRequiredStateBase;
|
|
27007
|
+
exports.AuthFlowErrorV2 = AuthFlowErrorV2;
|
|
27054
27008
|
exports.AuthFlowStateBase = AuthFlowStateBase;
|
|
27055
27009
|
exports.AuthMethodRegistrationChallengeMethodError = AuthMethodRegistrationChallengeMethodError;
|
|
27056
27010
|
exports.AuthMethodRegistrationChallengeMethodResult = AuthMethodRegistrationChallengeMethodResult;
|
|
@@ -27077,7 +27031,6 @@ exports.GetCurrentAccountAccessTokenError = GetCurrentAccountAccessTokenError;
|
|
|
27077
27031
|
exports.HttpError = HttpError;
|
|
27078
27032
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
27079
27033
|
exports.InvalidConfigurationError = InvalidConfigurationError;
|
|
27080
|
-
exports.MFARequiredStateV2 = MFARequiredStateV2;
|
|
27081
27034
|
exports.MFAVerificationRequiredStateV2 = MFAVerificationRequiredStateV2;
|
|
27082
27035
|
exports.MethodNotImplementedError = MethodNotImplementedError;
|
|
27083
27036
|
exports.MfaAwaitingState = MfaAwaitingState;
|
|
@@ -27093,7 +27046,6 @@ exports.NewPasswordRequiredStateV2 = NewPasswordRequiredStateV2;
|
|
|
27093
27046
|
exports.NoCachedAccountFoundError = NoCachedAccountFoundError;
|
|
27094
27047
|
exports.ParsedUrlError = ParsedUrlError;
|
|
27095
27048
|
exports.PasswordRequiredStateV2 = PasswordRequiredStateV2;
|
|
27096
|
-
exports.RequestChallengeErrorV2 = RequestChallengeErrorV2;
|
|
27097
27049
|
exports.ResetPasswordCodeRequiredState = ResetPasswordCodeRequiredState;
|
|
27098
27050
|
exports.ResetPasswordCompletedState = ResetPasswordCompletedState;
|
|
27099
27051
|
exports.ResetPasswordError = ResetPasswordError;
|
|
@@ -27101,7 +27053,6 @@ exports.ResetPasswordFailedState = ResetPasswordFailedState;
|
|
|
27101
27053
|
exports.ResetPasswordPasswordRequiredState = ResetPasswordPasswordRequiredState;
|
|
27102
27054
|
exports.ResetPasswordResendCodeError = ResetPasswordResendCodeError;
|
|
27103
27055
|
exports.ResetPasswordResendCodeResult = ResetPasswordResendCodeResult;
|
|
27104
|
-
exports.ResetPasswordStartErrorV2 = ResetPasswordStartErrorV2;
|
|
27105
27056
|
exports.ResetPasswordStartResult = ResetPasswordStartResult;
|
|
27106
27057
|
exports.ResetPasswordState = ResetPasswordState;
|
|
27107
27058
|
exports.ResetPasswordSubmitCodeError = ResetPasswordSubmitCodeError;
|
|
@@ -27110,7 +27061,6 @@ exports.ResetPasswordSubmitPasswordError = ResetPasswordSubmitPasswordError;
|
|
|
27110
27061
|
exports.ResetPasswordSubmitPasswordResult = ResetPasswordSubmitPasswordResult;
|
|
27111
27062
|
exports.SignInCodeRequiredState = SignInCodeRequiredState;
|
|
27112
27063
|
exports.SignInCompletedState = SignInCompletedState;
|
|
27113
|
-
exports.SignInContinuationErrorV2 = SignInContinuationErrorV2;
|
|
27114
27064
|
exports.SignInContinuationState = SignInContinuationState;
|
|
27115
27065
|
exports.SignInContinuationStateV2 = SignInContinuationStateV2;
|
|
27116
27066
|
exports.SignInError = SignInError;
|
|
@@ -27119,7 +27069,6 @@ exports.SignInPasswordRequiredState = SignInPasswordRequiredState;
|
|
|
27119
27069
|
exports.SignInResendCodeError = SignInResendCodeError;
|
|
27120
27070
|
exports.SignInResendCodeResult = SignInResendCodeResult;
|
|
27121
27071
|
exports.SignInResult = SignInResult;
|
|
27122
|
-
exports.SignInStartErrorV2 = SignInStartErrorV2;
|
|
27123
27072
|
exports.SignInState = SignInState;
|
|
27124
27073
|
exports.SignInSubmitCodeError = SignInSubmitCodeError;
|
|
27125
27074
|
exports.SignInSubmitCodeResult = SignInSubmitCodeResult;
|
|
@@ -27137,7 +27086,6 @@ exports.SignUpPasswordRequiredStateV2 = SignUpPasswordRequiredStateV2;
|
|
|
27137
27086
|
exports.SignUpResendCodeError = SignUpResendCodeError;
|
|
27138
27087
|
exports.SignUpResendCodeResult = SignUpResendCodeResult;
|
|
27139
27088
|
exports.SignUpResult = SignUpResult;
|
|
27140
|
-
exports.SignUpStartErrorV2 = SignUpStartErrorV2;
|
|
27141
27089
|
exports.SignUpState = SignUpState;
|
|
27142
27090
|
exports.SignUpSubmitAttributesError = SignUpSubmitAttributesError;
|
|
27143
27091
|
exports.SignUpSubmitAttributesResult = SignUpSubmitAttributesResult;
|
|
@@ -27145,12 +27093,8 @@ exports.SignUpSubmitCodeError = SignUpSubmitCodeError;
|
|
|
27145
27093
|
exports.SignUpSubmitCodeResult = SignUpSubmitCodeResult;
|
|
27146
27094
|
exports.SignUpSubmitPasswordError = SignUpSubmitPasswordError;
|
|
27147
27095
|
exports.SignUpSubmitPasswordResult = SignUpSubmitPasswordResult;
|
|
27148
|
-
exports.SubmitAttributesErrorV2 = SubmitAttributesErrorV2;
|
|
27149
|
-
exports.SubmitNewPasswordErrorV2 = SubmitNewPasswordErrorV2;
|
|
27150
|
-
exports.SubmitPasswordErrorV2 = SubmitPasswordErrorV2;
|
|
27151
27096
|
exports.UnexpectedError = UnexpectedError;
|
|
27152
27097
|
exports.UnsupportedEnvironmentError = UnsupportedEnvironmentError;
|
|
27153
27098
|
exports.UserAccountAttributeError = UserAccountAttributeError;
|
|
27154
27099
|
exports.UserAlreadySignedInError = UserAlreadySignedInError;
|
|
27155
|
-
exports.VerifyChallengeErrorV2 = VerifyChallengeErrorV2;
|
|
27156
27100
|
//# sourceMappingURL=msal-custom-auth.cjs.map
|