@azure/msal-browser 5.25.1 → 5.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +54 -14
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +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 +32 -4
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +7 -2
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +36 -5
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/crypto/TokenBindingKeyManager.mjs +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 +31 -3
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +5 -5
- 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 +7 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +27 -7
- 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 +23 -13
- package/dist/protocol/Authorize.mjs.map +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 +7 -2
- package/dist/utils/BrowserUtils.mjs.map +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/IframeMonitor.mjs +81 -0
- package/dist/utils/IframeMonitor.mjs.map +1 -0
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +119 -0
- package/dist/utils/PopupMonitor.mjs.map +1 -0
- package/dist/utils/PopupOriginCheck.mjs +88 -0
- package/dist/utils/PopupOriginCheck.mjs.map +1 -0
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
- package/dist/webBrokerBridge/index.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +27 -7
- package/lib/custom-auth-path/msal-custom-auth.cjs +1157 -718
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +1157 -718
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +27 -3
- package/lib/msal-browser.cjs +678 -134
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +678 -134
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/app/PublicClientApplication.ts +108 -8
- package/src/config/Configuration.ts +63 -6
- package/src/controllers/NestedAppAuthController.ts +6 -1
- package/src/controllers/StandardController.ts +46 -3
- 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 +45 -1
- package/src/interaction_client/RedirectClient.ts +9 -5
- package/src/interaction_client/SilentIframeClient.ts +9 -2
- package/src/interaction_client/StandardInteractionClient.ts +6 -0
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +34 -28
- package/src/request/SilentRequestHelpers.ts +11 -2
- package/src/utils/BrowserDetection.ts +85 -0
- package/src/utils/BrowserUtils.ts +8 -1
- package/src/utils/IframeMonitor.ts +98 -0
- package/src/utils/PopupMonitor.ts +158 -0
- package/src/utils/PopupOriginCheck.ts +94 -0
- package/types/app/PublicClientApplication.d.ts +6 -4
- package/types/app/PublicClientApplication.d.ts.map +1 -1
- package/types/config/Configuration.d.ts +16 -0
- package/types/config/Configuration.d.ts.map +1 -1
- package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/types/controllers/StandardController.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 +12 -0
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/protocol/Authorize.d.ts.map +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/types/utils/BrowserUtils.d.ts +2 -1
- package/types/utils/BrowserUtils.d.ts.map +1 -1
- package/types/utils/IframeMonitor.d.ts +17 -0
- package/types/utils/IframeMonitor.d.ts.map +1 -0
- package/types/utils/PopupMonitor.d.ts +37 -0
- package/types/utils/PopupMonitor.d.ts.map +1 -0
- package/types/utils/PopupOriginCheck.d.ts +27 -0
- package/types/utils/PopupOriginCheck.d.ts.map +1 -0
- 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
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.27.0 2026-10-27 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v16.
|
|
9
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -58,9 +58,15 @@
|
|
|
58
58
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
59
59
|
const RESOURCE = "resource";
|
|
60
60
|
const CLI_DATA = "clidata";
|
|
61
|
-
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
61
|
+
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
62
|
+
/**
|
|
63
|
+
* Popup-origin-check-done. Signals to the STS that the client verified the
|
|
64
|
+
* popup cannot be reached by an untrusted window, so the
|
|
65
|
+
* Cross-Origin-Opener-Policy response header may be omitted.
|
|
66
|
+
*/
|
|
67
|
+
const POPUP_ORIGIN_CHECK_DONE = "pocd";
|
|
62
68
|
|
|
63
|
-
/*! @azure/msal-common v16.
|
|
69
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
64
70
|
/*
|
|
65
71
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
66
72
|
* Licensed under the MIT License.
|
|
@@ -299,7 +305,7 @@
|
|
|
299
305
|
// Token renewal offset default in seconds
|
|
300
306
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
301
307
|
|
|
302
|
-
/*! @azure/msal-common v16.
|
|
308
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
303
309
|
/*
|
|
304
310
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
305
311
|
* Licensed under the MIT License.
|
|
@@ -328,7 +334,7 @@
|
|
|
328
334
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
329
335
|
}
|
|
330
336
|
|
|
331
|
-
/*! @azure/msal-common v16.
|
|
337
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
332
338
|
|
|
333
339
|
/*
|
|
334
340
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -351,7 +357,7 @@
|
|
|
351
357
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
352
358
|
}
|
|
353
359
|
|
|
354
|
-
/*! @azure/msal-common v16.
|
|
360
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
355
361
|
/*
|
|
356
362
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
357
363
|
* Licensed under the MIT License.
|
|
@@ -437,7 +443,7 @@
|
|
|
437
443
|
userCanceled: userCanceled
|
|
438
444
|
});
|
|
439
445
|
|
|
440
|
-
/*! @azure/msal-common v16.
|
|
446
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
441
447
|
|
|
442
448
|
/*
|
|
443
449
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -475,7 +481,7 @@
|
|
|
475
481
|
};
|
|
476
482
|
}
|
|
477
483
|
|
|
478
|
-
/*! @azure/msal-common v16.
|
|
484
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
479
485
|
|
|
480
486
|
/*
|
|
481
487
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -541,7 +547,7 @@
|
|
|
541
547
|
return matches[2];
|
|
542
548
|
}
|
|
543
549
|
|
|
544
|
-
/*! @azure/msal-common v16.
|
|
550
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
545
551
|
|
|
546
552
|
/*
|
|
547
553
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -629,7 +635,7 @@
|
|
|
629
635
|
return updatedAccountInfo;
|
|
630
636
|
}
|
|
631
637
|
|
|
632
|
-
/*! @azure/msal-common v16.
|
|
638
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
633
639
|
/*
|
|
634
640
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
635
641
|
* Licensed under the MIT License.
|
|
@@ -643,7 +649,7 @@
|
|
|
643
649
|
Ciam: 3,
|
|
644
650
|
};
|
|
645
651
|
|
|
646
|
-
/*! @azure/msal-common v16.
|
|
652
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
647
653
|
/*
|
|
648
654
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
649
655
|
* Licensed under the MIT License.
|
|
@@ -665,7 +671,7 @@
|
|
|
665
671
|
return null;
|
|
666
672
|
}
|
|
667
673
|
|
|
668
|
-
/*! @azure/msal-common v16.
|
|
674
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
669
675
|
/*
|
|
670
676
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
671
677
|
* Licensed under the MIT License.
|
|
@@ -689,7 +695,7 @@
|
|
|
689
695
|
EAR: "EAR",
|
|
690
696
|
};
|
|
691
697
|
|
|
692
|
-
/*! @azure/msal-common v16.
|
|
698
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
693
699
|
/**
|
|
694
700
|
* Returns the AccountInfo interface for this account.
|
|
695
701
|
* @internal
|
|
@@ -878,7 +884,7 @@
|
|
|
878
884
|
entity.hasOwnProperty("authorityType"));
|
|
879
885
|
}
|
|
880
886
|
|
|
881
|
-
/*! @azure/msal-common v16.
|
|
887
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
882
888
|
/*
|
|
883
889
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
884
890
|
* Licensed under the MIT License.
|
|
@@ -895,7 +901,7 @@
|
|
|
895
901
|
unexpectedError: unexpectedError
|
|
896
902
|
});
|
|
897
903
|
|
|
898
|
-
/*! @azure/msal-common v16.
|
|
904
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
899
905
|
|
|
900
906
|
/*
|
|
901
907
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -915,7 +921,47 @@
|
|
|
915
921
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
916
922
|
}
|
|
917
923
|
|
|
918
|
-
/*! @azure/msal-common v16.
|
|
924
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
925
|
+
/*
|
|
926
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
927
|
+
* Licensed under the MIT License.
|
|
928
|
+
*/
|
|
929
|
+
// Track only our normalized copies, never caller-owned mutable inputs.
|
|
930
|
+
const normalizedHeaderRecords = new WeakSet();
|
|
931
|
+
/**
|
|
932
|
+
* Creates a lowercase-keyed snapshot without changing header values or the input.
|
|
933
|
+
* Reuses snapshots produced by this function to avoid repeated normalization.
|
|
934
|
+
* @internal
|
|
935
|
+
*/
|
|
936
|
+
function normalizeResponseHeaders(headers) {
|
|
937
|
+
if (normalizedHeaderRecords.has(headers)) {
|
|
938
|
+
return headers;
|
|
939
|
+
}
|
|
940
|
+
const normalized = Object.fromEntries(Object.entries(headers).map(([name, value]) => [
|
|
941
|
+
name.toLowerCase(),
|
|
942
|
+
value,
|
|
943
|
+
]));
|
|
944
|
+
normalizedHeaderRecords.add(normalized);
|
|
945
|
+
return normalized;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Reads a response header case-insensitively.
|
|
949
|
+
* Normalized snapshots are never scanned, even when a header is missing.
|
|
950
|
+
* @internal
|
|
951
|
+
*/
|
|
952
|
+
function getResponseHeader(headers, name) {
|
|
953
|
+
const key = name.toLowerCase();
|
|
954
|
+
if (Object.prototype.hasOwnProperty.call(headers, key)) {
|
|
955
|
+
return headers[key];
|
|
956
|
+
}
|
|
957
|
+
if (normalizedHeaderRecords.has(headers)) {
|
|
958
|
+
return undefined;
|
|
959
|
+
}
|
|
960
|
+
const headerName = Object.keys(headers).find((header) => header.toLowerCase() === key);
|
|
961
|
+
return headerName === undefined ? undefined : headers[headerName];
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
919
965
|
/*
|
|
920
966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
921
967
|
* Licensed under the MIT License.
|
|
@@ -985,7 +1031,7 @@
|
|
|
985
1031
|
urlParseError: urlParseError
|
|
986
1032
|
});
|
|
987
1033
|
|
|
988
|
-
/*! @azure/msal-common v16.
|
|
1034
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
989
1035
|
|
|
990
1036
|
/*
|
|
991
1037
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -996,8 +1042,9 @@
|
|
|
996
1042
|
* header challenge values that can be used outside the basic authorization flows.
|
|
997
1043
|
*/
|
|
998
1044
|
class AuthenticationHeaderParser {
|
|
1045
|
+
/** Captures a case-insensitive snapshot of the response headers. */
|
|
999
1046
|
constructor(headers) {
|
|
1000
|
-
this.headers = headers;
|
|
1047
|
+
this.headers = normalizeResponseHeaders(headers);
|
|
1001
1048
|
}
|
|
1002
1049
|
/**
|
|
1003
1050
|
* This method parses the SHR nonce value out of either the Authentication-Info or WWW-Authenticate authentication headers.
|
|
@@ -1005,7 +1052,7 @@
|
|
|
1005
1052
|
*/
|
|
1006
1053
|
getShrNonce() {
|
|
1007
1054
|
// Attempt to parse nonce from Authentiacation-Info
|
|
1008
|
-
const authenticationInfo = this.headers
|
|
1055
|
+
const authenticationInfo = getResponseHeader(this.headers, HeaderNames.AuthenticationInfo);
|
|
1009
1056
|
if (authenticationInfo) {
|
|
1010
1057
|
const authenticationInfoChallenges = this.parseChallenges(authenticationInfo);
|
|
1011
1058
|
if (authenticationInfoChallenges.nextnonce) {
|
|
@@ -1014,7 +1061,7 @@
|
|
|
1014
1061
|
throw createClientConfigurationError(invalidAuthenticationHeader, "");
|
|
1015
1062
|
}
|
|
1016
1063
|
// Attempt to parse nonce from WWW-Authenticate
|
|
1017
|
-
const wwwAuthenticate = this.headers
|
|
1064
|
+
const wwwAuthenticate = getResponseHeader(this.headers, HeaderNames.WWWAuthenticate);
|
|
1018
1065
|
if (wwwAuthenticate) {
|
|
1019
1066
|
const wwwAuthenticateChallenges = this.parseChallenges(wwwAuthenticate);
|
|
1020
1067
|
if (wwwAuthenticateChallenges.nonce) {
|
|
@@ -1043,7 +1090,7 @@
|
|
|
1043
1090
|
}
|
|
1044
1091
|
}
|
|
1045
1092
|
|
|
1046
|
-
/*! @azure/msal-common v16.
|
|
1093
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1047
1094
|
/*
|
|
1048
1095
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1049
1096
|
* Licensed under the MIT License.
|
|
@@ -1055,7 +1102,7 @@
|
|
|
1055
1102
|
response.hasOwnProperty("jwks_uri"));
|
|
1056
1103
|
}
|
|
1057
1104
|
|
|
1058
|
-
/*! @azure/msal-common v16.
|
|
1105
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1059
1106
|
/*
|
|
1060
1107
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1061
1108
|
* Licensed under the MIT License.
|
|
@@ -1135,7 +1182,7 @@
|
|
|
1135
1182
|
}
|
|
1136
1183
|
}
|
|
1137
1184
|
|
|
1138
|
-
/*! @azure/msal-common v16.
|
|
1185
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1139
1186
|
|
|
1140
1187
|
/*
|
|
1141
1188
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1293,7 +1340,7 @@
|
|
|
1293
1340
|
}
|
|
1294
1341
|
}
|
|
1295
1342
|
|
|
1296
|
-
/*! @azure/msal-common v16.
|
|
1343
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1297
1344
|
|
|
1298
1345
|
/*
|
|
1299
1346
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1447,7 +1494,7 @@
|
|
|
1447
1494
|
return null;
|
|
1448
1495
|
}
|
|
1449
1496
|
|
|
1450
|
-
/*! @azure/msal-common v16.
|
|
1497
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1451
1498
|
/*
|
|
1452
1499
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1453
1500
|
* Licensed under the MIT License.
|
|
@@ -1465,7 +1512,7 @@
|
|
|
1465
1512
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1466
1513
|
};
|
|
1467
1514
|
|
|
1468
|
-
/*! @azure/msal-common v16.
|
|
1515
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1469
1516
|
/*
|
|
1470
1517
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1471
1518
|
* Licensed under the MIT License.
|
|
@@ -1475,7 +1522,7 @@
|
|
|
1475
1522
|
response.hasOwnProperty("metadata"));
|
|
1476
1523
|
}
|
|
1477
1524
|
|
|
1478
|
-
/*! @azure/msal-common v16.
|
|
1525
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1479
1526
|
/*
|
|
1480
1527
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1481
1528
|
* Licensed under the MIT License.
|
|
@@ -1485,7 +1532,7 @@
|
|
|
1485
1532
|
response.hasOwnProperty("error_description"));
|
|
1486
1533
|
}
|
|
1487
1534
|
|
|
1488
|
-
/*! @azure/msal-common v16.
|
|
1535
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1489
1536
|
/*
|
|
1490
1537
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1491
1538
|
* Licensed under the MIT License.
|
|
@@ -1556,7 +1603,7 @@
|
|
|
1556
1603
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1557
1604
|
const SetUserData = "setUserData";
|
|
1558
1605
|
|
|
1559
|
-
/*! @azure/msal-common v16.
|
|
1606
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1560
1607
|
/*
|
|
1561
1608
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1562
1609
|
* Licensed under the MIT License.
|
|
@@ -1649,7 +1696,7 @@
|
|
|
1649
1696
|
};
|
|
1650
1697
|
};
|
|
1651
1698
|
|
|
1652
|
-
/*! @azure/msal-common v16.
|
|
1699
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1653
1700
|
|
|
1654
1701
|
/*
|
|
1655
1702
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1760,7 +1807,7 @@
|
|
|
1760
1807
|
},
|
|
1761
1808
|
};
|
|
1762
1809
|
|
|
1763
|
-
/*! @azure/msal-common v16.
|
|
1810
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1764
1811
|
/*
|
|
1765
1812
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1766
1813
|
* Licensed under the MIT License.
|
|
@@ -1825,7 +1872,7 @@
|
|
|
1825
1872
|
return cachedAtSec > nowSeconds();
|
|
1826
1873
|
}
|
|
1827
1874
|
|
|
1828
|
-
/*! @azure/msal-common v16.
|
|
1875
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
1829
1876
|
|
|
1830
1877
|
/*
|
|
1831
1878
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2112,7 +2159,7 @@
|
|
|
2112
2159
|
return [...attributeTokens].sort().join(" ");
|
|
2113
2160
|
}
|
|
2114
2161
|
|
|
2115
|
-
/*! @azure/msal-common v16.
|
|
2162
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
2116
2163
|
|
|
2117
2164
|
/*
|
|
2118
2165
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3080,7 +3127,7 @@
|
|
|
3080
3127
|
};
|
|
3081
3128
|
}
|
|
3082
3129
|
|
|
3083
|
-
/*! @azure/msal-common v16.
|
|
3130
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3084
3131
|
|
|
3085
3132
|
/*
|
|
3086
3133
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3114,7 +3161,7 @@
|
|
|
3114
3161
|
}
|
|
3115
3162
|
}
|
|
3116
3163
|
|
|
3117
|
-
/*! @azure/msal-common v16.
|
|
3164
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3118
3165
|
|
|
3119
3166
|
/*
|
|
3120
3167
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3310,7 +3357,7 @@
|
|
|
3310
3357
|
}
|
|
3311
3358
|
}
|
|
3312
3359
|
|
|
3313
|
-
/*! @azure/msal-common v16.
|
|
3360
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3314
3361
|
|
|
3315
3362
|
/*
|
|
3316
3363
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3591,6 +3638,20 @@
|
|
|
3591
3638
|
parameters.set(INSTANCE_AWARE, "true");
|
|
3592
3639
|
}
|
|
3593
3640
|
}
|
|
3641
|
+
/**
|
|
3642
|
+
* Adds `pocd=1`, telling the STS that the client verified the popup driving
|
|
3643
|
+
* this request cannot be reached by an untrusted window, so the
|
|
3644
|
+
* Cross-Origin-Opener-Policy response header may be omitted.
|
|
3645
|
+
*
|
|
3646
|
+
* Only ever added when the check passed — a negative result is signalled by
|
|
3647
|
+
* omitting the parameter, which keeps the STS default (apply COOP) and stays
|
|
3648
|
+
* compatible with library versions that never send it.
|
|
3649
|
+
*/
|
|
3650
|
+
function addPopupOriginCheckDone(parameters) {
|
|
3651
|
+
if (!parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
|
|
3652
|
+
parameters.set(POPUP_ORIGIN_CHECK_DONE, "1");
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3594
3655
|
/**
|
|
3595
3656
|
* Add extraParameters
|
|
3596
3657
|
* @param extraParams - String dictionary containing extra parameters to be added.
|
|
@@ -3796,7 +3857,7 @@
|
|
|
3796
3857
|
}
|
|
3797
3858
|
}
|
|
3798
3859
|
|
|
3799
|
-
/*! @azure/msal-common v16.
|
|
3860
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3800
3861
|
|
|
3801
3862
|
/*
|
|
3802
3863
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3817,7 +3878,8 @@
|
|
|
3817
3878
|
return responseString;
|
|
3818
3879
|
}
|
|
3819
3880
|
/**
|
|
3820
|
-
* Returns
|
|
3881
|
+
* Returns flat fragment or query parameters as an authorization response.
|
|
3882
|
+
* Application routes and unrecognized responses return null.
|
|
3821
3883
|
*/
|
|
3822
3884
|
function getDeserializedResponse(responseString) {
|
|
3823
3885
|
// Check if given hash is empty
|
|
@@ -3827,7 +3889,15 @@
|
|
|
3827
3889
|
try {
|
|
3828
3890
|
// Strip the # or ? symbol if present
|
|
3829
3891
|
const normalizedResponse = stripLeadingHashOrQuery(responseString);
|
|
3830
|
-
|
|
3892
|
+
/*
|
|
3893
|
+
* Require a flat parameter name, not an application route.
|
|
3894
|
+
* Reject routes like #/dashboard?tab=orders&code=... and
|
|
3895
|
+
* #/dashboard/orders&state=..., where ?, /, or # appears before
|
|
3896
|
+
* the first = or &. These characters are allowed in parameter values.
|
|
3897
|
+
*/
|
|
3898
|
+
if (!/^[^=&?#/]+(?:=|&|$)/.test(normalizedResponse)) {
|
|
3899
|
+
return null;
|
|
3900
|
+
}
|
|
3831
3901
|
const deserializedHash = Object.fromEntries(new URLSearchParams(normalizedResponse));
|
|
3832
3902
|
// Check for known response properties
|
|
3833
3903
|
if (deserializedHash.code ||
|
|
@@ -3918,7 +3988,7 @@
|
|
|
3918
3988
|
}
|
|
3919
3989
|
}
|
|
3920
3990
|
|
|
3921
|
-
/*! @azure/msal-common v16.
|
|
3991
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3922
3992
|
|
|
3923
3993
|
/*
|
|
3924
3994
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3966,7 +4036,7 @@
|
|
|
3966
4036
|
},
|
|
3967
4037
|
};
|
|
3968
4038
|
|
|
3969
|
-
/*! @azure/msal-common v16.
|
|
4039
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3970
4040
|
|
|
3971
4041
|
/*
|
|
3972
4042
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3989,7 +4059,7 @@
|
|
|
3989
4059
|
},
|
|
3990
4060
|
};
|
|
3991
4061
|
|
|
3992
|
-
/*! @azure/msal-common v16.
|
|
4062
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
3993
4063
|
/*
|
|
3994
4064
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3995
4065
|
* Licensed under the MIT License.
|
|
@@ -4278,12 +4348,12 @@
|
|
|
4278
4348
|
}
|
|
4279
4349
|
}
|
|
4280
4350
|
|
|
4281
|
-
/*! @azure/msal-common v16.
|
|
4351
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4282
4352
|
/* eslint-disable header/header */
|
|
4283
4353
|
const name$1 = "@azure/msal-common";
|
|
4284
|
-
const version$1 = "16.
|
|
4354
|
+
const version$1 = "16.15.0";
|
|
4285
4355
|
|
|
4286
|
-
/*! @azure/msal-common v16.
|
|
4356
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4287
4357
|
/*
|
|
4288
4358
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4289
4359
|
* Licensed under the MIT License.
|
|
@@ -4291,7 +4361,7 @@
|
|
|
4291
4361
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4292
4362
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4293
4363
|
|
|
4294
|
-
/*! @azure/msal-common v16.
|
|
4364
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4295
4365
|
|
|
4296
4366
|
/*
|
|
4297
4367
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4329,7 +4399,7 @@
|
|
|
4329
4399
|
}
|
|
4330
4400
|
}
|
|
4331
4401
|
|
|
4332
|
-
/*! @azure/msal-common v16.
|
|
4402
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
4333
4403
|
|
|
4334
4404
|
/*
|
|
4335
4405
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5517,7 +5587,7 @@
|
|
|
5517
5587
|
}
|
|
5518
5588
|
}
|
|
5519
5589
|
|
|
5520
|
-
/*! @azure/msal-common v16.
|
|
5590
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5521
5591
|
/*
|
|
5522
5592
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5523
5593
|
* Licensed under the MIT License.
|
|
@@ -5582,7 +5652,7 @@
|
|
|
5582
5652
|
"fetchRetryCount",
|
|
5583
5653
|
]);
|
|
5584
5654
|
|
|
5585
|
-
/*! @azure/msal-common v16.
|
|
5655
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5586
5656
|
|
|
5587
5657
|
/*
|
|
5588
5658
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5640,7 +5710,7 @@
|
|
|
5640
5710
|
}
|
|
5641
5711
|
}
|
|
5642
5712
|
|
|
5643
|
-
/*! @azure/msal-common v16.
|
|
5713
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5644
5714
|
|
|
5645
5715
|
/*
|
|
5646
5716
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5738,7 +5808,7 @@
|
|
|
5738
5808
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5739
5809
|
}
|
|
5740
5810
|
|
|
5741
|
-
/*! @azure/msal-common v16.
|
|
5811
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5742
5812
|
/*
|
|
5743
5813
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5744
5814
|
* Licensed under the MIT License.
|
|
@@ -5765,7 +5835,7 @@
|
|
|
5765
5835
|
}
|
|
5766
5836
|
}
|
|
5767
5837
|
|
|
5768
|
-
/*! @azure/msal-common v16.
|
|
5838
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5769
5839
|
|
|
5770
5840
|
/*
|
|
5771
5841
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5786,7 +5856,7 @@
|
|
|
5786
5856
|
return new JoseHeaderError(code, correlationId);
|
|
5787
5857
|
}
|
|
5788
5858
|
|
|
5789
|
-
/*! @azure/msal-common v16.
|
|
5859
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5790
5860
|
/*
|
|
5791
5861
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5792
5862
|
* Licensed under the MIT License.
|
|
@@ -5811,7 +5881,7 @@
|
|
|
5811
5881
|
return Object.getPrototypeOf(value) === proto;
|
|
5812
5882
|
}
|
|
5813
5883
|
|
|
5814
|
-
/*! @azure/msal-common v16.
|
|
5884
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5815
5885
|
/*
|
|
5816
5886
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5817
5887
|
* Licensed under the MIT License.
|
|
@@ -5821,7 +5891,7 @@
|
|
|
5821
5891
|
const missingJwkError = "missing_jwk_error";
|
|
5822
5892
|
const invalidJwkError = "invalid_jwk_error";
|
|
5823
5893
|
|
|
5824
|
-
/*! @azure/msal-common v16.
|
|
5894
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5825
5895
|
|
|
5826
5896
|
/*
|
|
5827
5897
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5887,7 +5957,7 @@
|
|
|
5887
5957
|
}
|
|
5888
5958
|
}
|
|
5889
5959
|
|
|
5890
|
-
/*! @azure/msal-common v16.
|
|
5960
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5891
5961
|
|
|
5892
5962
|
/*
|
|
5893
5963
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5988,7 +6058,7 @@
|
|
|
5988
6058
|
}
|
|
5989
6059
|
}
|
|
5990
6060
|
|
|
5991
|
-
/*! @azure/msal-common v16.
|
|
6061
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
5992
6062
|
|
|
5993
6063
|
/*
|
|
5994
6064
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6133,7 +6203,7 @@
|
|
|
6133
6203
|
}
|
|
6134
6204
|
}
|
|
6135
6205
|
|
|
6136
|
-
/*! @azure/msal-common v16.
|
|
6206
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6137
6207
|
/*
|
|
6138
6208
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6139
6209
|
* Licensed under the MIT License.
|
|
@@ -6197,7 +6267,7 @@
|
|
|
6197
6267
|
uiNotAllowed: uiNotAllowed
|
|
6198
6268
|
});
|
|
6199
6269
|
|
|
6200
|
-
/*! @azure/msal-common v16.
|
|
6270
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6201
6271
|
|
|
6202
6272
|
/*
|
|
6203
6273
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6264,7 +6334,7 @@
|
|
|
6264
6334
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6265
6335
|
}
|
|
6266
6336
|
|
|
6267
|
-
/*! @azure/msal-common v16.
|
|
6337
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6268
6338
|
|
|
6269
6339
|
/*
|
|
6270
6340
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6283,7 +6353,7 @@
|
|
|
6283
6353
|
}
|
|
6284
6354
|
}
|
|
6285
6355
|
|
|
6286
|
-
/*! @azure/msal-common v16.
|
|
6356
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6287
6357
|
|
|
6288
6358
|
/*
|
|
6289
6359
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6354,7 +6424,7 @@
|
|
|
6354
6424
|
}
|
|
6355
6425
|
}
|
|
6356
6426
|
|
|
6357
|
-
/*! @azure/msal-common v16.
|
|
6427
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6358
6428
|
|
|
6359
6429
|
/*
|
|
6360
6430
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6782,7 +6852,7 @@
|
|
|
6782
6852
|
return baseAccount;
|
|
6783
6853
|
}
|
|
6784
6854
|
|
|
6785
|
-
/*! @azure/msal-common v16.
|
|
6855
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6786
6856
|
/*
|
|
6787
6857
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6788
6858
|
* Licensed under the MIT License.
|
|
@@ -6792,7 +6862,7 @@
|
|
|
6792
6862
|
UPN: "UPN",
|
|
6793
6863
|
};
|
|
6794
6864
|
|
|
6795
|
-
/*! @azure/msal-common v16.
|
|
6865
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6796
6866
|
/*
|
|
6797
6867
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6798
6868
|
* Licensed under the MIT License.
|
|
@@ -6811,7 +6881,7 @@
|
|
|
6811
6881
|
}
|
|
6812
6882
|
}
|
|
6813
6883
|
|
|
6814
|
-
/*! @azure/msal-common v16.
|
|
6884
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6815
6885
|
|
|
6816
6886
|
/*
|
|
6817
6887
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6835,7 +6905,7 @@
|
|
|
6835
6905
|
};
|
|
6836
6906
|
}
|
|
6837
6907
|
|
|
6838
|
-
/*! @azure/msal-common v16.
|
|
6908
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6839
6909
|
|
|
6840
6910
|
/*
|
|
6841
6911
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6870,13 +6940,14 @@
|
|
|
6870
6940
|
* Performs necessary throttling checks after a network request.
|
|
6871
6941
|
* @param cacheManager
|
|
6872
6942
|
* @param thumbprint
|
|
6873
|
-
* @param response
|
|
6943
|
+
* @param response - Token response with case-insensitive header names.
|
|
6874
6944
|
*/
|
|
6875
6945
|
static postProcess(cacheManager, thumbprint, response, correlationId) {
|
|
6946
|
+
const retryAfter = getRetryAfterHeader(response);
|
|
6876
6947
|
if (ThrottlingUtils.checkResponseStatus(response) ||
|
|
6877
|
-
|
|
6948
|
+
retryAfter !== undefined) {
|
|
6878
6949
|
const thumbprintValue = {
|
|
6879
|
-
throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(
|
|
6950
|
+
throttleTime: ThrottlingUtils.calculateThrottleTime(parseInt(retryAfter || "")),
|
|
6880
6951
|
error: response.body.error,
|
|
6881
6952
|
errorCodes: response.body.error_codes,
|
|
6882
6953
|
errorMessage: response.body.error_description,
|
|
@@ -6895,14 +6966,10 @@
|
|
|
6895
6966
|
}
|
|
6896
6967
|
/**
|
|
6897
6968
|
* Checks a NetworkResponse object's RetryAfter header
|
|
6898
|
-
* @param response
|
|
6969
|
+
* @param response - Token response with case-insensitive header names.
|
|
6899
6970
|
*/
|
|
6900
6971
|
static checkResponseForRetryAfter(response) {
|
|
6901
|
-
|
|
6902
|
-
return (response.headers.hasOwnProperty(HeaderNames.RETRY_AFTER) &&
|
|
6903
|
-
(response.status < 200 || response.status >= 300));
|
|
6904
|
-
}
|
|
6905
|
-
return false;
|
|
6972
|
+
return getRetryAfterHeader(response) !== undefined;
|
|
6906
6973
|
}
|
|
6907
6974
|
/**
|
|
6908
6975
|
* Calculates the Unix-time value for a throttle to expire given throttleTime in seconds.
|
|
@@ -6919,9 +6986,16 @@
|
|
|
6919
6986
|
const key = this.generateThrottlingStorageKey(thumbprint);
|
|
6920
6987
|
cacheManager.removeItem(key, request.correlationId);
|
|
6921
6988
|
}
|
|
6989
|
+
}
|
|
6990
|
+
/** Reads Retry-After only for non-success responses. */
|
|
6991
|
+
function getRetryAfterHeader(response) {
|
|
6992
|
+
if ((response.status < 200 || response.status >= 300) && response.headers) {
|
|
6993
|
+
return getResponseHeader(response.headers, HeaderNames.RETRY_AFTER);
|
|
6994
|
+
}
|
|
6995
|
+
return undefined;
|
|
6922
6996
|
}
|
|
6923
6997
|
|
|
6924
|
-
/*! @azure/msal-common v16.
|
|
6998
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6925
6999
|
|
|
6926
7000
|
/*
|
|
6927
7001
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6952,7 +7026,7 @@
|
|
|
6952
7026
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6953
7027
|
}
|
|
6954
7028
|
|
|
6955
|
-
/*! @azure/msal-common v16.
|
|
7029
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
6956
7030
|
|
|
6957
7031
|
/*
|
|
6958
7032
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7050,7 +7124,8 @@
|
|
|
7050
7124
|
let response;
|
|
7051
7125
|
try {
|
|
7052
7126
|
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
|
|
7053
|
-
const responseHeaders = response.headers || {};
|
|
7127
|
+
const responseHeaders = normalizeResponseHeaders(response.headers || {});
|
|
7128
|
+
response = { ...response, headers: responseHeaders };
|
|
7054
7129
|
performanceClient?.addFields({
|
|
7055
7130
|
refreshTokenSize: response.body.refresh_token?.length || 0,
|
|
7056
7131
|
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] || "",
|
|
@@ -7059,16 +7134,16 @@
|
|
|
7059
7134
|
}
|
|
7060
7135
|
catch (e) {
|
|
7061
7136
|
if (e instanceof NetworkError) {
|
|
7062
|
-
const responseHeaders = e.responseHeaders
|
|
7137
|
+
const responseHeaders = e.responseHeaders
|
|
7138
|
+
? normalizeResponseHeaders(e.responseHeaders)
|
|
7139
|
+
: undefined;
|
|
7063
7140
|
if (responseHeaders) {
|
|
7064
7141
|
performanceClient?.addFields({
|
|
7065
7142
|
httpVerToken: responseHeaders[HeaderNames.X_MS_HTTP_VERSION] ||
|
|
7066
7143
|
"",
|
|
7067
7144
|
requestId: responseHeaders[HeaderNames.X_MS_REQUEST_ID] || "",
|
|
7068
|
-
contentTypeHeader: responseHeaders
|
|
7069
|
-
|
|
7070
|
-
contentLengthHeader: responseHeaders[HeaderNames.CONTENT_LENGTH] ||
|
|
7071
|
-
undefined,
|
|
7145
|
+
contentTypeHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_TYPE) || undefined,
|
|
7146
|
+
contentLengthHeader: getResponseHeader(responseHeaders, HeaderNames.CONTENT_LENGTH) || undefined,
|
|
7072
7147
|
httpStatus: e.httpStatus,
|
|
7073
7148
|
}, correlationId);
|
|
7074
7149
|
}
|
|
@@ -7085,7 +7160,7 @@
|
|
|
7085
7160
|
return response;
|
|
7086
7161
|
}
|
|
7087
7162
|
|
|
7088
|
-
/*! @azure/msal-common v16.
|
|
7163
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7089
7164
|
|
|
7090
7165
|
/*
|
|
7091
7166
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7329,6 +7404,9 @@
|
|
|
7329
7404
|
if (request.logoutHint) {
|
|
7330
7405
|
addLogoutHint(parameters, request.logoutHint);
|
|
7331
7406
|
}
|
|
7407
|
+
if (request.popupOriginCheckDone) {
|
|
7408
|
+
addPopupOriginCheckDone(parameters);
|
|
7409
|
+
}
|
|
7332
7410
|
if (request.extraQueryParameters) {
|
|
7333
7411
|
addExtraParameters(parameters, request.extraQueryParameters);
|
|
7334
7412
|
}
|
|
@@ -7349,7 +7427,7 @@
|
|
|
7349
7427
|
}
|
|
7350
7428
|
}
|
|
7351
7429
|
|
|
7352
|
-
/*! @azure/msal-common v16.
|
|
7430
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7353
7431
|
|
|
7354
7432
|
/*
|
|
7355
7433
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7484,6 +7562,9 @@
|
|
|
7484
7562
|
!Object.keys(request.extraQueryParameters).includes(INSTANCE_AWARE))) {
|
|
7485
7563
|
addInstanceAware(parameters);
|
|
7486
7564
|
}
|
|
7565
|
+
if (request.popupOriginCheckDone) {
|
|
7566
|
+
addPopupOriginCheckDone(parameters);
|
|
7567
|
+
}
|
|
7487
7568
|
return parameters;
|
|
7488
7569
|
}
|
|
7489
7570
|
/**
|
|
@@ -7576,7 +7657,7 @@
|
|
|
7576
7657
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7577
7658
|
}
|
|
7578
7659
|
|
|
7579
|
-
/*! @azure/msal-common v16.
|
|
7660
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
7580
7661
|
|
|
7581
7662
|
/*
|
|
7582
7663
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8125,7 +8206,7 @@
|
|
|
8125
8206
|
}
|
|
8126
8207
|
}
|
|
8127
8208
|
|
|
8128
|
-
/*! @azure/msal-common v16.
|
|
8209
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8129
8210
|
|
|
8130
8211
|
/*
|
|
8131
8212
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8360,7 +8441,7 @@
|
|
|
8360
8441
|
}
|
|
8361
8442
|
}
|
|
8362
8443
|
|
|
8363
|
-
/*! @azure/msal-common v16.
|
|
8444
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8364
8445
|
|
|
8365
8446
|
/*
|
|
8366
8447
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8653,7 +8734,7 @@
|
|
|
8653
8734
|
clearNativeBrokerErrorCode() { }
|
|
8654
8735
|
}
|
|
8655
8736
|
|
|
8656
|
-
/*! @azure/msal-common v16.
|
|
8737
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8657
8738
|
|
|
8658
8739
|
/*
|
|
8659
8740
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8780,7 +8861,7 @@
|
|
|
8780
8861
|
}
|
|
8781
8862
|
}
|
|
8782
8863
|
|
|
8783
|
-
/*! @azure/msal-common v16.
|
|
8864
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8784
8865
|
|
|
8785
8866
|
/*
|
|
8786
8867
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8796,7 +8877,7 @@
|
|
|
8796
8877
|
},
|
|
8797
8878
|
};
|
|
8798
8879
|
|
|
8799
|
-
/*! @azure/msal-common v16.
|
|
8880
|
+
/*! @azure/msal-common v16.15.0 2026-10-27 */
|
|
8800
8881
|
|
|
8801
8882
|
/*
|
|
8802
8883
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9874,9 +9955,14 @@
|
|
|
9874
9955
|
};
|
|
9875
9956
|
}
|
|
9876
9957
|
/**
|
|
9877
|
-
* Clears
|
|
9958
|
+
* Clears a recognized authentication response fragment, preserving the query string.
|
|
9959
|
+
* Assigns an empty hash, then removes the trailing # when history updates are available.
|
|
9878
9960
|
*/
|
|
9879
9961
|
function clearHash(contentWindow) {
|
|
9962
|
+
const serverParams = getDeserializedResponse(contentWindow.location.hash);
|
|
9963
|
+
if (!serverParams) {
|
|
9964
|
+
return;
|
|
9965
|
+
}
|
|
9880
9966
|
// Office.js sets history.replaceState to null
|
|
9881
9967
|
contentWindow.location.hash = "";
|
|
9882
9968
|
if (typeof contentWindow.history.replaceState === "function") {
|
|
@@ -11499,7 +11585,7 @@
|
|
|
11499
11585
|
|
|
11500
11586
|
/* eslint-disable header/header */
|
|
11501
11587
|
const name = "@azure/msal-browser";
|
|
11502
|
-
const version = "5.
|
|
11588
|
+
const version = "5.27.0";
|
|
11503
11589
|
|
|
11504
11590
|
/*
|
|
11505
11591
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -13007,6 +13093,116 @@
|
|
|
13007
13093
|
return browserStorage.getActiveAccount(correlationId);
|
|
13008
13094
|
}
|
|
13009
13095
|
|
|
13096
|
+
/*
|
|
13097
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13098
|
+
* Licensed under the MIT License.
|
|
13099
|
+
*/
|
|
13100
|
+
const POPUP_POLL_INTERVAL_MS = 30;
|
|
13101
|
+
let activePopupPoller;
|
|
13102
|
+
/**
|
|
13103
|
+
* Cancels legacy popup polling when an interaction is superseded.
|
|
13104
|
+
*
|
|
13105
|
+
* @internal
|
|
13106
|
+
* @param logger Logger for the interaction.
|
|
13107
|
+
*/
|
|
13108
|
+
function cancelPendingPopupPollingResponse(logger) {
|
|
13109
|
+
if (activePopupPoller) {
|
|
13110
|
+
logger.verbose("0g9n3p", activePopupPoller.correlationId);
|
|
13111
|
+
activePopupPoller.cancel();
|
|
13112
|
+
}
|
|
13113
|
+
}
|
|
13114
|
+
/**
|
|
13115
|
+
* Monitors a popup window for a URL change to the same origin as the parent application.
|
|
13116
|
+
* Polls the popup at a specified interval until it is redirected back to the application,
|
|
13117
|
+
* closed by the user, or a navigation to a same-origin URL is detected. Once a same-origin
|
|
13118
|
+
* URL is detected, extracts the response string (query or hash) and resolves the promise.
|
|
13119
|
+
*
|
|
13120
|
+
* @param popupWindow - The popup window to monitor for navigation.
|
|
13121
|
+
* @param popupWindowParent - The parent window that opened the popup.
|
|
13122
|
+
* @param responseMode - Response mode (`"query"` | `"fragment"`) determines whether
|
|
13123
|
+
* to read `location.search` or `location.hash` from the popup once on the same
|
|
13124
|
+
* origin. Any value other than `"query"` is treated as fragment.
|
|
13125
|
+
* @param logger - Logger instance.
|
|
13126
|
+
* @param unloadWindow - Event handler to remove from the parent window on cleanup.
|
|
13127
|
+
* @param correlationId
|
|
13128
|
+
*/
|
|
13129
|
+
async function monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadWindow, correlationId) {
|
|
13130
|
+
let poller;
|
|
13131
|
+
return new Promise((resolve, reject) => {
|
|
13132
|
+
logger.verbose("0cp91u", correlationId);
|
|
13133
|
+
const intervalId = window.setInterval(() => {
|
|
13134
|
+
if (popupWindow.closed) {
|
|
13135
|
+
logger.error("0n69wb", correlationId);
|
|
13136
|
+
window.clearInterval(intervalId);
|
|
13137
|
+
reject(new BrowserAuthError(userCancelled, correlationId));
|
|
13138
|
+
return;
|
|
13139
|
+
}
|
|
13140
|
+
let href = "";
|
|
13141
|
+
try {
|
|
13142
|
+
/*
|
|
13143
|
+
* Will throw if cross origin,
|
|
13144
|
+
* which should be caught and ignored
|
|
13145
|
+
* since we need the interval to keep running while on STS UI.
|
|
13146
|
+
*/
|
|
13147
|
+
href = popupWindow.location.href;
|
|
13148
|
+
}
|
|
13149
|
+
catch (e) { }
|
|
13150
|
+
// Don't process blank pages or cross domain
|
|
13151
|
+
if (!href || href === "about:blank") {
|
|
13152
|
+
return;
|
|
13153
|
+
}
|
|
13154
|
+
window.clearInterval(intervalId);
|
|
13155
|
+
let responseString;
|
|
13156
|
+
if (responseMode === ResponseMode$1.QUERY) {
|
|
13157
|
+
responseString = popupWindow.location.search;
|
|
13158
|
+
}
|
|
13159
|
+
else {
|
|
13160
|
+
responseString = popupWindow.location.hash;
|
|
13161
|
+
}
|
|
13162
|
+
logger.verbose("0po9er", correlationId);
|
|
13163
|
+
resolve(responseString);
|
|
13164
|
+
}, POPUP_POLL_INTERVAL_MS);
|
|
13165
|
+
poller = {
|
|
13166
|
+
correlationId,
|
|
13167
|
+
cancel: () => {
|
|
13168
|
+
window.clearInterval(intervalId);
|
|
13169
|
+
if (activePopupPoller === poller) {
|
|
13170
|
+
activePopupPoller = undefined;
|
|
13171
|
+
}
|
|
13172
|
+
reject(new BrowserAuthError(interactionInProgressCancelled, correlationId));
|
|
13173
|
+
},
|
|
13174
|
+
};
|
|
13175
|
+
activePopupPoller = poller;
|
|
13176
|
+
}).finally(() => {
|
|
13177
|
+
if (poller && activePopupPoller === poller) {
|
|
13178
|
+
activePopupPoller = undefined;
|
|
13179
|
+
}
|
|
13180
|
+
cleanPopup(popupWindow, popupWindowParent, unloadWindow);
|
|
13181
|
+
});
|
|
13182
|
+
}
|
|
13183
|
+
/**
|
|
13184
|
+
* Performs cleanup operations after popup authentication.
|
|
13185
|
+
* Strips auth-response params (code/state) from the popup URL while it is still
|
|
13186
|
+
* open, closes the popup window, and removes the 'beforeunload' event listener
|
|
13187
|
+
* from the parent window.
|
|
13188
|
+
*
|
|
13189
|
+
* @param popupWindow - The popup window to be closed.
|
|
13190
|
+
* @param popupWindowParent - The parent window from which the event listener will be removed.
|
|
13191
|
+
* @param unloadWindow - The event handler function to remove.
|
|
13192
|
+
*/
|
|
13193
|
+
function cleanPopup(popupWindow, popupWindowParent, unloadWindow) {
|
|
13194
|
+
if (!popupWindow.closed) {
|
|
13195
|
+
try {
|
|
13196
|
+
clearAuthResponseFromUrl(popupWindow);
|
|
13197
|
+
}
|
|
13198
|
+
catch {
|
|
13199
|
+
// Popup may have become cross-origin or otherwise inaccessible; ignore.
|
|
13200
|
+
}
|
|
13201
|
+
}
|
|
13202
|
+
popupWindow.close();
|
|
13203
|
+
popupWindowParent.removeEventListener("beforeunload", unloadWindow);
|
|
13204
|
+
}
|
|
13205
|
+
|
|
13010
13206
|
/*
|
|
13011
13207
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13012
13208
|
* Licensed under the MIT License.
|
|
@@ -13386,6 +13582,90 @@
|
|
|
13386
13582
|
return httpMethod;
|
|
13387
13583
|
}
|
|
13388
13584
|
|
|
13585
|
+
/*
|
|
13586
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13587
|
+
* Licensed under the MIT License.
|
|
13588
|
+
*/
|
|
13589
|
+
/**
|
|
13590
|
+
* `window.origin` of a document with an opaque origin, e.g. one sandboxed
|
|
13591
|
+
* without `allow-same-origin`. Read from `window.origin`, not
|
|
13592
|
+
* `location.origin`, which reports the real host even when sandboxed.
|
|
13593
|
+
*/
|
|
13594
|
+
const OPAQUE_ORIGIN = "null";
|
|
13595
|
+
/**
|
|
13596
|
+
* Returns `true` when every ancestor browsing context is same-origin with
|
|
13597
|
+
* `win`. A top-level document has no ancestors, so it always passes.
|
|
13598
|
+
*/
|
|
13599
|
+
function allAncestorsSameOrigin(win) {
|
|
13600
|
+
try {
|
|
13601
|
+
// Sandboxed: no origin to compare ancestors against.
|
|
13602
|
+
if (win.origin === OPAQUE_ORIGIN) {
|
|
13603
|
+
return false;
|
|
13604
|
+
}
|
|
13605
|
+
let current = win;
|
|
13606
|
+
// `window.parent` is self-referential at the top level, never falsy.
|
|
13607
|
+
while (current !== current.parent) {
|
|
13608
|
+
current = current.parent;
|
|
13609
|
+
// Throws SecurityError if this ancestor is cross-origin.
|
|
13610
|
+
void current.location.href;
|
|
13611
|
+
}
|
|
13612
|
+
return true;
|
|
13613
|
+
}
|
|
13614
|
+
catch {
|
|
13615
|
+
return false;
|
|
13616
|
+
}
|
|
13617
|
+
}
|
|
13618
|
+
/**
|
|
13619
|
+
* Returns `true` when the top-level window has no opener, or one that is
|
|
13620
|
+
* same-origin with it.
|
|
13621
|
+
*
|
|
13622
|
+
* Reads the opener from `win.top`, not `win`: a framed document always reports
|
|
13623
|
+
* `window.opener === null` and would pass while the top window's untrusted
|
|
13624
|
+
* opener still holds a handle on it.
|
|
13625
|
+
*/
|
|
13626
|
+
function topOpenerIsSameOriginOrAbsent(win) {
|
|
13627
|
+
try {
|
|
13628
|
+
const top = win.top;
|
|
13629
|
+
if (!top) {
|
|
13630
|
+
// Detached from its browsing context; treat as unsafe.
|
|
13631
|
+
return false;
|
|
13632
|
+
}
|
|
13633
|
+
const opener = top.opener;
|
|
13634
|
+
if (!opener || opener === top) {
|
|
13635
|
+
return true;
|
|
13636
|
+
}
|
|
13637
|
+
// Throws SecurityError if the opener is cross-origin.
|
|
13638
|
+
void opener.location.href;
|
|
13639
|
+
return true;
|
|
13640
|
+
}
|
|
13641
|
+
catch {
|
|
13642
|
+
return false;
|
|
13643
|
+
}
|
|
13644
|
+
}
|
|
13645
|
+
/**
|
|
13646
|
+
* Computes the `pocd` ("popup origin check done") authorize parameter value.
|
|
13647
|
+
*
|
|
13648
|
+
* `1` means no untrusted window can reach the popup, which is what lets Entra
|
|
13649
|
+
* omit the `Cross-Origin-Opener-Policy` response header for the request.
|
|
13650
|
+
*
|
|
13651
|
+
* @param config Resolved browser configuration.
|
|
13652
|
+
* @param win Window whose hosting environment is being checked. Defaults to the app window.
|
|
13653
|
+
* @returns `1` when the check passes, otherwise `0`.
|
|
13654
|
+
*/
|
|
13655
|
+
function computePocd(config, win = typeof window !== "undefined" ? window : undefined) {
|
|
13656
|
+
/*
|
|
13657
|
+
* Only an explicit false opts out; anything else computes the check, so an
|
|
13658
|
+
* unresolved config fails closed rather than asserting pocd=1.
|
|
13659
|
+
*/
|
|
13660
|
+
if (config.auth.originCheck === false) {
|
|
13661
|
+
return 1;
|
|
13662
|
+
}
|
|
13663
|
+
if (!win || !allAncestorsSameOrigin(win)) {
|
|
13664
|
+
return 0;
|
|
13665
|
+
}
|
|
13666
|
+
return topOpenerIsSameOriginOrAbsent(win) ? 1 : 0;
|
|
13667
|
+
}
|
|
13668
|
+
|
|
13389
13669
|
/*
|
|
13390
13670
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13391
13671
|
* Licensed under the MIT License.
|
|
@@ -13403,6 +13683,11 @@
|
|
|
13403
13683
|
const validLogoutRequest = {
|
|
13404
13684
|
correlationId: this.correlationId,
|
|
13405
13685
|
...logoutRequest,
|
|
13686
|
+
/*
|
|
13687
|
+
* Computed here rather than per flow so every end-session request
|
|
13688
|
+
* carries it, matching the authorize path.
|
|
13689
|
+
*/
|
|
13690
|
+
popupOriginCheckDone: computePocd(this.config) === 1,
|
|
13406
13691
|
};
|
|
13407
13692
|
/**
|
|
13408
13693
|
* Set logout_hint to be login_hint from ID Token Claims if present
|
|
@@ -13591,6 +13876,53 @@
|
|
|
13591
13876
|
return validatedRequest;
|
|
13592
13877
|
}
|
|
13593
13878
|
|
|
13879
|
+
/*
|
|
13880
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13881
|
+
* Licensed under the MIT License.
|
|
13882
|
+
*/
|
|
13883
|
+
/**
|
|
13884
|
+
* Returns true when the supplied user agent is using Safari
|
|
13885
|
+
*
|
|
13886
|
+
* @internal
|
|
13887
|
+
*/
|
|
13888
|
+
function isSafari(userAgent = typeof navigator !== "undefined"
|
|
13889
|
+
? navigator.userAgent
|
|
13890
|
+
: "") {
|
|
13891
|
+
if (/OPR\/|OPiOS|PhantomJS|SamsungBrowser|Edge|EdgiOS|EdgA/.test(userAgent)) {
|
|
13892
|
+
return false;
|
|
13893
|
+
}
|
|
13894
|
+
const browserNavigator = typeof navigator !== "undefined"
|
|
13895
|
+
? navigator
|
|
13896
|
+
: undefined;
|
|
13897
|
+
if (/Edg/.test(userAgent) ||
|
|
13898
|
+
browserNavigator?.userAgentData?.brands?.some((brand) => brand?.brand === "Microsoft Edge")) {
|
|
13899
|
+
return false;
|
|
13900
|
+
}
|
|
13901
|
+
if (/Electron|CriOS|Chrome|Trident|FxiOS|Firefox/.test(userAgent)) {
|
|
13902
|
+
return false;
|
|
13903
|
+
}
|
|
13904
|
+
return /Safari/.test(userAgent) || /AppleWebKit/.test(userAgent);
|
|
13905
|
+
}
|
|
13906
|
+
/**
|
|
13907
|
+
* Returns true when EAR should be used for the current request.
|
|
13908
|
+
*
|
|
13909
|
+
* Safari cannot complete EAR's cross-origin form POST, so requests configured
|
|
13910
|
+
* for EAR transparently use authorization code flow instead.
|
|
13911
|
+
*
|
|
13912
|
+
* @internal
|
|
13913
|
+
*/
|
|
13914
|
+
function shouldUseEar(protocolMode, logger, performanceClient, correlationId, userAgent) {
|
|
13915
|
+
if (protocolMode !== ProtocolMode.EAR) {
|
|
13916
|
+
return false;
|
|
13917
|
+
}
|
|
13918
|
+
if (!isSafari(userAgent)) {
|
|
13919
|
+
return true;
|
|
13920
|
+
}
|
|
13921
|
+
logger.verbose("0wirye", correlationId);
|
|
13922
|
+
performanceClient.addFields({ "ext.earFallbackReason": "safari" }, correlationId);
|
|
13923
|
+
return false;
|
|
13924
|
+
}
|
|
13925
|
+
|
|
13594
13926
|
/*
|
|
13595
13927
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13596
13928
|
* Licensed under the MIT License.
|
|
@@ -14833,7 +15165,16 @@
|
|
|
14833
15165
|
* @returns
|
|
14834
15166
|
*/
|
|
14835
15167
|
async function getStandardParameters(config, authority, request, logger, performanceClient) {
|
|
14836
|
-
const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority },
|
|
15168
|
+
const parameters = getStandardAuthorizeRequestParameters({ ...config.auth, authority: authority }, {
|
|
15169
|
+
...request,
|
|
15170
|
+
/*
|
|
15171
|
+
* Computed here rather than per flow so every authorize request
|
|
15172
|
+
* carries it — GET, POST and EAR, interactive and silent alike.
|
|
15173
|
+
* A request may assert it instead when the topology, rather than
|
|
15174
|
+
* the current window, is what makes the popup unreachable.
|
|
15175
|
+
*/
|
|
15176
|
+
popupOriginCheckDone: request.popupOriginCheckDone ?? computePocd(config) === 1,
|
|
15177
|
+
}, logger, performanceClient);
|
|
14837
15178
|
addLibraryInfo(parameters, {
|
|
14838
15179
|
sku: BrowserConstants.MSAL_SKU,
|
|
14839
15180
|
version: version,
|
|
@@ -14887,6 +15228,15 @@
|
|
|
14887
15228
|
});
|
|
14888
15229
|
return getAuthorizeUrl(authority, parameters);
|
|
14889
15230
|
}
|
|
15231
|
+
function getAuthorizeFormAction(authority, request, parameters) {
|
|
15232
|
+
const queryParams = new Map();
|
|
15233
|
+
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
15234
|
+
if (parameters.has(POPUP_ORIGIN_CHECK_DONE)) {
|
|
15235
|
+
queryParams.delete(POPUP_ORIGIN_CHECK_DONE);
|
|
15236
|
+
}
|
|
15237
|
+
addCorrelationId(queryParams, request.correlationId);
|
|
15238
|
+
return getAuthorizeUrl(authority, queryParams);
|
|
15239
|
+
}
|
|
14890
15240
|
/**
|
|
14891
15241
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
14892
15242
|
*/
|
|
@@ -14902,11 +15252,7 @@
|
|
|
14902
15252
|
addExtraParameters(parameters, {
|
|
14903
15253
|
...request.extraParameters,
|
|
14904
15254
|
});
|
|
14905
|
-
const
|
|
14906
|
-
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
14907
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
14908
|
-
addCorrelationId(queryParams, request.correlationId);
|
|
14909
|
-
const action = getAuthorizeUrl(authority, queryParams);
|
|
15255
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
14910
15256
|
return { action, fields: Object.fromEntries(parameters) };
|
|
14911
15257
|
}
|
|
14912
15258
|
/**
|
|
@@ -14927,12 +15273,7 @@
|
|
|
14927
15273
|
addExtraParameters(parameters, {
|
|
14928
15274
|
...request.extraParameters,
|
|
14929
15275
|
});
|
|
14930
|
-
|
|
14931
|
-
const queryParams = new Map();
|
|
14932
|
-
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
14933
|
-
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
14934
|
-
addCorrelationId(queryParams, request.correlationId);
|
|
14935
|
-
const action = getAuthorizeUrl(authority, queryParams);
|
|
15276
|
+
const action = getAuthorizeFormAction(authority, request, parameters);
|
|
14936
15277
|
return { action, fields: Object.fromEntries(parameters) };
|
|
14937
15278
|
}
|
|
14938
15279
|
/**
|
|
@@ -15319,7 +15660,7 @@
|
|
|
15319
15660
|
*/
|
|
15320
15661
|
// Default timeout for popup windows and iframes in milliseconds
|
|
15321
15662
|
const DEFAULT_POPUP_TIMEOUT_MS = 60000;
|
|
15322
|
-
const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
|
|
15663
|
+
const DEFAULT_IFRAME_TIMEOUT_MS$1 = 10000;
|
|
15323
15664
|
const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
|
|
15324
15665
|
const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
|
|
15325
15666
|
/**
|
|
@@ -15360,6 +15701,8 @@
|
|
|
15360
15701
|
instanceAware: false,
|
|
15361
15702
|
isMcp: false,
|
|
15362
15703
|
verifySSO: false,
|
|
15704
|
+
// Legacy polling needs COOP omitted, so it implies asserting pocd=1.
|
|
15705
|
+
originCheck: !userInputSystem?.enableLegacyPolling,
|
|
15363
15706
|
};
|
|
15364
15707
|
// Default cache options for browser
|
|
15365
15708
|
const DEFAULT_CACHE_OPTIONS = {
|
|
@@ -15384,7 +15727,7 @@
|
|
|
15384
15727
|
: StubbedNetworkModule,
|
|
15385
15728
|
navigationClient: new NavigationClient(),
|
|
15386
15729
|
popupBridgeTimeout: userInputSystem?.popupBridgeTimeout || DEFAULT_POPUP_TIMEOUT_MS,
|
|
15387
|
-
iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS,
|
|
15730
|
+
iframeBridgeTimeout: userInputSystem?.iframeBridgeTimeout || DEFAULT_IFRAME_TIMEOUT_MS$1,
|
|
15388
15731
|
redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,
|
|
15389
15732
|
allowRedirectInIframe: false,
|
|
15390
15733
|
navigatePopups: true,
|
|
@@ -15393,6 +15736,7 @@
|
|
|
15393
15736
|
DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
|
|
15394
15737
|
protocolMode: ProtocolMode.AAD,
|
|
15395
15738
|
serverTelemetryEnabled: false,
|
|
15739
|
+
enableLegacyPolling: false,
|
|
15396
15740
|
};
|
|
15397
15741
|
const providedSystemOptions = {
|
|
15398
15742
|
...DEFAULT_BROWSER_SYSTEM_OPTIONS,
|
|
@@ -15410,11 +15754,17 @@
|
|
|
15410
15754
|
iframeTimeoutTelemetry: false,
|
|
15411
15755
|
allowPlatformBrokerWithDOM: false,
|
|
15412
15756
|
};
|
|
15757
|
+
let logger;
|
|
15758
|
+
const getLogger = () => {
|
|
15759
|
+
if (!logger) {
|
|
15760
|
+
logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
15761
|
+
}
|
|
15762
|
+
return logger;
|
|
15763
|
+
};
|
|
15413
15764
|
// Throw an error if user has set OIDCOptions without being in OIDC protocol mode
|
|
15414
15765
|
if (userInputSystem?.protocolMode !== ProtocolMode.OIDC &&
|
|
15415
15766
|
userInputAuth?.OIDCOptions) {
|
|
15416
|
-
|
|
15417
|
-
logger.warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
|
|
15767
|
+
getLogger().warning(JSON.stringify(createClientConfigurationError(cannotSetOIDCOptions, "")), "");
|
|
15418
15768
|
}
|
|
15419
15769
|
// Throw an error if user has set allowPlatformBroker to true with OIDC protocol mode
|
|
15420
15770
|
if (userInputSystem?.protocolMode &&
|
|
@@ -15422,6 +15772,24 @@
|
|
|
15422
15772
|
providedSystemOptions?.allowPlatformBroker) {
|
|
15423
15773
|
throw createClientConfigurationError(cannotAllowPlatformBroker, "");
|
|
15424
15774
|
}
|
|
15775
|
+
/*
|
|
15776
|
+
* The origin check computes 0 in the embedded contexts legacy polling
|
|
15777
|
+
* serves, so re-enabling it there breaks the flow. Honor it, but warn.
|
|
15778
|
+
*/
|
|
15779
|
+
if (userInputSystem?.enableLegacyPolling &&
|
|
15780
|
+
userInputAuth?.originCheck === true) {
|
|
15781
|
+
getLogger().warning("buildConfiguration: system.enableLegacyPolling is true and auth.originCheck is explicitly true. Legacy polling requires pocd=1, which the origin check will not produce in an embedded context. Unset auth.originCheck to let legacy polling assert it.", "");
|
|
15782
|
+
}
|
|
15783
|
+
/*
|
|
15784
|
+
* Opting out is a deliberate risk transfer, not an error — but the app
|
|
15785
|
+
* cannot know at config time that the risky topology is actually present.
|
|
15786
|
+
*/
|
|
15787
|
+
if ((userInputAuth?.originCheck ?? DEFAULT_AUTH_OPTIONS.originCheck) ===
|
|
15788
|
+
false &&
|
|
15789
|
+
typeof window !== "undefined" &&
|
|
15790
|
+
!topOpenerIsSameOriginOrAbsent(window)) {
|
|
15791
|
+
getLogger().warning("buildConfiguration: auth.originCheck is disabled and the top-level window has a cross-origin opener. MSAL will assert pocd=1, so the STS omits Cross-Origin-Opener-Policy and that opener can reach the auth popup. The application is responsible for this risk.", "");
|
|
15792
|
+
}
|
|
15425
15793
|
const overlayedConfig = {
|
|
15426
15794
|
auth: {
|
|
15427
15795
|
...DEFAULT_AUTH_OPTIONS,
|
|
@@ -16247,6 +16615,9 @@
|
|
|
16247
16615
|
popupWindowAttributes: logoutRequest?.popupWindowAttributes || {},
|
|
16248
16616
|
popupWindowParent: logoutRequest?.popupWindowParent ?? window,
|
|
16249
16617
|
};
|
|
16618
|
+
validLogoutRequest.popupOriginCheckDone =
|
|
16619
|
+
this.getPopupOriginCheckDone(popupParams.popupWindowParent) ??
|
|
16620
|
+
validLogoutRequest.popupOriginCheckDone;
|
|
16250
16621
|
const authority = logoutRequest && logoutRequest.authority;
|
|
16251
16622
|
const mainWindowRedirectUri = logoutRequest && logoutRequest.mainWindowRedirectUri;
|
|
16252
16623
|
// navigatePopups flag set to false. Acquires token without first opening popup. Popup will be opened later asynchronously.
|
|
@@ -16287,7 +16658,7 @@
|
|
|
16287
16658
|
}
|
|
16288
16659
|
const isPlatformBroker = isPlatformAuthAllowed(this.config, this.logger, this.correlationId, this.platformAuthProvider, request.authenticationScheme);
|
|
16289
16660
|
validRequest.platformBroker = isPlatformBroker;
|
|
16290
|
-
if (this.config.system.protocolMode
|
|
16661
|
+
if (shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)) {
|
|
16291
16662
|
return this.executeEarFlow(validRequest, popupParams, pkceCodes);
|
|
16292
16663
|
}
|
|
16293
16664
|
else {
|
|
@@ -16311,6 +16682,7 @@
|
|
|
16311
16682
|
...request,
|
|
16312
16683
|
codeChallenge: pkce.challenge,
|
|
16313
16684
|
...tokenBindingParams,
|
|
16685
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
16314
16686
|
};
|
|
16315
16687
|
try {
|
|
16316
16688
|
// Initialize the client
|
|
@@ -16374,6 +16746,7 @@
|
|
|
16374
16746
|
earJwk: earJwk,
|
|
16375
16747
|
codeChallenge: pkce.challenge,
|
|
16376
16748
|
...tokenBindingParams,
|
|
16749
|
+
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
16377
16750
|
};
|
|
16378
16751
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
16379
16752
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
@@ -16646,6 +17019,27 @@
|
|
|
16646
17019
|
getRelayStateId(state, correlationId) {
|
|
16647
17020
|
return parseRequestState(base64Decode, state, correlationId).libraryState.id;
|
|
16648
17021
|
}
|
|
17022
|
+
/**
|
|
17023
|
+
* Asserts `pocd=1` for the relay flow. Direct popups also require the
|
|
17024
|
+
* environment of a delegated opening window to pass the origin check.
|
|
17025
|
+
*
|
|
17026
|
+
* With a relay the IdP window is a grandchild popup, which an untrusted
|
|
17027
|
+
* ancestor cannot reach by name — so the topology satisfies the check by
|
|
17028
|
+
* construction. The current window is framed and would otherwise compute
|
|
17029
|
+
* `0`. Without a delegated parent, the standard app check remains unchanged.
|
|
17030
|
+
*
|
|
17031
|
+
* @param popupWindowParent Window that opens the popup.
|
|
17032
|
+
*/
|
|
17033
|
+
getPopupOriginCheckDone(popupWindowParent) {
|
|
17034
|
+
if (this.config.auth.popupRelayUri) {
|
|
17035
|
+
return true;
|
|
17036
|
+
}
|
|
17037
|
+
if (popupWindowParent !== window) {
|
|
17038
|
+
return (computePocd(this.config) === 1 &&
|
|
17039
|
+
computePocd(this.config, popupWindowParent) === 1);
|
|
17040
|
+
}
|
|
17041
|
+
return undefined;
|
|
17042
|
+
}
|
|
16649
17043
|
/**
|
|
16650
17044
|
* Opens the interactive popup for a POST-form /authorize request. Shared by
|
|
16651
17045
|
* the auth-code POST and EAR flows, which are identical apart from the form
|
|
@@ -16741,7 +17135,7 @@
|
|
|
16741
17135
|
// Clear temporary cache if the back button is clicked during the redirect flow.
|
|
16742
17136
|
window.addEventListener("pageshow", handleBackButton);
|
|
16743
17137
|
try {
|
|
16744
|
-
const redirectOperation = this.config.system.protocolMode
|
|
17138
|
+
const redirectOperation = shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)
|
|
16745
17139
|
? this.executeEarFlow(validRequest)
|
|
16746
17140
|
: this.executeCodeFlow(validRequest);
|
|
16747
17141
|
await Promise.race([redirectOperation, backButtonCancellation]);
|
|
@@ -16968,7 +17362,6 @@
|
|
|
16968
17362
|
}
|
|
16969
17363
|
return [null, ""];
|
|
16970
17364
|
}
|
|
16971
|
-
clearHash(window);
|
|
16972
17365
|
this.logger.verbose("00uvho", this.correlationId);
|
|
16973
17366
|
return [response, responseString];
|
|
16974
17367
|
}
|
|
@@ -17243,7 +17636,7 @@
|
|
|
17243
17636
|
const silentRequest = await invokeAsync(initializeAuthorizationRequest, StandardInteractionClientInitializeAuthorizationRequest, this.logger, this.performanceClient, this.correlationId)(inputRequest, exports.InteractionType.Silent, this.config, this.browserCrypto, this.browserStorage, this.logger, this.performanceClient, this.correlationId);
|
|
17244
17637
|
silentRequest.platformBroker = isPlatformAuthAllowed(this.config, this.logger, this.correlationId, this.platformAuthProvider, silentRequest.authenticationScheme);
|
|
17245
17638
|
preconnect(silentRequest.authority);
|
|
17246
|
-
if (this.config.system.protocolMode
|
|
17639
|
+
if (shouldUseEar(this.config.system.protocolMode, this.logger, this.performanceClient, this.correlationId)) {
|
|
17247
17640
|
return this.executeEarFlow(silentRequest);
|
|
17248
17641
|
}
|
|
17249
17642
|
else {
|
|
@@ -17639,14 +18032,20 @@
|
|
|
17639
18032
|
return prepareRequest(input);
|
|
17640
18033
|
}
|
|
17641
18034
|
/**
|
|
17642
|
-
*
|
|
18035
|
+
* Extends the web thumbprint with silent-flow options while preserving caller-owned references.
|
|
17643
18036
|
*/
|
|
17644
18037
|
function prepareWebSilentRequest({ request, account, correlationId, config, }) {
|
|
17645
18038
|
const thumbprint = getRequestThumbprint(config.auth.clientId, {
|
|
17646
18039
|
...request,
|
|
17647
18040
|
authority: request.authority || config.auth.authority}, account.homeAccountId);
|
|
17648
18041
|
return {
|
|
17649
|
-
key: JSON.stringify(
|
|
18042
|
+
key: JSON.stringify({
|
|
18043
|
+
...thumbprint,
|
|
18044
|
+
forceRefresh: !!request.forceRefresh,
|
|
18045
|
+
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
18046
|
+
extraParameters: canonicalizeStringDict(request.extraParameters),
|
|
18047
|
+
extraQueryParameters: canonicalizeStringDict(request.extraQueryParameters),
|
|
18048
|
+
}),
|
|
17650
18049
|
request,
|
|
17651
18050
|
account,
|
|
17652
18051
|
};
|
|
@@ -17933,7 +18332,32 @@
|
|
|
17933
18332
|
* @returns
|
|
17934
18333
|
*/
|
|
17935
18334
|
async handleRedirectPromiseInternal(options) {
|
|
17936
|
-
|
|
18335
|
+
// Preserve the response for RedirectClient before removing it from the URL.
|
|
18336
|
+
const responseString = options?.hash ||
|
|
18337
|
+
(this.config.auth.OIDCOptions.responseMode ===
|
|
18338
|
+
ResponseMode$1.QUERY
|
|
18339
|
+
? window.location.search
|
|
18340
|
+
: window.location.hash);
|
|
18341
|
+
const anyClientInteractionInProgress = this.browserStorage.isInteractionInProgress(false);
|
|
18342
|
+
const currentClientInteraction = this.browserStorage.isInteractionInProgress(true);
|
|
18343
|
+
const isBridgeCallback = isInPopup() ||
|
|
18344
|
+
(isInIframe() &&
|
|
18345
|
+
!this.config.system.allowRedirectInIframe);
|
|
18346
|
+
/*
|
|
18347
|
+
* Clear recognized response fragments for:
|
|
18348
|
+
* - Stale callbacks with no pending interaction.
|
|
18349
|
+
* - This client's login callback, even if request setup or response validation fails.
|
|
18350
|
+
* - This client's logout callback containing state, before the SIGNOUT early return.
|
|
18351
|
+
* Leave another client's callback untouched. clearHash preserves query strings
|
|
18352
|
+
* and application routes, and does nothing when no response fragment is present.
|
|
18353
|
+
* Skip popup and non-redirect iframe callbacks: legacy apps may call HRP
|
|
18354
|
+
* before their redirect bridge reads and broadcasts the response.
|
|
18355
|
+
*/
|
|
18356
|
+
if (!isBridgeCallback &&
|
|
18357
|
+
(!anyClientInteractionInProgress || currentClientInteraction)) {
|
|
18358
|
+
clearHash(window);
|
|
18359
|
+
}
|
|
18360
|
+
if (!currentClientInteraction) {
|
|
17937
18361
|
this.logger.info("0le6uv", "");
|
|
17938
18362
|
return null;
|
|
17939
18363
|
}
|
|
@@ -17941,7 +18365,7 @@
|
|
|
17941
18365
|
if (interactionType === INTERACTION_TYPE.SIGNOUT) {
|
|
17942
18366
|
this.logger.verbose("1ywcv2", "");
|
|
17943
18367
|
this.browserStorage.setInteractionInProgress(false);
|
|
17944
|
-
return
|
|
18368
|
+
return null;
|
|
17945
18369
|
}
|
|
17946
18370
|
const loggedInAccounts = this.getAllAccounts();
|
|
17947
18371
|
const platformBrokerRequest = this.browserStorage.getCachedNativeRequest();
|
|
@@ -17971,7 +18395,9 @@
|
|
|
17971
18395
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
17972
18396
|
this.logger.trace("0znzs5", correlationId);
|
|
17973
18397
|
const redirectClient = this.createRedirectClient(correlationId);
|
|
17974
|
-
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options
|
|
18398
|
+
redirectResponse = invokeAsync(redirectClient.handleRedirectPromise.bind(redirectClient), HandleRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(standardRequest, codeVerifier, rootMeasurement, options?.hash
|
|
18399
|
+
? options
|
|
18400
|
+
: { ...options, hash: responseString });
|
|
17975
18401
|
}
|
|
17976
18402
|
}
|
|
17977
18403
|
catch (e) {
|
|
@@ -18119,6 +18545,9 @@
|
|
|
18119
18545
|
this.logger.verbose("0ch87b", correlationId);
|
|
18120
18546
|
preflightCheck(this.initialized, atPopupMeasurement, this.config, request);
|
|
18121
18547
|
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN, request.overrideInteractionInProgress, correlationId);
|
|
18548
|
+
if (request.overrideInteractionInProgress) {
|
|
18549
|
+
cancelPendingPopupPollingResponse(this.logger);
|
|
18550
|
+
}
|
|
18122
18551
|
}
|
|
18123
18552
|
catch (e) {
|
|
18124
18553
|
// Since this function is syncronous we need to reject
|
|
@@ -19827,7 +20256,10 @@
|
|
|
19827
20256
|
const correlationId = validRequest.correlationId || createNewGuid();
|
|
19828
20257
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Popup, validRequest);
|
|
19829
20258
|
const atPopupMeasurement = this.performanceClient.startMeasurement(AcquireTokenPopup, correlationId);
|
|
19830
|
-
atPopupMeasurement.add({
|
|
20259
|
+
atPopupMeasurement.add({
|
|
20260
|
+
nestedAppAuthRequest: true,
|
|
20261
|
+
bridgeType: "NAA",
|
|
20262
|
+
});
|
|
19831
20263
|
try {
|
|
19832
20264
|
enforceResourceParameter(this.config.auth.isMcp, validRequest);
|
|
19833
20265
|
const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(validRequest);
|
|
@@ -19894,6 +20326,7 @@
|
|
|
19894
20326
|
});
|
|
19895
20327
|
ssoSilentMeasurement.add({
|
|
19896
20328
|
nestedAppAuthRequest: true,
|
|
20329
|
+
bridgeType: "NAA",
|
|
19897
20330
|
});
|
|
19898
20331
|
try {
|
|
19899
20332
|
enforceResourceParameter(this.config.auth.isMcp, validRequest);
|
|
@@ -19948,6 +20381,7 @@
|
|
|
19948
20381
|
const atsMeasurement = this.performanceClient.startMeasurement(AcquireTokenSilent, correlationId);
|
|
19949
20382
|
atsMeasurement?.add({
|
|
19950
20383
|
nestedAppAuthRequest: true,
|
|
20384
|
+
bridgeType: "NAA",
|
|
19951
20385
|
});
|
|
19952
20386
|
// if the request has claims, we cannot look up in the cache
|
|
19953
20387
|
if (request.claims) {
|
|
@@ -20489,6 +20923,79 @@
|
|
|
20489
20923
|
*/
|
|
20490
20924
|
NestedAppOperatingContext.ID = "NestedAppOperatingContext";
|
|
20491
20925
|
|
|
20926
|
+
/*
|
|
20927
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
20928
|
+
* Licensed under the MIT License.
|
|
20929
|
+
*/
|
|
20930
|
+
const IFRAME_POLL_INTERVAL_MS = 50;
|
|
20931
|
+
const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
|
|
20932
|
+
/**
|
|
20933
|
+
* Monitors an iframe content window until it loads a URL with a known hash, or hits a specified timeout.
|
|
20934
|
+
*
|
|
20935
|
+
* @param iframe - The hidden iframe to monitor.
|
|
20936
|
+
* @param timeout - Maximum time (ms) to wait for navigation before rejecting with
|
|
20937
|
+
* `monitor_window_timeout`.
|
|
20938
|
+
* @param logger - Logger instance.
|
|
20939
|
+
* @param correlationId
|
|
20940
|
+
* @param responseMode - `"query"` or `"fragment"` — determines whether to read
|
|
20941
|
+
* `location.search` or `location.hash`. Any value other than `"query"` is
|
|
20942
|
+
* treated as fragment.
|
|
20943
|
+
*/
|
|
20944
|
+
async function monitorIframeForHash(iframe, timeout, logger, correlationId, responseMode) {
|
|
20945
|
+
return new Promise((resolve, reject) => {
|
|
20946
|
+
if (timeout < DEFAULT_IFRAME_TIMEOUT_MS) {
|
|
20947
|
+
logger.warning(`137tec ${timeout} ${DEFAULT_IFRAME_TIMEOUT_MS}`, correlationId);
|
|
20948
|
+
}
|
|
20949
|
+
/*
|
|
20950
|
+
* Polling for iframes can be purely timing based,
|
|
20951
|
+
* since we don't need to account for interaction.
|
|
20952
|
+
*/
|
|
20953
|
+
const timeoutId = window.setTimeout(() => {
|
|
20954
|
+
window.clearInterval(intervalId);
|
|
20955
|
+
reject(new AuthError(timedOut, correlationId, undefined, "monitor_window_timeout"));
|
|
20956
|
+
}, timeout);
|
|
20957
|
+
const intervalId = window.setInterval(() => {
|
|
20958
|
+
const contentWindow = iframe.contentWindow;
|
|
20959
|
+
if (!contentWindow) {
|
|
20960
|
+
return;
|
|
20961
|
+
}
|
|
20962
|
+
let href = "";
|
|
20963
|
+
try {
|
|
20964
|
+
/*
|
|
20965
|
+
* Will throw if cross origin,
|
|
20966
|
+
* which should be caught and ignored
|
|
20967
|
+
* since we need the interval to keep running while on STS UI.
|
|
20968
|
+
*/
|
|
20969
|
+
href = contentWindow.location.href;
|
|
20970
|
+
}
|
|
20971
|
+
catch (e) { }
|
|
20972
|
+
if (!href || href === "about:blank") {
|
|
20973
|
+
return;
|
|
20974
|
+
}
|
|
20975
|
+
const responseString = responseMode === ResponseMode$1.QUERY
|
|
20976
|
+
? contentWindow.location.search
|
|
20977
|
+
: contentWindow.location.hash;
|
|
20978
|
+
window.clearTimeout(timeoutId);
|
|
20979
|
+
window.clearInterval(intervalId);
|
|
20980
|
+
resolve(responseString);
|
|
20981
|
+
}, IFRAME_POLL_INTERVAL_MS);
|
|
20982
|
+
}).finally(() => {
|
|
20983
|
+
/*
|
|
20984
|
+
* Strip auth-response params from the iframe URL. The monitor owns the
|
|
20985
|
+
* iframe for the duration of the poll, mirroring cleanPopup in
|
|
20986
|
+
* PopupMonitor.
|
|
20987
|
+
*/
|
|
20988
|
+
try {
|
|
20989
|
+
if (iframe.contentWindow) {
|
|
20990
|
+
clearAuthResponseFromUrl(iframe.contentWindow);
|
|
20991
|
+
}
|
|
20992
|
+
}
|
|
20993
|
+
catch {
|
|
20994
|
+
// Iframe may already be navigated away or cross-origin; ignore.
|
|
20995
|
+
}
|
|
20996
|
+
});
|
|
20997
|
+
}
|
|
20998
|
+
|
|
20492
20999
|
/*
|
|
20493
21000
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
20494
21001
|
* Licensed under the MIT License.
|
|
@@ -20531,27 +21038,29 @@
|
|
|
20531
21038
|
/**
|
|
20532
21039
|
* Waits for the auth response from a popup window opened by MSAL.
|
|
20533
21040
|
*
|
|
20534
|
-
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge
|
|
20535
|
-
*
|
|
20536
|
-
*
|
|
21041
|
+
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
|
|
21042
|
+
* or to the v4-style same-origin location poller when
|
|
21043
|
+
* `system.enableLegacyPolling` is set. Subclasses must return the raw response
|
|
21044
|
+
* string (hash/query/fragment), or reject with an `AuthError` on failure.
|
|
20537
21045
|
*
|
|
20538
21046
|
* @internal
|
|
20539
21047
|
* @param request The in-flight authorization or end-session request.
|
|
20540
21048
|
* @param popupWindow The popup window opened by MSAL.
|
|
20541
21049
|
* @param popupWindowParent The parent window that opened the popup.
|
|
20542
21050
|
*/
|
|
20543
|
-
async waitForPopupResponse(request,
|
|
20544
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20545
|
-
popupWindow,
|
|
20546
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20547
|
-
popupWindowParent) {
|
|
21051
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
20548
21052
|
const controller = this.controller;
|
|
20549
|
-
|
|
21053
|
+
const config = controller.getConfiguration();
|
|
21054
|
+
if (config.system.enableLegacyPolling) {
|
|
21055
|
+
return waitForPopupPollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), request, popupWindow, popupWindowParent);
|
|
21056
|
+
}
|
|
21057
|
+
return waitForBridgeResponse(config.system.popupBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient());
|
|
20550
21058
|
}
|
|
20551
21059
|
/**
|
|
20552
21060
|
* Waits for the auth response from a hidden iframe used by MSAL silent flows.
|
|
20553
21061
|
*
|
|
20554
|
-
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge
|
|
21062
|
+
* The default implementation delegates to MSAL's `BroadcastChannel`-based bridge,
|
|
21063
|
+
* or to the v4-style location poller when `system.enableLegacyPolling` is set.
|
|
20555
21064
|
* Subclasses must return the raw response string (hash/query/fragment), or reject
|
|
20556
21065
|
* with an `AuthError` on failure.
|
|
20557
21066
|
*
|
|
@@ -20559,11 +21068,12 @@
|
|
|
20559
21068
|
* @param iframe The hidden iframe MSAL attached to the document.
|
|
20560
21069
|
* @param request The in-flight authorization request.
|
|
20561
21070
|
*/
|
|
20562
|
-
async waitForIframeResponse(
|
|
20563
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20564
|
-
iframe, request) {
|
|
21071
|
+
async waitForIframeResponse(iframe, request) {
|
|
20565
21072
|
const controller = this.controller;
|
|
20566
21073
|
const config = controller.getConfiguration();
|
|
21074
|
+
if (config.system.enableLegacyPolling) {
|
|
21075
|
+
return waitForIframePollingResponse(config, controller.getLogger(), controller.getPerformanceClient(), iframe, request);
|
|
21076
|
+
}
|
|
20567
21077
|
return waitForBridgeResponse(config.system.iframeBridgeTimeout, controller.getLogger(), request, controller.getPerformanceClient(), config.experimental);
|
|
20568
21078
|
}
|
|
20569
21079
|
/**
|
|
@@ -20832,6 +21342,40 @@
|
|
|
20832
21342
|
const pca = new PublicClientApplication(configuration);
|
|
20833
21343
|
await pca.initialize();
|
|
20834
21344
|
return pca;
|
|
21345
|
+
}
|
|
21346
|
+
/**
|
|
21347
|
+
* Collects a popup auth response using the v4-style same-origin location
|
|
21348
|
+
* poller instead of the `BroadcastChannel` redirect bridge.
|
|
21349
|
+
*/
|
|
21350
|
+
async function waitForPopupPollingResponse(config, logger, performanceClient, request, popupWindow, popupWindowParent) {
|
|
21351
|
+
const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
|
|
21352
|
+
? ResponseMode$1.QUERY
|
|
21353
|
+
: ResponseMode$1.FRAGMENT;
|
|
21354
|
+
performanceClient.addFields({ usesLegacyPolling: true }, request.correlationId);
|
|
21355
|
+
const unloadHandler = () => {
|
|
21356
|
+
try {
|
|
21357
|
+
if (popupWindow && !popupWindow.closed) {
|
|
21358
|
+
popupWindow.close();
|
|
21359
|
+
}
|
|
21360
|
+
}
|
|
21361
|
+
catch {
|
|
21362
|
+
/* ignore */
|
|
21363
|
+
}
|
|
21364
|
+
};
|
|
21365
|
+
popupWindowParent.addEventListener("beforeunload", unloadHandler);
|
|
21366
|
+
return monitorPopupForHash(popupWindow, popupWindowParent, responseMode, logger, unloadHandler, request.correlationId);
|
|
21367
|
+
}
|
|
21368
|
+
/**
|
|
21369
|
+
* Collects a silent-iframe auth response using the v4-style location poller
|
|
21370
|
+
* instead of the `BroadcastChannel` redirect bridge.
|
|
21371
|
+
*/
|
|
21372
|
+
async function waitForIframePollingResponse(config, logger, performanceClient, iframe, request) {
|
|
21373
|
+
const responseMode = config.auth.OIDCOptions?.responseMode === ResponseMode$1.QUERY
|
|
21374
|
+
? ResponseMode$1.QUERY
|
|
21375
|
+
: ResponseMode$1.FRAGMENT;
|
|
21376
|
+
const iframePollTimeout = config.system.iframeBridgeTimeout;
|
|
21377
|
+
performanceClient.addFields({ usesLegacyPolling: true, iframePollTimeout }, request.correlationId);
|
|
21378
|
+
return monitorIframeForHash(iframe, iframePollTimeout, logger, request.correlationId, responseMode);
|
|
20835
21379
|
}
|
|
20836
21380
|
|
|
20837
21381
|
/*
|
|
@@ -21465,7 +22009,7 @@
|
|
|
21465
22009
|
exports.ClientAuthErrorCodes = ClientAuthErrorCodes;
|
|
21466
22010
|
exports.ClientConfigurationError = ClientConfigurationError;
|
|
21467
22011
|
exports.ClientConfigurationErrorCodes = ClientConfigurationErrorCodes;
|
|
21468
|
-
exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS;
|
|
22012
|
+
exports.DEFAULT_IFRAME_TIMEOUT_MS = DEFAULT_IFRAME_TIMEOUT_MS$1;
|
|
21469
22013
|
exports.EventHandler = EventHandler;
|
|
21470
22014
|
exports.EventMessageUtils = EventMessageUtils;
|
|
21471
22015
|
exports.EventType = EventType;
|