@azure/msal-browser 4.19.0 → 4.21.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 +30 -0
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +2 -3
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs.map +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/cache/AccountManager.d.ts.map +1 -1
- package/dist/cache/AccountManager.mjs +1 -6
- package/dist/cache/AccountManager.mjs.map +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +60 -22
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/custom-auth-path/app/PublicClientApplication.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs +2 -3
- package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs.map +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/custom-auth-path/cache/AccountManager.d.ts.map +1 -1
- package/dist/custom-auth-path/cache/AccountManager.mjs +1 -6
- package/dist/custom-auth-path/cache/AccountManager.mjs.map +1 -1
- package/dist/custom-auth-path/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/BrowserCacheManager.mjs +1 -1
- package/dist/custom-auth-path/cache/CacheHelpers.mjs +1 -1
- package/dist/custom-auth-path/cache/CacheKeys.mjs +1 -1
- package/dist/custom-auth-path/cache/CookieStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/DatabaseStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/EncryptedData.mjs +1 -1
- package/dist/custom-auth-path/cache/LocalStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/MemoryStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/SessionStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/TokenCache.mjs +1 -1
- package/dist/custom-auth-path/config/Configuration.mjs +1 -1
- package/dist/custom-auth-path/controllers/ControllerFactory.mjs +1 -1
- package/dist/custom-auth-path/controllers/StandardController.d.ts.map +1 -1
- package/dist/custom-auth-path/controllers/StandardController.mjs +60 -22
- package/dist/custom-auth-path/controllers/StandardController.mjs.map +1 -1
- package/dist/custom-auth-path/crypto/BrowserCrypto.mjs +1 -1
- package/dist/custom-auth-path/crypto/CryptoOps.mjs +1 -1
- package/dist/custom-auth-path/crypto/PkceGenerator.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/index.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCredentialResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/custom-auth-path/encode/Base64Decode.mjs +1 -1
- package/dist/custom-auth-path/encode/Base64Encode.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/error/NativeAuthError.d.ts.map +1 -1
- package/dist/custom-auth-path/error/NativeAuthError.mjs +3 -4
- package/dist/custom-auth-path/error/NativeAuthError.mjs.map +1 -1
- package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/event/EventHandler.mjs +1 -1
- package/dist/custom-auth-path/event/EventType.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +15 -6
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/PopupClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +4 -4
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/custom-auth-path/navigation/NavigationClient.mjs +1 -1
- package/dist/custom-auth-path/network/FetchClient.mjs +1 -1
- package/dist/custom-auth-path/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/packageMetadata.d.ts +1 -1
- package/dist/custom-auth-path/packageMetadata.mjs +2 -2
- package/dist/custom-auth-path/protocol/Authorize.d.ts.map +1 -1
- package/dist/custom-auth-path/protocol/Authorize.mjs +5 -1
- package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
- package/dist/custom-auth-path/request/RequestHelpers.mjs +1 -1
- package/dist/custom-auth-path/response/ResponseHandler.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserConstants.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserUtils.mjs +1 -1
- package/dist/custom-auth-path/utils/Helpers.mjs +1 -1
- package/dist/custom-auth-path/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.d.ts +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.d.ts.map +1 -1
- package/dist/error/NativeAuthError.mjs +3 -4
- package/dist/error/NativeAuthError.mjs.map +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.d.ts.map +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +15 -6
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +4 -4
- 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 +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/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/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +5 -1
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/lib/custom-auth-path/msal-custom-auth.cjs +206 -102
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/types/cache/AccountManager.d.ts.map +1 -1
- package/lib/custom-auth-path/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/lib/custom-auth-path/types/error/NativeAuthError.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/packageMetadata.d.ts +1 -1
- package/lib/custom-auth-path/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/msal-browser.cjs +208 -104
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +208 -104
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +66 -66
- package/lib/types/cache/AccountManager.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/lib/types/error/NativeAuthError.d.ts.map +1 -1
- package/lib/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/cache/AccountManager.ts +0 -6
- package/src/controllers/StandardController.ts +69 -20
- package/src/error/NativeAuthError.ts +1 -2
- package/src/interaction_client/PlatformAuthInteractionClient.ts +17 -5
- package/src/interaction_client/RedirectClient.ts +2 -2
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +8 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v4.
|
|
1
|
+
/*! @azure/msal-browser v4.21.0 2025-08-19 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v15.
|
|
5
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -276,7 +276,7 @@ const JsonWebTokenTypes = {
|
|
|
276
276
|
// Token renewal offset default in seconds
|
|
277
277
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
278
278
|
|
|
279
|
-
/*! @azure/msal-common v15.
|
|
279
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
280
280
|
/*
|
|
281
281
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
282
282
|
* Licensed under the MIT License.
|
|
@@ -287,7 +287,7 @@ const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
|
287
287
|
const unexpectedError = "unexpected_error";
|
|
288
288
|
const postRequestFailed$1 = "post_request_failed";
|
|
289
289
|
|
|
290
|
-
/*! @azure/msal-common v15.
|
|
290
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
291
291
|
|
|
292
292
|
/*
|
|
293
293
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -322,7 +322,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
322
322
|
: AuthErrorMessages[code]);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
/*! @azure/msal-common v15.
|
|
325
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
326
326
|
/*
|
|
327
327
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
328
328
|
* Licensed under the MIT License.
|
|
@@ -372,7 +372,7 @@ const missingTenantIdError = "missing_tenant_id_error";
|
|
|
372
372
|
const methodNotImplemented = "method_not_implemented";
|
|
373
373
|
const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
|
|
374
374
|
|
|
375
|
-
/*! @azure/msal-common v15.
|
|
375
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
376
376
|
|
|
377
377
|
/*
|
|
378
378
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -446,7 +446,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
446
446
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
/*! @azure/msal-common v15.
|
|
449
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
450
450
|
|
|
451
451
|
/*
|
|
452
452
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -485,7 +485,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
485
485
|
},
|
|
486
486
|
};
|
|
487
487
|
|
|
488
|
-
/*! @azure/msal-common v15.
|
|
488
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
489
489
|
|
|
490
490
|
/*
|
|
491
491
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -676,12 +676,12 @@ class Logger {
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
-
/*! @azure/msal-common v15.
|
|
679
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
680
680
|
/* eslint-disable header/header */
|
|
681
681
|
const name$1 = "@azure/msal-common";
|
|
682
|
-
const version$1 = "15.
|
|
682
|
+
const version$1 = "15.12.0";
|
|
683
683
|
|
|
684
|
-
/*! @azure/msal-common v15.
|
|
684
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
685
685
|
/*
|
|
686
686
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
687
687
|
* Licensed under the MIT License.
|
|
@@ -690,7 +690,7 @@ const AzureCloudInstance = {
|
|
|
690
690
|
// AzureCloudInstance is not specified.
|
|
691
691
|
None: "none"};
|
|
692
692
|
|
|
693
|
-
/*! @azure/msal-common v15.
|
|
693
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
694
694
|
/*
|
|
695
695
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
696
696
|
* Licensed under the MIT License.
|
|
@@ -719,7 +719,7 @@ const authorityMismatch = "authority_mismatch";
|
|
|
719
719
|
const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
|
|
720
720
|
const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
|
|
721
721
|
|
|
722
|
-
/*! @azure/msal-common v15.
|
|
722
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
723
723
|
|
|
724
724
|
/*
|
|
725
725
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -764,7 +764,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
764
764
|
return new ClientConfigurationError(errorCode);
|
|
765
765
|
}
|
|
766
766
|
|
|
767
|
-
/*! @azure/msal-common v15.
|
|
767
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
768
768
|
/*
|
|
769
769
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
770
770
|
* Licensed under the MIT License.
|
|
@@ -861,7 +861,7 @@ class StringUtils {
|
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
|
|
864
|
-
/*! @azure/msal-common v15.
|
|
864
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
865
865
|
|
|
866
866
|
/*
|
|
867
867
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -905,7 +905,11 @@ class ScopeSet {
|
|
|
905
905
|
* @returns
|
|
906
906
|
*/
|
|
907
907
|
static createSearchScopes(inputScopeString) {
|
|
908
|
-
|
|
908
|
+
// Handle empty scopes by using default OIDC scopes for cache lookup
|
|
909
|
+
const scopesToUse = inputScopeString && inputScopeString.length > 0
|
|
910
|
+
? inputScopeString
|
|
911
|
+
: [...OIDC_DEFAULT_SCOPES];
|
|
912
|
+
const scopeSet = new ScopeSet(scopesToUse);
|
|
909
913
|
if (!scopeSet.containsOnlyOIDCScopes()) {
|
|
910
914
|
scopeSet.removeOIDCScopes();
|
|
911
915
|
}
|
|
@@ -1052,7 +1056,7 @@ class ScopeSet {
|
|
|
1052
1056
|
}
|
|
1053
1057
|
}
|
|
1054
1058
|
|
|
1055
|
-
/*! @azure/msal-common v15.
|
|
1059
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1056
1060
|
/*
|
|
1057
1061
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1058
1062
|
* Licensed under the MIT License.
|
|
@@ -1134,7 +1138,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
1134
1138
|
return updatedAccountInfo;
|
|
1135
1139
|
}
|
|
1136
1140
|
|
|
1137
|
-
/*! @azure/msal-common v15.
|
|
1141
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1138
1142
|
|
|
1139
1143
|
/*
|
|
1140
1144
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1195,12 +1199,34 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
1195
1199
|
}
|
|
1196
1200
|
}
|
|
1197
1201
|
|
|
1198
|
-
/*! @azure/msal-common v15.
|
|
1202
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1199
1203
|
|
|
1200
1204
|
/*
|
|
1201
1205
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1202
1206
|
* Licensed under the MIT License.
|
|
1203
1207
|
*/
|
|
1208
|
+
/**
|
|
1209
|
+
* Canonicalizes a URL by making it lowercase and ensuring it ends with /
|
|
1210
|
+
* Inlined version of UrlString.canonicalizeUri to avoid circular dependency
|
|
1211
|
+
* @param url - URL to canonicalize
|
|
1212
|
+
* @returns Canonicalized URL
|
|
1213
|
+
*/
|
|
1214
|
+
function canonicalizeUrl(url) {
|
|
1215
|
+
if (!url) {
|
|
1216
|
+
return url;
|
|
1217
|
+
}
|
|
1218
|
+
let lowerCaseUrl = url.toLowerCase();
|
|
1219
|
+
if (StringUtils.endsWith(lowerCaseUrl, "?")) {
|
|
1220
|
+
lowerCaseUrl = lowerCaseUrl.slice(0, -1);
|
|
1221
|
+
}
|
|
1222
|
+
else if (StringUtils.endsWith(lowerCaseUrl, "?/")) {
|
|
1223
|
+
lowerCaseUrl = lowerCaseUrl.slice(0, -2);
|
|
1224
|
+
}
|
|
1225
|
+
if (!StringUtils.endsWith(lowerCaseUrl, "/")) {
|
|
1226
|
+
lowerCaseUrl += "/";
|
|
1227
|
+
}
|
|
1228
|
+
return lowerCaseUrl;
|
|
1229
|
+
}
|
|
1204
1230
|
/**
|
|
1205
1231
|
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
|
1206
1232
|
* @param hashString
|
|
@@ -1258,9 +1284,38 @@ function mapToQueryString(parameters, encodeExtraParams = true, extraQueryParame
|
|
|
1258
1284
|
}
|
|
1259
1285
|
});
|
|
1260
1286
|
return queryParameterArray.join("&");
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* Normalizes URLs for comparison by removing hash, canonicalizing,
|
|
1290
|
+
* and ensuring consistent URL encoding in query parameters.
|
|
1291
|
+
* This fixes redirect loops when URLs contain encoded characters like apostrophes (%27).
|
|
1292
|
+
* @param url - URL to normalize
|
|
1293
|
+
* @returns Normalized URL string for comparison
|
|
1294
|
+
*/
|
|
1295
|
+
function normalizeUrlForComparison(url) {
|
|
1296
|
+
if (!url) {
|
|
1297
|
+
return url;
|
|
1298
|
+
}
|
|
1299
|
+
// Remove hash first
|
|
1300
|
+
const urlWithoutHash = url.split("#")[0];
|
|
1301
|
+
try {
|
|
1302
|
+
// Parse the URL to handle encoding consistently
|
|
1303
|
+
const urlObj = new URL(urlWithoutHash);
|
|
1304
|
+
/*
|
|
1305
|
+
* Reconstruct the URL with properly decoded query parameters
|
|
1306
|
+
* This ensures that %27 and ' are treated as equivalent
|
|
1307
|
+
*/
|
|
1308
|
+
const normalizedUrl = urlObj.origin + urlObj.pathname + urlObj.search;
|
|
1309
|
+
// Apply canonicalization logic inline to avoid circular dependency
|
|
1310
|
+
return canonicalizeUrl(normalizedUrl);
|
|
1311
|
+
}
|
|
1312
|
+
catch (e) {
|
|
1313
|
+
// Fallback to original logic if URL parsing fails
|
|
1314
|
+
return canonicalizeUrl(urlWithoutHash);
|
|
1315
|
+
}
|
|
1261
1316
|
}
|
|
1262
1317
|
|
|
1263
|
-
/*! @azure/msal-common v15.
|
|
1318
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1264
1319
|
|
|
1265
1320
|
/*
|
|
1266
1321
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1424,7 +1479,7 @@ class UrlString {
|
|
|
1424
1479
|
}
|
|
1425
1480
|
}
|
|
1426
1481
|
|
|
1427
|
-
/*! @azure/msal-common v15.
|
|
1482
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1428
1483
|
|
|
1429
1484
|
/*
|
|
1430
1485
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1563,7 +1618,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1563
1618
|
return null;
|
|
1564
1619
|
}
|
|
1565
1620
|
|
|
1566
|
-
/*! @azure/msal-common v15.
|
|
1621
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1567
1622
|
/*
|
|
1568
1623
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1569
1624
|
* Licensed under the MIT License.
|
|
@@ -1571,7 +1626,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1571
1626
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
1572
1627
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
1573
1628
|
|
|
1574
|
-
/*! @azure/msal-common v15.
|
|
1629
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1575
1630
|
|
|
1576
1631
|
/*
|
|
1577
1632
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1616,7 +1671,7 @@ function createCacheError(e) {
|
|
|
1616
1671
|
}
|
|
1617
1672
|
}
|
|
1618
1673
|
|
|
1619
|
-
/*! @azure/msal-common v15.
|
|
1674
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
1620
1675
|
|
|
1621
1676
|
/*
|
|
1622
1677
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1646,6 +1701,11 @@ class CacheManager {
|
|
|
1646
1701
|
* Gets first tenanted AccountInfo object found based on provided filters
|
|
1647
1702
|
*/
|
|
1648
1703
|
getAccountInfoFilteredBy(accountFilter, correlationId) {
|
|
1704
|
+
if (Object.keys(accountFilter).length === 0 ||
|
|
1705
|
+
Object.values(accountFilter).every((value) => !value)) {
|
|
1706
|
+
this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null");
|
|
1707
|
+
return null;
|
|
1708
|
+
}
|
|
1649
1709
|
const allAccounts = this.getAllAccounts(accountFilter, correlationId);
|
|
1650
1710
|
if (allAccounts.length > 1) {
|
|
1651
1711
|
// If one or more accounts are found, prioritize accounts that have an ID token
|
|
@@ -2719,7 +2779,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
2719
2779
|
}
|
|
2720
2780
|
}
|
|
2721
2781
|
|
|
2722
|
-
/*! @azure/msal-common v15.
|
|
2782
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
2723
2783
|
/*
|
|
2724
2784
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2725
2785
|
* Licensed under the MIT License.
|
|
@@ -2743,7 +2803,7 @@ const ProtocolMode = {
|
|
|
2743
2803
|
EAR: "EAR",
|
|
2744
2804
|
};
|
|
2745
2805
|
|
|
2746
|
-
/*! @azure/msal-common v15.
|
|
2806
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
2747
2807
|
/*
|
|
2748
2808
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2749
2809
|
* Licensed under the MIT License.
|
|
@@ -3010,7 +3070,7 @@ const PerformanceEvents = {
|
|
|
3010
3070
|
const PerformanceEventStatus = {
|
|
3011
3071
|
InProgress: 1};
|
|
3012
3072
|
|
|
3013
|
-
/*! @azure/msal-common v15.
|
|
3073
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3014
3074
|
|
|
3015
3075
|
/*
|
|
3016
3076
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3089,7 +3149,7 @@ class StubPerformanceClient {
|
|
|
3089
3149
|
}
|
|
3090
3150
|
}
|
|
3091
3151
|
|
|
3092
|
-
/*! @azure/msal-common v15.
|
|
3152
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3093
3153
|
|
|
3094
3154
|
/*
|
|
3095
3155
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3189,7 +3249,7 @@ function isOidcProtocolMode(config) {
|
|
|
3189
3249
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
3190
3250
|
}
|
|
3191
3251
|
|
|
3192
|
-
/*! @azure/msal-common v15.
|
|
3252
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3193
3253
|
/*
|
|
3194
3254
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3195
3255
|
* Licensed under the MIT License.
|
|
@@ -3199,7 +3259,7 @@ const CcsCredentialType = {
|
|
|
3199
3259
|
UPN: "UPN",
|
|
3200
3260
|
};
|
|
3201
3261
|
|
|
3202
|
-
/*! @azure/msal-common v15.
|
|
3262
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3203
3263
|
|
|
3204
3264
|
/*
|
|
3205
3265
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3239,7 +3299,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
3239
3299
|
};
|
|
3240
3300
|
}
|
|
3241
3301
|
|
|
3242
|
-
/*! @azure/msal-common v15.
|
|
3302
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3243
3303
|
/*
|
|
3244
3304
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3245
3305
|
* Licensed under the MIT License.
|
|
@@ -3289,7 +3349,7 @@ const INSTANCE_AWARE = "instance_aware";
|
|
|
3289
3349
|
const EAR_JWK = "ear_jwk";
|
|
3290
3350
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
3291
3351
|
|
|
3292
|
-
/*! @azure/msal-common v15.
|
|
3352
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3293
3353
|
|
|
3294
3354
|
/*
|
|
3295
3355
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3669,7 +3729,7 @@ function addPostBodyParameters(parameters, bodyParameters) {
|
|
|
3669
3729
|
});
|
|
3670
3730
|
}
|
|
3671
3731
|
|
|
3672
|
-
/*! @azure/msal-common v15.
|
|
3732
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3673
3733
|
/*
|
|
3674
3734
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3675
3735
|
* Licensed under the MIT License.
|
|
@@ -3684,7 +3744,7 @@ const AuthorityType = {
|
|
|
3684
3744
|
Ciam: 3,
|
|
3685
3745
|
};
|
|
3686
3746
|
|
|
3687
|
-
/*! @azure/msal-common v15.
|
|
3747
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3688
3748
|
/*
|
|
3689
3749
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3690
3750
|
* Licensed under the MIT License.
|
|
@@ -3696,7 +3756,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
3696
3756
|
response.hasOwnProperty("jwks_uri"));
|
|
3697
3757
|
}
|
|
3698
3758
|
|
|
3699
|
-
/*! @azure/msal-common v15.
|
|
3759
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3700
3760
|
/*
|
|
3701
3761
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3702
3762
|
* Licensed under the MIT License.
|
|
@@ -3706,7 +3766,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
3706
3766
|
response.hasOwnProperty("metadata"));
|
|
3707
3767
|
}
|
|
3708
3768
|
|
|
3709
|
-
/*! @azure/msal-common v15.
|
|
3769
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3710
3770
|
/*
|
|
3711
3771
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3712
3772
|
* Licensed under the MIT License.
|
|
@@ -3716,7 +3776,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
3716
3776
|
response.hasOwnProperty("error_description"));
|
|
3717
3777
|
}
|
|
3718
3778
|
|
|
3719
|
-
/*! @azure/msal-common v15.
|
|
3779
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3720
3780
|
/*
|
|
3721
3781
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3722
3782
|
* Licensed under the MIT License.
|
|
@@ -3812,7 +3872,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
3812
3872
|
};
|
|
3813
3873
|
};
|
|
3814
3874
|
|
|
3815
|
-
/*! @azure/msal-common v15.
|
|
3875
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3816
3876
|
|
|
3817
3877
|
/*
|
|
3818
3878
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3918,7 +3978,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
3918
3978
|
},
|
|
3919
3979
|
};
|
|
3920
3980
|
|
|
3921
|
-
/*! @azure/msal-common v15.
|
|
3981
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3922
3982
|
/*
|
|
3923
3983
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3924
3984
|
* Licensed under the MIT License.
|
|
@@ -3983,7 +4043,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
3983
4043
|
return cachedAtSec > nowSeconds();
|
|
3984
4044
|
}
|
|
3985
4045
|
|
|
3986
|
-
/*! @azure/msal-common v15.
|
|
4046
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
3987
4047
|
|
|
3988
4048
|
/*
|
|
3989
4049
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4245,7 +4305,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
4245
4305
|
return metadata.expiresAt <= nowSeconds();
|
|
4246
4306
|
}
|
|
4247
4307
|
|
|
4248
|
-
/*! @azure/msal-common v15.
|
|
4308
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
4249
4309
|
|
|
4250
4310
|
/*
|
|
4251
4311
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5084,7 +5144,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
5084
5144
|
};
|
|
5085
5145
|
}
|
|
5086
5146
|
|
|
5087
|
-
/*! @azure/msal-common v15.
|
|
5147
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5088
5148
|
|
|
5089
5149
|
/*
|
|
5090
5150
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5115,7 +5175,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
5115
5175
|
}
|
|
5116
5176
|
}
|
|
5117
5177
|
|
|
5118
|
-
/*! @azure/msal-common v15.
|
|
5178
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5119
5179
|
|
|
5120
5180
|
/*
|
|
5121
5181
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5134,7 +5194,7 @@ class ServerError extends AuthError {
|
|
|
5134
5194
|
}
|
|
5135
5195
|
}
|
|
5136
5196
|
|
|
5137
|
-
/*! @azure/msal-common v15.
|
|
5197
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5138
5198
|
/*
|
|
5139
5199
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5140
5200
|
* Licensed under the MIT License.
|
|
@@ -5155,7 +5215,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
5155
5215
|
};
|
|
5156
5216
|
}
|
|
5157
5217
|
|
|
5158
|
-
/*! @azure/msal-common v15.
|
|
5218
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5159
5219
|
|
|
5160
5220
|
/*
|
|
5161
5221
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5242,7 +5302,7 @@ class ThrottlingUtils {
|
|
|
5242
5302
|
}
|
|
5243
5303
|
}
|
|
5244
5304
|
|
|
5245
|
-
/*! @azure/msal-common v15.
|
|
5305
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5246
5306
|
|
|
5247
5307
|
/*
|
|
5248
5308
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5273,7 +5333,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
5273
5333
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
5274
5334
|
}
|
|
5275
5335
|
|
|
5276
|
-
/*! @azure/msal-common v15.
|
|
5336
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5277
5337
|
|
|
5278
5338
|
/*
|
|
5279
5339
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5421,7 +5481,7 @@ class BaseClient {
|
|
|
5421
5481
|
}
|
|
5422
5482
|
}
|
|
5423
5483
|
|
|
5424
|
-
/*! @azure/msal-common v15.
|
|
5484
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5425
5485
|
/*
|
|
5426
5486
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5427
5487
|
* Licensed under the MIT License.
|
|
@@ -5443,7 +5503,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
5443
5503
|
return null;
|
|
5444
5504
|
}
|
|
5445
5505
|
|
|
5446
|
-
/*! @azure/msal-common v15.
|
|
5506
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5447
5507
|
|
|
5448
5508
|
/*
|
|
5449
5509
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5658,7 +5718,7 @@ class AccountEntity {
|
|
|
5658
5718
|
}
|
|
5659
5719
|
}
|
|
5660
5720
|
|
|
5661
|
-
/*! @azure/msal-common v15.
|
|
5721
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5662
5722
|
/*
|
|
5663
5723
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5664
5724
|
* Licensed under the MIT License.
|
|
@@ -5674,7 +5734,7 @@ const consentRequired = "consent_required";
|
|
|
5674
5734
|
const loginRequired = "login_required";
|
|
5675
5735
|
const badToken = "bad_token";
|
|
5676
5736
|
|
|
5677
|
-
/*! @azure/msal-common v15.
|
|
5737
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5678
5738
|
|
|
5679
5739
|
/*
|
|
5680
5740
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5746,7 +5806,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
5746
5806
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
5747
5807
|
}
|
|
5748
5808
|
|
|
5749
|
-
/*! @azure/msal-common v15.
|
|
5809
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5750
5810
|
|
|
5751
5811
|
/*
|
|
5752
5812
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5818,7 +5878,7 @@ class ProtocolUtils {
|
|
|
5818
5878
|
}
|
|
5819
5879
|
}
|
|
5820
5880
|
|
|
5821
|
-
/*! @azure/msal-common v15.
|
|
5881
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5822
5882
|
|
|
5823
5883
|
/*
|
|
5824
5884
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5900,7 +5960,7 @@ class PopTokenGenerator {
|
|
|
5900
5960
|
}
|
|
5901
5961
|
}
|
|
5902
5962
|
|
|
5903
|
-
/*! @azure/msal-common v15.
|
|
5963
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5904
5964
|
/*
|
|
5905
5965
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5906
5966
|
* Licensed under the MIT License.
|
|
@@ -5927,7 +5987,7 @@ class PopTokenGenerator {
|
|
|
5927
5987
|
}
|
|
5928
5988
|
}
|
|
5929
5989
|
|
|
5930
|
-
/*! @azure/msal-common v15.
|
|
5990
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
5931
5991
|
|
|
5932
5992
|
/*
|
|
5933
5993
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6258,7 +6318,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6258
6318
|
return baseAccount;
|
|
6259
6319
|
}
|
|
6260
6320
|
|
|
6261
|
-
/*! @azure/msal-common v15.
|
|
6321
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
6262
6322
|
/*
|
|
6263
6323
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6264
6324
|
* Licensed under the MIT License.
|
|
@@ -6276,7 +6336,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
6276
6336
|
}
|
|
6277
6337
|
}
|
|
6278
6338
|
|
|
6279
|
-
/*! @azure/msal-common v15.
|
|
6339
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
6280
6340
|
|
|
6281
6341
|
/*
|
|
6282
6342
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6511,7 +6571,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
6511
6571
|
}
|
|
6512
6572
|
}
|
|
6513
6573
|
|
|
6514
|
-
/*! @azure/msal-common v15.
|
|
6574
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
6515
6575
|
|
|
6516
6576
|
/*
|
|
6517
6577
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6720,7 +6780,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
6720
6780
|
}
|
|
6721
6781
|
}
|
|
6722
6782
|
|
|
6723
|
-
/*! @azure/msal-common v15.
|
|
6783
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
6724
6784
|
|
|
6725
6785
|
/*
|
|
6726
6786
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6818,7 +6878,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
6818
6878
|
}
|
|
6819
6879
|
}
|
|
6820
6880
|
|
|
6821
|
-
/*! @azure/msal-common v15.
|
|
6881
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
6822
6882
|
|
|
6823
6883
|
/*
|
|
6824
6884
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6833,7 +6893,7 @@ const StubbedNetworkModule = {
|
|
|
6833
6893
|
},
|
|
6834
6894
|
};
|
|
6835
6895
|
|
|
6836
|
-
/*! @azure/msal-common v15.
|
|
6896
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
6837
6897
|
|
|
6838
6898
|
/*
|
|
6839
6899
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7057,7 +7117,7 @@ function extractLoginHint(account) {
|
|
|
7057
7117
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7058
7118
|
}
|
|
7059
7119
|
|
|
7060
|
-
/*! @azure/msal-common v15.
|
|
7120
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
7061
7121
|
|
|
7062
7122
|
/*
|
|
7063
7123
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7320,7 +7380,7 @@ class ServerTelemetryManager {
|
|
|
7320
7380
|
}
|
|
7321
7381
|
}
|
|
7322
7382
|
|
|
7323
|
-
/*! @azure/msal-common v15.
|
|
7383
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
7324
7384
|
/*
|
|
7325
7385
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7326
7386
|
* Licensed under the MIT License.
|
|
@@ -7328,7 +7388,7 @@ class ServerTelemetryManager {
|
|
|
7328
7388
|
const missingKidError = "missing_kid_error";
|
|
7329
7389
|
const missingAlgError = "missing_alg_error";
|
|
7330
7390
|
|
|
7331
|
-
/*! @azure/msal-common v15.
|
|
7391
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
7332
7392
|
|
|
7333
7393
|
/*
|
|
7334
7394
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7353,7 +7413,7 @@ function createJoseHeaderError(code) {
|
|
|
7353
7413
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
7354
7414
|
}
|
|
7355
7415
|
|
|
7356
|
-
/*! @azure/msal-common v15.
|
|
7416
|
+
/*! @azure/msal-common v15.12.0 2025-08-19 */
|
|
7357
7417
|
|
|
7358
7418
|
/*
|
|
7359
7419
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7751,7 +7811,7 @@ function ensureArgumentIsJSONString(argName, argValue, correlationId) {
|
|
|
7751
7811
|
|
|
7752
7812
|
/* eslint-disable header/header */
|
|
7753
7813
|
const name = "@azure/msal-browser";
|
|
7754
|
-
const version = "4.
|
|
7814
|
+
const version = "4.21.0";
|
|
7755
7815
|
|
|
7756
7816
|
/*
|
|
7757
7817
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -14531,11 +14591,6 @@ function getAllAccounts(logger, browserStorage, isInBrowser, correlationId, acco
|
|
|
14531
14591
|
* @returns The first account found in the cache matching the provided filter or null if no account could be found.
|
|
14532
14592
|
*/
|
|
14533
14593
|
function getAccount(accountFilter, logger, browserStorage, correlationId) {
|
|
14534
|
-
logger.trace("getAccount called");
|
|
14535
|
-
if (Object.keys(accountFilter).length === 0) {
|
|
14536
|
-
logger.warning("getAccount: No accountFilter provided");
|
|
14537
|
-
return null;
|
|
14538
|
-
}
|
|
14539
14594
|
const account = browserStorage.getAccountInfoFilteredBy(accountFilter, correlationId);
|
|
14540
14595
|
if (account) {
|
|
14541
14596
|
logger.verbose("getAccount: Account matching provided filter found, returning");
|
|
@@ -14911,7 +14966,6 @@ const userSwitch = "user_switch";
|
|
|
14911
14966
|
const USER_INTERACTION_REQUIRED = "USER_INTERACTION_REQUIRED";
|
|
14912
14967
|
const USER_CANCEL = "USER_CANCEL";
|
|
14913
14968
|
const NO_NETWORK = "NO_NETWORK";
|
|
14914
|
-
const PERSISTENT_ERROR = "PERSISTENT_ERROR";
|
|
14915
14969
|
const DISABLED = "DISABLED";
|
|
14916
14970
|
const ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE";
|
|
14917
14971
|
const UX_NOT_ALLOWED = "UX_NOT_ALLOWED";
|
|
@@ -14938,8 +14992,7 @@ class NativeAuthError extends AuthError {
|
|
|
14938
14992
|
function isFatalNativeAuthError(error) {
|
|
14939
14993
|
if (error.ext &&
|
|
14940
14994
|
error.ext.status &&
|
|
14941
|
-
|
|
14942
|
-
error.ext.status === DISABLED)) {
|
|
14995
|
+
error.ext.status === DISABLED) {
|
|
14943
14996
|
return true;
|
|
14944
14997
|
}
|
|
14945
14998
|
if (error.ext &&
|
|
@@ -15063,10 +15116,10 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
15063
15116
|
* @param request
|
|
15064
15117
|
*/
|
|
15065
15118
|
async acquireToken(request, cacheLookupPolicy) {
|
|
15066
|
-
this.performanceClient.addQueueMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken,
|
|
15119
|
+
this.performanceClient.addQueueMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, this.correlationId);
|
|
15067
15120
|
this.logger.trace("NativeInteractionClient - acquireToken called.");
|
|
15068
15121
|
// start the perf measurement
|
|
15069
|
-
const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken,
|
|
15122
|
+
const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, this.correlationId);
|
|
15070
15123
|
const reqTimestamp = nowSeconds();
|
|
15071
15124
|
const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
|
|
15072
15125
|
try {
|
|
@@ -15085,6 +15138,10 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
15085
15138
|
catch (e) {
|
|
15086
15139
|
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
15087
15140
|
this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy");
|
|
15141
|
+
nativeATMeasurement.end({
|
|
15142
|
+
success: false,
|
|
15143
|
+
brokerErrorCode: "cache_request_failed",
|
|
15144
|
+
});
|
|
15088
15145
|
throw e;
|
|
15089
15146
|
}
|
|
15090
15147
|
// continue with a native call for any and all errors
|
|
@@ -15106,7 +15163,6 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
15106
15163
|
success: false,
|
|
15107
15164
|
errorCode: error.errorCode,
|
|
15108
15165
|
subErrorCode: error.subError,
|
|
15109
|
-
isNativeBroker: true,
|
|
15110
15166
|
});
|
|
15111
15167
|
throw error;
|
|
15112
15168
|
});
|
|
@@ -15115,6 +15171,9 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
15115
15171
|
if (e instanceof NativeAuthError) {
|
|
15116
15172
|
serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
15117
15173
|
}
|
|
15174
|
+
nativeATMeasurement.end({
|
|
15175
|
+
success: false,
|
|
15176
|
+
});
|
|
15118
15177
|
throw e;
|
|
15119
15178
|
}
|
|
15120
15179
|
}
|
|
@@ -15236,6 +15295,9 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
15236
15295
|
const authResult = await this.handleNativeResponse(response, request, reqTimestamp);
|
|
15237
15296
|
const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
|
|
15238
15297
|
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
15298
|
+
if (performanceClient && this.correlationId) {
|
|
15299
|
+
this.performanceClient.addFields({ isNativeBroker: true }, this.correlationId);
|
|
15300
|
+
}
|
|
15239
15301
|
return authResult;
|
|
15240
15302
|
}
|
|
15241
15303
|
catch (e) {
|
|
@@ -15552,7 +15614,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
15552
15614
|
// generate reqCnf if not provided in the request
|
|
15553
15615
|
let reqCnfData;
|
|
15554
15616
|
if (!validatedRequest.keyId) {
|
|
15555
|
-
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient,
|
|
15617
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, this.correlationId)(shrParameters, this.logger);
|
|
15556
15618
|
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
15557
15619
|
validatedRequest.keyId = generatedReqCnfData.kid;
|
|
15558
15620
|
validatedRequest.signPopToken = true;
|
|
@@ -15638,7 +15700,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
15638
15700
|
this.performanceClient?.addFields({
|
|
15639
15701
|
embeddedClientId: child_client_id,
|
|
15640
15702
|
embeddedRedirectUri: child_redirect_uri,
|
|
15641
|
-
},
|
|
15703
|
+
}, this.correlationId);
|
|
15642
15704
|
}
|
|
15643
15705
|
}
|
|
15644
15706
|
|
|
@@ -15669,6 +15731,10 @@ async function getStandardParameters(config, authority, request, logger, perform
|
|
|
15669
15731
|
if (request.platformBroker) {
|
|
15670
15732
|
// signal ests that this is a WAM call
|
|
15671
15733
|
addNativeBroker(parameters);
|
|
15734
|
+
// instrument JS-platform bridge specific fields
|
|
15735
|
+
performanceClient.addFields({
|
|
15736
|
+
isPlatformAuthorizeRequest: true,
|
|
15737
|
+
}, request.correlationId);
|
|
15672
15738
|
// pass the req_cnf for POP
|
|
15673
15739
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
15674
15740
|
const cryptoOps = new CryptoOps(logger, performanceClient);
|
|
@@ -17337,8 +17403,8 @@ class RedirectClient extends StandardInteractionClient {
|
|
|
17337
17403
|
}
|
|
17338
17404
|
// If navigateToLoginRequestUrl is true, get the url where the redirect request was initiated
|
|
17339
17405
|
const loginRequestUrl = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, true) || Constants.EMPTY_STRING;
|
|
17340
|
-
const loginRequestUrlNormalized =
|
|
17341
|
-
const currentUrlNormalized =
|
|
17406
|
+
const loginRequestUrlNormalized = normalizeUrlForComparison(loginRequestUrl);
|
|
17407
|
+
const currentUrlNormalized = normalizeUrlForComparison(window.location.href);
|
|
17342
17408
|
if (loginRequestUrlNormalized === currentUrlNormalized &&
|
|
17343
17409
|
this.config.auth.navigateToLoginRequestUrl) {
|
|
17344
17410
|
// We are on the page we need to navigate to - handle hash
|
|
@@ -18467,6 +18533,9 @@ class StandardController {
|
|
|
18467
18533
|
if (useNative && this.platformAuthProvider) {
|
|
18468
18534
|
rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenRedirect, platformBrokerRequest?.correlationId || "");
|
|
18469
18535
|
this.logger.trace("handleRedirectPromise - acquiring token from native platform");
|
|
18536
|
+
rootMeasurement.add({
|
|
18537
|
+
isPlatformBrokerRequest: true,
|
|
18538
|
+
});
|
|
18470
18539
|
const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.handleRedirectPromise, this.performanceClient, this.platformAuthProvider, platformBrokerRequest.accountId, this.nativeInternalStorage, platformBrokerRequest.correlationId);
|
|
18471
18540
|
redirectResponse = invokeAsync(nativeClient.handleRedirectPromise.bind(nativeClient), PerformanceEvents.HandleNativeRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(this.performanceClient, rootMeasurement.event.correlationId);
|
|
18472
18541
|
}
|
|
@@ -18560,12 +18629,12 @@ class StandardController {
|
|
|
18560
18629
|
const navigate = typeof onRedirectNavigateCb === "function"
|
|
18561
18630
|
? onRedirectNavigateCb(url)
|
|
18562
18631
|
: undefined;
|
|
18563
|
-
|
|
18564
|
-
|
|
18565
|
-
}
|
|
18566
|
-
|
|
18567
|
-
atrMeasurement.
|
|
18568
|
-
|
|
18632
|
+
atrMeasurement.add({
|
|
18633
|
+
navigateCallbackResult: navigate !== false,
|
|
18634
|
+
});
|
|
18635
|
+
atrMeasurement.event =
|
|
18636
|
+
atrMeasurement.end({ success: true }) ||
|
|
18637
|
+
atrMeasurement.event;
|
|
18569
18638
|
return navigate;
|
|
18570
18639
|
};
|
|
18571
18640
|
}
|
|
@@ -18575,12 +18644,12 @@ class StandardController {
|
|
|
18575
18644
|
const navigate = typeof configOnRedirectNavigateCb === "function"
|
|
18576
18645
|
? configOnRedirectNavigateCb(url)
|
|
18577
18646
|
: undefined;
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
}
|
|
18581
|
-
|
|
18582
|
-
atrMeasurement.
|
|
18583
|
-
|
|
18647
|
+
atrMeasurement.add({
|
|
18648
|
+
navigateCallbackResult: navigate !== false,
|
|
18649
|
+
});
|
|
18650
|
+
atrMeasurement.event =
|
|
18651
|
+
atrMeasurement.end({ success: true }) ||
|
|
18652
|
+
atrMeasurement.event;
|
|
18584
18653
|
return navigate;
|
|
18585
18654
|
};
|
|
18586
18655
|
}
|
|
@@ -18602,9 +18671,13 @@ class StandardController {
|
|
|
18602
18671
|
result = nativeClient
|
|
18603
18672
|
.acquireTokenRedirect(request, atrMeasurement)
|
|
18604
18673
|
.catch((e) => {
|
|
18674
|
+
atrMeasurement.add({
|
|
18675
|
+
brokerErrorName: e.name,
|
|
18676
|
+
brokerErrorCode: e.errorCode,
|
|
18677
|
+
});
|
|
18605
18678
|
if (e instanceof NativeAuthError &&
|
|
18606
18679
|
isFatalNativeAuthError(e)) {
|
|
18607
|
-
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
18680
|
+
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
18608
18681
|
const redirectClient = this.createRedirectClient(correlationId);
|
|
18609
18682
|
return redirectClient.acquireToken(request);
|
|
18610
18683
|
}
|
|
@@ -18624,7 +18697,18 @@ class StandardController {
|
|
|
18624
18697
|
}
|
|
18625
18698
|
catch (e) {
|
|
18626
18699
|
this.browserStorage.resetRequestCache();
|
|
18627
|
-
|
|
18700
|
+
/*
|
|
18701
|
+
* Pre-redirect event completes before navigation occurs.
|
|
18702
|
+
* Timed out navigation needs to be instrumented separately as a post-redirect event.
|
|
18703
|
+
*/
|
|
18704
|
+
if (atrMeasurement.event.status === 2) {
|
|
18705
|
+
this.performanceClient
|
|
18706
|
+
.startMeasurement(PerformanceEvents.AcquireTokenRedirect, correlationId)
|
|
18707
|
+
.end({ success: false }, e);
|
|
18708
|
+
}
|
|
18709
|
+
else {
|
|
18710
|
+
atrMeasurement.end({ success: false }, e);
|
|
18711
|
+
}
|
|
18628
18712
|
if (isLoggedIn) {
|
|
18629
18713
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);
|
|
18630
18714
|
}
|
|
@@ -18670,6 +18754,9 @@ class StandardController {
|
|
|
18670
18754
|
let result;
|
|
18671
18755
|
const pkce = this.getPreGeneratedPkceCodes(correlationId);
|
|
18672
18756
|
if (this.canUsePlatformBroker(request)) {
|
|
18757
|
+
atPopupMeasurement.add({
|
|
18758
|
+
isPlatformBrokerRequest: true,
|
|
18759
|
+
});
|
|
18673
18760
|
result = this.acquireTokenNative({
|
|
18674
18761
|
...request,
|
|
18675
18762
|
correlationId,
|
|
@@ -18677,15 +18764,18 @@ class StandardController {
|
|
|
18677
18764
|
.then((response) => {
|
|
18678
18765
|
atPopupMeasurement.end({
|
|
18679
18766
|
success: true,
|
|
18680
|
-
isNativeBroker: true,
|
|
18681
18767
|
accountType: getAccountType(response.account),
|
|
18682
18768
|
});
|
|
18683
18769
|
return response;
|
|
18684
18770
|
})
|
|
18685
18771
|
.catch((e) => {
|
|
18772
|
+
atPopupMeasurement.add({
|
|
18773
|
+
brokerErrorName: e.name,
|
|
18774
|
+
brokerErrorCode: e.errorCode,
|
|
18775
|
+
});
|
|
18686
18776
|
if (e instanceof NativeAuthError &&
|
|
18687
18777
|
isFatalNativeAuthError(e)) {
|
|
18688
|
-
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
18778
|
+
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to continuing to attempt platform broker calls
|
|
18689
18779
|
const popupClient = this.createPopupClient(correlationId);
|
|
18690
18780
|
return popupClient.acquireToken(request, pkce);
|
|
18691
18781
|
}
|
|
@@ -18791,7 +18881,14 @@ class StandardController {
|
|
|
18791
18881
|
this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, validRequest);
|
|
18792
18882
|
let result;
|
|
18793
18883
|
if (this.canUsePlatformBroker(validRequest)) {
|
|
18884
|
+
this.ssoSilentMeasurement?.add({
|
|
18885
|
+
isPlatformBrokerRequest: true,
|
|
18886
|
+
});
|
|
18794
18887
|
result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch((e) => {
|
|
18888
|
+
this.ssoSilentMeasurement?.add({
|
|
18889
|
+
brokerErrorName: e.name,
|
|
18890
|
+
brokerErrorCode: e.errorCode,
|
|
18891
|
+
});
|
|
18795
18892
|
// If native token acquisition fails for availability reasons fallback to standard flow
|
|
18796
18893
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
18797
18894
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
@@ -18810,7 +18907,6 @@ class StandardController {
|
|
|
18810
18907
|
this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, response);
|
|
18811
18908
|
this.ssoSilentMeasurement?.end({
|
|
18812
18909
|
success: true,
|
|
18813
|
-
isNativeBroker: response.fromNativeBroker,
|
|
18814
18910
|
accessTokenSize: response.accessToken.length,
|
|
18815
18911
|
idTokenSize: response.idToken.length,
|
|
18816
18912
|
accountType: getAccountType(response.account),
|
|
@@ -18864,7 +18960,6 @@ class StandardController {
|
|
|
18864
18960
|
this.hybridAuthCodeResponses.delete(hybridAuthCode);
|
|
18865
18961
|
atbcMeasurement.end({
|
|
18866
18962
|
success: true,
|
|
18867
|
-
isNativeBroker: result.fromNativeBroker,
|
|
18868
18963
|
accessTokenSize: result.accessToken.length,
|
|
18869
18964
|
idTokenSize: result.idToken.length,
|
|
18870
18965
|
accountType: getAccountType(result.account),
|
|
@@ -18889,6 +18984,9 @@ class StandardController {
|
|
|
18889
18984
|
}
|
|
18890
18985
|
else if (request.nativeAccountId) {
|
|
18891
18986
|
if (this.canUsePlatformBroker(request, request.nativeAccountId)) {
|
|
18987
|
+
atbcMeasurement.add({
|
|
18988
|
+
isPlatformBrokerRequest: true,
|
|
18989
|
+
});
|
|
18892
18990
|
const result = await this.acquireTokenNative({
|
|
18893
18991
|
...request,
|
|
18894
18992
|
correlationId,
|
|
@@ -18898,6 +18996,10 @@ class StandardController {
|
|
|
18898
18996
|
isFatalNativeAuthError(e)) {
|
|
18899
18997
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
18900
18998
|
}
|
|
18999
|
+
atbcMeasurement.add({
|
|
19000
|
+
brokerErrorName: e.name,
|
|
19001
|
+
brokerErrorCode: e.errorCode,
|
|
19002
|
+
});
|
|
18901
19003
|
throw e;
|
|
18902
19004
|
});
|
|
18903
19005
|
atbcMeasurement.end({
|
|
@@ -18942,7 +19044,6 @@ class StandardController {
|
|
|
18942
19044
|
this.acquireTokenByCodeAsyncMeasurement?.end({
|
|
18943
19045
|
success: true,
|
|
18944
19046
|
fromCache: response.fromCache,
|
|
18945
|
-
isNativeBroker: response.fromNativeBroker,
|
|
18946
19047
|
});
|
|
18947
19048
|
return response;
|
|
18948
19049
|
})
|
|
@@ -19440,7 +19541,6 @@ class StandardController {
|
|
|
19440
19541
|
atsMeasurement.end({
|
|
19441
19542
|
success: true,
|
|
19442
19543
|
fromCache: result.fromCache,
|
|
19443
|
-
isNativeBroker: result.fromNativeBroker,
|
|
19444
19544
|
accessTokenSize: result.accessToken.length,
|
|
19445
19545
|
idTokenSize: result.idToken.length,
|
|
19446
19546
|
});
|
|
@@ -19573,7 +19673,6 @@ class StandardController {
|
|
|
19573
19673
|
if (request.correlationId) {
|
|
19574
19674
|
this.performanceClient.addFields({
|
|
19575
19675
|
fromCache: response.fromCache,
|
|
19576
|
-
isNativeBroker: response.fromNativeBroker,
|
|
19577
19676
|
}, request.correlationId);
|
|
19578
19677
|
}
|
|
19579
19678
|
return response;
|
|
@@ -19597,7 +19696,12 @@ class StandardController {
|
|
|
19597
19696
|
if (isPlatformAuthAllowed(this.config, this.logger, this.platformAuthProvider, silentRequest.authenticationScheme) &&
|
|
19598
19697
|
silentRequest.account.nativeAccountId) {
|
|
19599
19698
|
this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");
|
|
19699
|
+
this.performanceClient.addFields({ isPlatformBrokerRequest: true }, silentRequest.correlationId);
|
|
19600
19700
|
return this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow, silentRequest.account.nativeAccountId, cacheLookupPolicy).catch(async (e) => {
|
|
19701
|
+
this.performanceClient.addFields({
|
|
19702
|
+
brokerErrorName: e.name,
|
|
19703
|
+
brokerErrorCode: e.errorCode,
|
|
19704
|
+
}, silentRequest.correlationId);
|
|
19601
19705
|
// If native token acquisition fails for availability reasons fallback to web flow
|
|
19602
19706
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
19603
19707
|
this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow");
|