@azure/msal-browser 5.12.0 → 5.14.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.
Files changed (398) hide show
  1. package/README.md +1 -0
  2. package/dist/app/IPublicClientApplication.mjs +1 -1
  3. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  4. package/dist/app/PublicClientApplication.mjs +1 -1
  5. package/dist/app/PublicClientApplication.mjs.map +1 -1
  6. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +9 -9
  8. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
  9. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +15 -15
  10. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
  11. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +2 -2
  12. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
  13. package/dist/cache/AccountManager.mjs +1 -1
  14. package/dist/cache/AccountManager.mjs.map +1 -1
  15. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  16. package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
  17. package/dist/cache/BrowserCacheManager.mjs +97 -24
  18. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  19. package/dist/cache/CacheHelpers.mjs +1 -1
  20. package/dist/cache/CacheHelpers.mjs.map +1 -1
  21. package/dist/cache/CacheKeys.mjs +1 -1
  22. package/dist/cache/CacheKeys.mjs.map +1 -1
  23. package/dist/cache/CookieStorage.mjs +1 -1
  24. package/dist/cache/CookieStorage.mjs.map +1 -1
  25. package/dist/cache/DatabaseStorage.mjs +1 -1
  26. package/dist/cache/DatabaseStorage.mjs.map +1 -1
  27. package/dist/cache/EncryptedData.mjs +1 -1
  28. package/dist/cache/LocalStorage.mjs +2 -2
  29. package/dist/cache/LocalStorage.mjs.map +1 -1
  30. package/dist/cache/MemoryStorage.mjs +1 -1
  31. package/dist/cache/MemoryStorage.mjs.map +1 -1
  32. package/dist/cache/SessionStorage.mjs +1 -1
  33. package/dist/cache/SessionStorage.mjs.map +1 -1
  34. package/dist/cache/TokenCache.mjs +4 -2
  35. package/dist/cache/TokenCache.mjs.map +1 -1
  36. package/dist/config/Configuration.mjs +4 -2
  37. package/dist/config/Configuration.mjs.map +1 -1
  38. package/dist/controllers/NestedAppAuthController.mjs +3 -3
  39. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  40. package/dist/controllers/StandardController.mjs +17 -17
  41. package/dist/controllers/StandardController.mjs.map +1 -1
  42. package/dist/crypto/BrowserCrypto.mjs +1 -1
  43. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  44. package/dist/crypto/CryptoOps.mjs +2 -2
  45. package/dist/crypto/CryptoOps.mjs.map +1 -1
  46. package/dist/crypto/PkceGenerator.mjs +1 -1
  47. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  48. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  49. package/dist/crypto/SignedHttpRequest.mjs.map +1 -1
  50. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  51. package/dist/custom_auth/CustomAuthConstants.mjs.map +1 -1
  52. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  53. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  54. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +13 -8
  55. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  56. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  57. package/dist/custom_auth/core/CustomAuthAuthority.mjs.map +1 -1
  58. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  59. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs.map +1 -1
  60. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  61. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs.map +1 -1
  62. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  63. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs.map +1 -1
  64. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  65. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  66. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs.map +1 -1
  67. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  68. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
  69. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  70. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +1 -1
  71. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  72. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs.map +1 -1
  73. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  74. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs.map +1 -1
  75. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +4 -4
  76. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +1 -1
  77. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  78. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs.map +1 -1
  79. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  80. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
  81. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  82. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +1 -1
  83. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  84. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs.map +1 -1
  85. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  86. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs.map +1 -1
  87. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +4 -4
  88. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
  89. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  90. package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +1 -1
  91. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  92. package/dist/custom_auth/core/error/CustomAuthError.mjs.map +1 -1
  93. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  94. package/dist/custom_auth/core/error/HttpError.mjs.map +1 -1
  95. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  96. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  97. package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
  98. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  99. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs.map +1 -1
  100. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  101. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  102. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs.map +1 -1
  103. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  104. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs.map +1 -1
  105. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  106. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs.map +1 -1
  107. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  108. package/dist/custom_auth/core/error/ParsedUrlError.mjs.map +1 -1
  109. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  110. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  111. package/dist/custom_auth/core/error/UnexpectedError.mjs.map +1 -1
  112. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  113. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs.map +1 -1
  114. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  115. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs.map +1 -1
  116. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  117. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs.map +1 -1
  118. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  119. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs.map +1 -1
  120. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  121. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs.map +1 -1
  122. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  123. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs.map +1 -1
  124. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  125. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +2 -2
  126. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs.map +1 -1
  127. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  128. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +2 -2
  129. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs.map +1 -1
  130. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  131. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs.map +1 -1
  132. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  133. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  134. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs.map +1 -1
  135. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  136. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs.map +1 -1
  137. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  138. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs.map +1 -1
  139. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  140. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs.map +1 -1
  141. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  142. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  143. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +4 -4
  144. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs.map +1 -1
  145. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  146. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs.map +1 -1
  147. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  148. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  149. package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
  150. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +3 -3
  151. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs.map +1 -1
  152. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  153. package/dist/custom_auth/core/utils/UrlUtils.mjs.map +1 -1
  154. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +2 -2
  155. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs.map +1 -1
  156. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  157. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs.map +1 -1
  158. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  159. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs.map +1 -1
  160. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  161. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs.map +1 -1
  162. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  163. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs.map +1 -1
  164. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  165. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs.map +1 -1
  166. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  167. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs.map +1 -1
  168. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  169. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs.map +1 -1
  170. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  171. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
  172. package/dist/custom_auth/index.mjs +1 -1
  173. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  174. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs.map +1 -1
  175. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  176. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs.map +1 -1
  177. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  178. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs.map +1 -1
  179. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  180. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs.map +1 -1
  181. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  182. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs.map +1 -1
  183. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  184. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs.map +1 -1
  185. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +3 -3
  186. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs.map +1 -1
  187. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  188. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs.map +1 -1
  189. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  190. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs.map +1 -1
  191. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +2 -2
  192. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs.map +1 -1
  193. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  194. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs.map +1 -1
  195. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +3 -3
  196. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs.map +1 -1
  197. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  198. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs.map +1 -1
  199. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  200. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs.map +1 -1
  201. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  202. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs.map +1 -1
  203. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  204. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
  205. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  206. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
  207. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  208. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +1 -1
  209. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +2 -2
  210. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs.map +1 -1
  211. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  212. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs.map +1 -1
  213. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +2 -2
  214. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs.map +1 -1
  215. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  216. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs.map +1 -1
  217. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +2 -2
  218. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs.map +1 -1
  219. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  220. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs.map +1 -1
  221. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +2 -2
  222. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs.map +1 -1
  223. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  224. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  225. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs.map +1 -1
  226. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  227. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs.map +1 -1
  228. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  229. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs.map +1 -1
  230. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  231. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs.map +1 -1
  232. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  233. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs.map +1 -1
  234. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  235. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs.map +1 -1
  236. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +2 -2
  237. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs.map +1 -1
  238. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +3 -3
  239. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs.map +1 -1
  240. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  241. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs.map +1 -1
  242. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  243. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs.map +1 -1
  244. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +2 -2
  245. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs.map +1 -1
  246. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  247. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs.map +1 -1
  248. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +5 -5
  249. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs.map +1 -1
  250. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  251. package/dist/encode/Base64Decode.mjs +1 -1
  252. package/dist/encode/Base64Encode.mjs +1 -1
  253. package/dist/error/BrowserAuthError.mjs +1 -1
  254. package/dist/error/BrowserAuthError.mjs.map +1 -1
  255. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  256. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  257. package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
  258. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  259. package/dist/error/NativeAuthError.mjs +1 -1
  260. package/dist/error/NativeAuthError.mjs.map +1 -1
  261. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  262. package/dist/error/NestedAppAuthError.mjs +1 -1
  263. package/dist/error/NestedAppAuthError.mjs.map +1 -1
  264. package/dist/event/EventHandler.mjs +7 -6
  265. package/dist/event/EventHandler.mjs.map +1 -1
  266. package/dist/event/EventMessage.mjs +1 -1
  267. package/dist/event/EventMessage.mjs.map +1 -1
  268. package/dist/event/EventType.mjs +1 -1
  269. package/dist/event/EventType.mjs.map +1 -1
  270. package/dist/index.mjs +1 -1
  271. package/dist/index.mjs.map +1 -1
  272. package/dist/interaction_client/BaseInteractionClient.mjs +10 -6
  273. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  274. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  275. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs.map +1 -1
  276. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +5 -5
  277. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  278. package/dist/interaction_client/PopupClient.mjs +9 -9
  279. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  280. package/dist/interaction_client/RedirectClient.mjs +16 -13
  281. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  282. package/dist/interaction_client/SilentAuthCodeClient.mjs +2 -2
  283. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  284. package/dist/interaction_client/SilentCacheClient.mjs +2 -2
  285. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  286. package/dist/interaction_client/SilentIframeClient.mjs +42 -20
  287. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  288. package/dist/interaction_client/SilentRefreshClient.mjs +2 -2
  289. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  290. package/dist/interaction_client/StandardInteractionClient.mjs +2 -2
  291. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  292. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  293. package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
  294. package/dist/interaction_handler/SilentHandler.mjs +12 -26
  295. package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
  296. package/dist/log-strings-mapping.json +7 -3
  297. package/dist/naa/BridgeError.mjs +1 -1
  298. package/dist/naa/BridgeProxy.mjs +2 -2
  299. package/dist/naa/BridgeProxy.mjs.map +1 -1
  300. package/dist/naa/BridgeStatusCode.mjs +1 -1
  301. package/dist/naa/BridgeStatusCode.mjs.map +1 -1
  302. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  303. package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
  304. package/dist/navigation/NavigationClient.mjs +1 -1
  305. package/dist/navigation/NavigationClient.mjs.map +1 -1
  306. package/dist/network/FetchClient.mjs +1 -1
  307. package/dist/network/FetchClient.mjs.map +1 -1
  308. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  309. package/dist/operatingcontext/BaseOperatingContext.mjs.map +1 -1
  310. package/dist/operatingcontext/NestedAppOperatingContext.mjs +3 -3
  311. package/dist/operatingcontext/NestedAppOperatingContext.mjs.map +1 -1
  312. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  313. package/dist/operatingcontext/StandardOperatingContext.mjs.map +1 -1
  314. package/dist/packageMetadata.mjs +2 -2
  315. package/dist/protocol/Authorize.mjs +1 -1
  316. package/dist/protocol/Authorize.mjs.map +1 -1
  317. package/dist/redirect_bridge/index.mjs +1 -1
  318. package/dist/redirect_bridge/index.mjs.map +1 -1
  319. package/dist/request/RequestHelpers.mjs +2 -2
  320. package/dist/request/RequestHelpers.mjs.map +1 -1
  321. package/dist/response/ResponseHandler.mjs +4 -4
  322. package/dist/response/ResponseHandler.mjs.map +1 -1
  323. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  324. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  325. package/dist/telemetry/BrowserPerformanceEvents.mjs +2 -3
  326. package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
  327. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  328. package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
  329. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  330. package/dist/utils/BrowserConstants.mjs +1 -1
  331. package/dist/utils/BrowserConstants.mjs.map +1 -1
  332. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  333. package/dist/utils/BrowserProtocolUtils.mjs.map +1 -1
  334. package/dist/utils/BrowserUtils.mjs +5 -3
  335. package/dist/utils/BrowserUtils.mjs.map +1 -1
  336. package/dist/utils/Helpers.mjs +1 -1
  337. package/dist/utils/Helpers.mjs.map +1 -1
  338. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  339. package/dist/utils/MsalFrameStatsUtils.mjs.map +1 -1
  340. package/lib/custom-auth-path/log-strings-mapping.json +7 -3
  341. package/lib/custom-auth-path/msal-custom-auth.cjs +6174 -5994
  342. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  343. package/lib/custom-auth-path/msal-custom-auth.js +6065 -5889
  344. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  345. package/lib/log-strings-mapping.json +7 -3
  346. package/lib/msal-browser.cjs +6880 -6690
  347. package/lib/msal-browser.cjs.map +1 -1
  348. package/lib/msal-browser.js +6880 -6690
  349. package/lib/msal-browser.js.map +1 -1
  350. package/lib/msal-browser.min.js +2 -2
  351. package/lib/redirect-bridge/msal-redirect-bridge.cjs +39 -39
  352. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  353. package/lib/redirect-bridge/msal-redirect-bridge.js +39 -39
  354. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  355. package/lib/redirect-bridge/msal-redirect-bridge.min.js +2 -2
  356. package/package.json +5 -6
  357. package/src/cache/BrowserCacheManager.ts +141 -34
  358. package/src/cache/TokenCache.ts +7 -1
  359. package/src/config/Configuration.ts +17 -2
  360. package/src/controllers/StandardController.ts +6 -6
  361. package/src/custom_auth/controller/CustomAuthStandardController.ts +2 -4
  362. package/src/event/EventHandler.ts +2 -1
  363. package/src/interaction_client/BaseInteractionClient.ts +14 -4
  364. package/src/interaction_client/PlatformAuthInteractionClient.ts +9 -3
  365. package/src/interaction_client/PopupClient.ts +9 -3
  366. package/src/interaction_client/RedirectClient.ts +27 -8
  367. package/src/interaction_client/SilentAuthCodeClient.ts +3 -1
  368. package/src/interaction_client/SilentCacheClient.ts +3 -1
  369. package/src/interaction_client/SilentIframeClient.ts +94 -58
  370. package/src/interaction_client/SilentRefreshClient.ts +3 -1
  371. package/src/interaction_handler/SilentHandler.ts +11 -32
  372. package/src/packageMetadata.ts +1 -1
  373. package/src/telemetry/BrowserPerformanceEvents.ts +0 -1
  374. package/src/utils/BrowserUtils.ts +3 -1
  375. package/types/cache/BrowserCacheManager.d.ts +18 -1
  376. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  377. package/types/cache/TokenCache.d.ts.map +1 -1
  378. package/types/config/Configuration.d.ts +10 -1
  379. package/types/config/Configuration.d.ts.map +1 -1
  380. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  381. package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
  382. package/types/event/EventHandler.d.ts.map +1 -1
  383. package/types/interaction_client/BaseInteractionClient.d.ts +2 -1
  384. package/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  385. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  386. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  387. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  388. package/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  389. package/types/interaction_client/SilentCacheClient.d.ts.map +1 -1
  390. package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  391. package/types/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  392. package/types/interaction_handler/SilentHandler.d.ts +13 -6
  393. package/types/interaction_handler/SilentHandler.d.ts.map +1 -1
  394. package/types/packageMetadata.d.ts +1 -1
  395. package/types/telemetry/BrowserPerformanceEvents.d.ts +0 -1
  396. package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
  397. package/types/utils/BrowserUtils.d.ts +3 -1
  398. package/types/utils/BrowserUtils.d.ts.map +1 -1
@@ -43,6 +43,7 @@ import * as BrowserRootPerformanceEvents from "../telemetry/BrowserRootPerforman
43
43
  import { ApiId } from "../utils/BrowserConstants.js";
44
44
  import * as BrowserUtils from "../utils/BrowserUtils.js";
45
45
  import { BrowserCacheManager } from "./BrowserCacheManager.js";
46
+ import { name, version } from "../packageMetadata.js";
46
47
 
47
48
  export type LoadTokenOptions = {
48
49
  clientInfo?: string;
@@ -91,7 +92,11 @@ export async function loadExternalTokens(
91
92
  authorityMetadata: browserConfig.auth.authorityMetadata,
92
93
  };
93
94
 
94
- const logger = new Logger(browserConfig.system.loggerOptions || {});
95
+ const logger = new Logger(
96
+ browserConfig.system.loggerOptions || {},
97
+ name,
98
+ version
99
+ );
95
100
  const cryptoOps = new CryptoOps(logger, browserConfig.telemetry.client);
96
101
  const storage = new BrowserCacheManager(
97
102
  browserConfig.auth.clientId,
@@ -102,6 +107,7 @@ export async function loadExternalTokens(
102
107
  new EventHandler(logger),
103
108
  buildStaticAuthorityOptions(browserConfig.auth)
104
109
  );
110
+ await storage.initialize(correlationId);
105
111
 
106
112
  const authorityString =
107
113
  request.authority || browserConfig.auth.authority;
@@ -26,6 +26,7 @@ import { BrowserCacheLocation } from "../utils/BrowserConstants.js";
26
26
  import { INavigationClient } from "../navigation/INavigationClient.js";
27
27
  import { NavigationClient } from "../navigation/NavigationClient.js";
28
28
  import { FetchClient } from "../network/FetchClient.js";
29
+ import { name, version } from "../packageMetadata.js";
29
30
 
30
31
  // Default timeout for popup windows and iframes in milliseconds
31
32
  export const DEFAULT_POPUP_TIMEOUT_MS = 60000;
@@ -167,9 +168,18 @@ export type BrowserSystemOptions = SystemOptions & {
167
168
  * Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
168
169
  */
169
170
  protocolMode?: ProtocolMode;
171
+ /**
172
+ * @deprecated This option will be removed in a future release.
173
+ * Flag to enable emitting telemetry to the STS. When disabled, failed requests are not cached to browser storage and x-client-current-telemetry, x-client-last-telemetry parameters are not sent to the STS. Defaults to false.
174
+ */
175
+ serverTelemetryEnabled?: boolean;
170
176
  };
171
177
 
172
- /** @internal */
178
+ /**
179
+ * Options for configuring experimental features. These features do not follow
180
+ * semver and may be changed or removed without a major version bump. Use with caution.
181
+ * @public
182
+ */
173
183
  export type BrowserExperimentalOptions = {
174
184
  /**
175
185
  * Enables iframe timeout telemetry experiment for silent iframe bridge monitoring.
@@ -315,6 +325,7 @@ export function buildConfiguration(
315
325
  userInputSystem?.nativeBrokerHandshakeTimeout ||
316
326
  DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,
317
327
  protocolMode: ProtocolMode.AAD,
328
+ serverTelemetryEnabled: false,
318
329
  };
319
330
 
320
331
  const providedSystemOptions: Required<BrowserSystemOptions> = {
@@ -341,7 +352,11 @@ export function buildConfiguration(
341
352
  userInputSystem?.protocolMode !== ProtocolMode.OIDC &&
342
353
  userInputAuth?.OIDCOptions
343
354
  ) {
344
- const logger = new Logger(providedSystemOptions.loggerOptions);
355
+ const logger = new Logger(
356
+ providedSystemOptions.loggerOptions,
357
+ name,
358
+ version
359
+ );
345
360
  logger.warning(
346
361
  JSON.stringify(
347
362
  createClientConfigurationError(
@@ -657,6 +657,12 @@ export class StandardController implements IController {
657
657
  const correlationId = this.getRequestCorrelationId(request);
658
658
  this.logger.verbose("acquireTokenRedirect called", correlationId);
659
659
 
660
+ BrowserUtils.redirectPreflightCheck(this.initialized, this.config);
661
+ this.browserStorage.setInteractionInProgress(
662
+ true,
663
+ INTERACTION_TYPE.SIGNIN
664
+ );
665
+
660
666
  const atrMeasurement = this.performanceClient.startMeasurement(
661
667
  BrowserRootPerformanceEvents.AcquireTokenPreRedirect,
662
668
  correlationId
@@ -684,13 +690,7 @@ export class StandardController implements IController {
684
690
  };
685
691
 
686
692
  try {
687
- BrowserUtils.redirectPreflightCheck(this.initialized, this.config);
688
693
  enforceResourceParameter(this.config.auth.isMcp, request);
689
- this.browserStorage.setInteractionInProgress(
690
- true,
691
- INTERACTION_TYPE.SIGNIN
692
- );
693
-
694
694
  this.eventHandler.emitEvent(
695
695
  EventType.ACQUIRE_TOKEN_START,
696
696
  correlationId,
@@ -59,6 +59,7 @@ import { SignUpCodeRequiredState } from "../sign_up/auth_flow/state/SignUpCodeRe
59
59
  import { SignUpPasswordRequiredState } from "../sign_up/auth_flow/state/SignUpPasswordRequiredState.js";
60
60
  import { ResetPasswordCodeRequiredState } from "../reset_password/auth_flow/state/ResetPasswordCodeRequiredState.js";
61
61
  import { StandardController } from "../../controllers/StandardController.js";
62
+ import { name } from "../../packageMetadata.js";
62
63
 
63
64
  /*
64
65
  * Controller for standard native auth operations.
@@ -95,10 +96,7 @@ export class CustomAuthStandardController
95
96
  throw new UnsupportedEnvironmentError();
96
97
  }
97
98
 
98
- this.logger = this.logger.clone(
99
- DefaultPackageInfo.SKU,
100
- DefaultPackageInfo.VERSION
101
- );
99
+ this.logger = this.logger.clone(name, DefaultPackageInfo.VERSION);
102
100
  this.customAuthConfig = operatingContext.getCustomAuthConfig();
103
101
 
104
102
  this.authority = new CustomAuthAuthority(
@@ -13,6 +13,7 @@ import {
13
13
  } from "./EventMessage.js";
14
14
  import { EventType } from "./EventType.js";
15
15
  import { createGuid } from "../utils/BrowserUtils.js";
16
+ import { version, name } from "../packageMetadata.js";
16
17
 
17
18
  const BROADCAST_CHANNEL_NAME = "msal.broadcast.event";
18
19
 
@@ -27,7 +28,7 @@ export class EventHandler {
27
28
 
28
29
  constructor(logger?: Logger) {
29
30
  this.eventCallbacks = new Map();
30
- this.logger = logger || new Logger({});
31
+ this.logger = logger || new Logger({}, name, version);
31
32
  if (typeof BroadcastChannel !== "undefined") {
32
33
  this.broadcastChannel = new BroadcastChannel(
33
34
  BROADCAST_CHANNEL_NAME
@@ -10,6 +10,7 @@ import {
10
10
  AccountInfo,
11
11
  UrlString,
12
12
  ServerTelemetryManager,
13
+ StubServerTelemetryManager,
13
14
  ServerTelemetryRequest,
14
15
  createClientConfigurationError,
15
16
  ClientConfigurationErrorCodes,
@@ -29,8 +30,7 @@ import { EndSessionRequest } from "../request/EndSessionRequest.js";
29
30
  import { RedirectRequest } from "../request/RedirectRequest.js";
30
31
  import { PopupRequest } from "../request/PopupRequest.js";
31
32
  import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
32
- import { version } from "../packageMetadata.js";
33
- import { BrowserConstants } from "../utils/BrowserConstants.js";
33
+ import { version, name } from "../packageMetadata.js";
34
34
  import * as BrowserUtils from "../utils/BrowserUtils.js";
35
35
  import { INavigationClient } from "../navigation/INavigationClient.js";
36
36
  import { AuthenticationResult } from "../response/AuthenticationResult.js";
@@ -68,7 +68,7 @@ export abstract class BaseInteractionClient {
68
68
  this.navigationClient = navigationClient;
69
69
  this.platformAuthProvider = platformAuthProvider;
70
70
  this.correlationId = correlationId;
71
- this.logger = logger.clone(BrowserConstants.MSAL_SKU, version);
71
+ this.logger = logger.clone(name, version);
72
72
  this.performanceClient = performanceClient;
73
73
  }
74
74
 
@@ -108,6 +108,7 @@ export function getRedirectUri(
108
108
  * @param browserStorage - Browser cache manager instance for storing telemetry data
109
109
  * @param logger - Optional logger instance for verbose logging
110
110
  * @param forceRefresh - Optional flag to force refresh of telemetry data
111
+ * @param enabled - Optional flag to enable or disable server telemetry (default: true for custom_auth flows, false for standard flows)
111
112
  * @returns Configured ServerTelemetryManager instance
112
113
  */
113
114
  export function initializeServerTelemetryManager(
@@ -116,9 +117,18 @@ export function initializeServerTelemetryManager(
116
117
  correlationId: string,
117
118
  browserStorage: BrowserCacheManager,
118
119
  logger: Logger,
119
- forceRefresh?: boolean
120
+ forceRefresh?: boolean,
121
+ enabled: boolean = true
120
122
  ): ServerTelemetryManager {
121
123
  logger.verbose("initializeServerTelemetryManager called", correlationId);
124
+ if (!enabled) {
125
+ logger.verbose(
126
+ "Server telemetry is disabled in configuration. Skipping telemetry manager initialization.",
127
+ correlationId
128
+ );
129
+ return new StubServerTelemetryManager();
130
+ }
131
+
122
132
  const telemetryPayload: ServerTelemetryRequest = {
123
133
  clientId: clientId,
124
134
  correlationId: correlationId,
@@ -177,7 +177,9 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
177
177
  this.config.auth.clientId,
178
178
  this.correlationId,
179
179
  this.browserStorage,
180
- this.logger
180
+ this.logger,
181
+ undefined,
182
+ this.config.system.serverTelemetryEnabled
181
183
  );
182
184
 
183
185
  try {
@@ -369,7 +371,9 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
369
371
  this.config.auth.clientId,
370
372
  this.correlationId,
371
373
  this.browserStorage,
372
- this.logger
374
+ this.logger,
375
+ undefined,
376
+ this.config.system.serverTelemetryEnabled
373
377
  );
374
378
  serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
375
379
  if (isFatalNativeAuthError(e)) {
@@ -472,7 +476,9 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
472
476
  this.config.auth.clientId,
473
477
  this.correlationId,
474
478
  this.browserStorage,
475
- this.logger
479
+ this.logger,
480
+ undefined,
481
+ this.config.system.serverTelemetryEnabled
476
482
  );
477
483
  serverTelemetryManager.clearNativeBrokerErrorCode();
478
484
  this.performanceClient?.addFields(
@@ -316,7 +316,9 @@ export class PopupClient extends StandardInteractionClient {
316
316
  this.config.auth.clientId,
317
317
  this.correlationId,
318
318
  this.browserStorage,
319
- this.logger
319
+ this.logger,
320
+ undefined,
321
+ this.config.system.serverTelemetryEnabled
320
322
  );
321
323
 
322
324
  const pkce =
@@ -543,7 +545,9 @@ export class PopupClient extends StandardInteractionClient {
543
545
  this.config.auth.clientId,
544
546
  correlationId,
545
547
  this.browserStorage,
546
- this.logger
548
+ this.logger,
549
+ undefined,
550
+ this.config.system.serverTelemetryEnabled
547
551
  ),
548
552
  requestAuthority: request.authority,
549
553
  requestAzureCloudOptions: request.azureCloudOptions,
@@ -703,7 +707,9 @@ export class PopupClient extends StandardInteractionClient {
703
707
  this.config.auth.clientId,
704
708
  this.correlationId,
705
709
  this.browserStorage,
706
- this.logger
710
+ this.logger,
711
+ undefined,
712
+ this.config.system.serverTelemetryEnabled
707
713
  );
708
714
 
709
715
  try {
@@ -197,7 +197,9 @@ export class RedirectClient extends StandardInteractionClient {
197
197
  this.config.auth.clientId,
198
198
  this.correlationId,
199
199
  this.browserStorage,
200
- this.logger
200
+ this.logger,
201
+ undefined,
202
+ this.config.system.serverTelemetryEnabled
201
203
  );
202
204
 
203
205
  const pkceCodes = await invokeAsync(
@@ -417,7 +419,9 @@ export class RedirectClient extends StandardInteractionClient {
417
419
  this.config.auth.clientId,
418
420
  this.correlationId,
419
421
  this.browserStorage,
420
- this.logger
422
+ this.logger,
423
+ undefined,
424
+ this.config.system.serverTelemetryEnabled
421
425
  );
422
426
 
423
427
  const navigateToLoginRequestUrl =
@@ -455,9 +459,15 @@ export class RedirectClient extends StandardInteractionClient {
455
459
  true
456
460
  ) || "";
457
461
  const loginRequestUrlNormalized =
458
- UrlUtils.normalizeUrlForComparison(loginRequestUrl);
462
+ UrlUtils.normalizeUrlForComparison(
463
+ loginRequestUrl,
464
+ this.logger,
465
+ this.correlationId
466
+ );
459
467
  const currentUrlNormalized = UrlUtils.normalizeUrlForComparison(
460
- window.location.href
468
+ window.location.href,
469
+ this.logger,
470
+ this.correlationId
461
471
  );
462
472
 
463
473
  if (
@@ -518,8 +528,8 @@ export class RedirectClient extends StandardInteractionClient {
518
528
  * The start page is expected to also call handleRedirectPromise which will process the hash in one of the checks above.
519
529
  */
520
530
  let processHashOnRedirect: boolean = true;
521
- if (!loginRequestUrl || loginRequestUrl === "null") {
522
- // Redirect to home page if login request url is null (real null or the string null)
531
+ if (!loginRequestUrl) {
532
+ // Redirect to home page if login request url is empty
523
533
  const homepage = BrowserUtils.getHomepage();
524
534
  // Cache the homepage under ORIGIN_URI to ensure cached hash is processed on homepage
525
535
  this.browserStorage.setTemporaryCache(
@@ -820,7 +830,9 @@ export class RedirectClient extends StandardInteractionClient {
820
830
  this.config.auth.clientId,
821
831
  this.correlationId,
822
832
  this.browserStorage,
823
- this.logger
833
+ this.logger,
834
+ undefined,
835
+ this.config.system.serverTelemetryEnabled
824
836
  );
825
837
 
826
838
  try {
@@ -974,9 +986,16 @@ export class RedirectClient extends StandardInteractionClient {
974
986
  */
975
987
  protected getRedirectStartPage(requestStartPage?: string): string {
976
988
  const redirectStartPage = requestStartPage || window.location.href;
977
- return UrlString.getAbsoluteUrl(
989
+ const absoluteRedirectStartPage = UrlString.getAbsoluteUrl(
978
990
  redirectStartPage,
979
991
  BrowserUtils.getCurrentUri()
980
992
  );
993
+ // Sanity check the URL before it is cached so we never persist a malformed value (e.g. the literal string "null")
994
+ UrlUtils.validateUrl(
995
+ absoluteRedirectStartPage,
996
+ this.logger,
997
+ this.correlationId
998
+ );
999
+ return absoluteRedirectStartPage;
981
1000
  }
982
1001
  }
@@ -104,7 +104,9 @@ export class SilentAuthCodeClient extends StandardInteractionClient {
104
104
  this.config.auth.clientId,
105
105
  this.correlationId,
106
106
  this.browserStorage,
107
- this.logger
107
+ this.logger,
108
+ undefined,
109
+ this.config.system.serverTelemetryEnabled
108
110
  );
109
111
 
110
112
  try {
@@ -36,7 +36,9 @@ export class SilentCacheClient extends StandardInteractionClient {
36
36
  this.config.auth.clientId,
37
37
  this.correlationId,
38
38
  this.browserStorage,
39
- this.logger
39
+ this.logger,
40
+ undefined,
41
+ this.config.system.serverTelemetryEnabled
40
42
  );
41
43
 
42
44
  const clientConfig = await invokeAsync(
@@ -37,6 +37,7 @@ import {
37
37
  BrowserConstants,
38
38
  } from "../utils/BrowserConstants.js";
39
39
  import {
40
+ createHiddenIframe,
40
41
  initiateCodeRequest,
41
42
  initiateCodeFlowWithPost,
42
43
  initiateEarRequest,
@@ -199,7 +200,9 @@ export class SilentIframeClient extends StandardInteractionClient {
199
200
  this.config.auth.clientId,
200
201
  this.correlationId,
201
202
  this.browserStorage,
202
- this.logger
203
+ this.logger,
204
+ undefined,
205
+ this.config.system.serverTelemetryEnabled
203
206
  );
204
207
 
205
208
  try {
@@ -307,30 +310,45 @@ export class SilentIframeClient extends StandardInteractionClient {
307
310
  earJwk: earJwk,
308
311
  codeChallenge: pkceCodes.challenge,
309
312
  };
310
- const iframe = await invokeAsync(
311
- initiateEarRequest,
312
- BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
313
- this.logger,
314
- this.performanceClient,
315
- correlationId
316
- )(
317
- this.config,
318
- discoveredAuthority,
319
- silentRequest,
320
- this.logger,
321
- this.performanceClient
322
- );
313
+
314
+ // Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
315
+ const iframe = createHiddenIframe();
323
316
 
324
317
  const responseType = this.config.auth.OIDCOptions.responseMode;
325
318
  let responseString: string;
326
319
  try {
327
- responseString = await invokeAsync(
320
+ const responsePromise = invokeAsync(
328
321
  this.waitForIframeResponse.bind(this),
329
322
  BrowserPerformanceEvents.SilentHandlerMonitorIframeForHash,
330
323
  this.logger,
331
324
  this.performanceClient,
332
325
  correlationId
333
326
  )(iframe, request);
327
+ responsePromise.catch(() => {
328
+ /*
329
+ * If navigation below throws before responsePromise is awaited,
330
+ * the listener still rejects on timeout. Swallow it here so it
331
+ * does not surface as an unhandled rejection; the navigation
332
+ * error is propagated instead.
333
+ */
334
+ });
335
+
336
+ await invokeAsync(
337
+ initiateEarRequest,
338
+ BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
339
+ this.logger,
340
+ this.performanceClient,
341
+ correlationId
342
+ )(
343
+ iframe,
344
+ this.config,
345
+ discoveredAuthority,
346
+ silentRequest,
347
+ this.logger,
348
+ this.performanceClient
349
+ );
350
+
351
+ responseString = await responsePromise;
334
352
  } finally {
335
353
  invoke(
336
354
  removeHiddenIframe,
@@ -363,7 +381,9 @@ export class SilentIframeClient extends StandardInteractionClient {
363
381
  this.config.auth.clientId,
364
382
  correlationId,
365
383
  this.browserStorage,
366
- this.logger
384
+ this.logger,
385
+ undefined,
386
+ this.config.system.serverTelemetryEnabled
367
387
  ),
368
388
  requestAuthority: request.authority,
369
389
  requestAzureCloudOptions: request.azureCloudOptions,
@@ -457,7 +477,9 @@ export class SilentIframeClient extends StandardInteractionClient {
457
477
  this.config.auth.clientId,
458
478
  this.correlationId,
459
479
  this.browserStorage,
460
- this.logger
480
+ this.logger,
481
+ undefined,
482
+ this.config.system.serverTelemetryEnabled
461
483
  ),
462
484
  requestAuthority: silentRequest.authority,
463
485
  requestAzureCloudOptions: silentRequest.azureCloudOptions,
@@ -571,58 +593,72 @@ export class SilentIframeClient extends StandardInteractionClient {
571
593
  codeChallenge: pkceCodes.challenge,
572
594
  };
573
595
 
574
- let iframe: HTMLIFrameElement;
575
- if (request.httpMethod === Constants.HttpMethod.POST) {
576
- iframe = await invokeAsync(
577
- initiateCodeFlowWithPost,
578
- BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
579
- this.logger,
580
- this.performanceClient,
581
- correlationId
582
- )(
583
- this.config,
584
- authClient.authority,
585
- silentRequest,
586
- this.logger,
587
- this.performanceClient
588
- );
589
- } else {
590
- // Create authorize request url
591
- const navigateUrl = await invokeAsync(
592
- Authorize.getAuthCodeRequestUrl,
593
- PerformanceEvents.GetAuthCodeUrl,
594
- this.logger,
595
- this.performanceClient,
596
- correlationId
597
- )(
598
- this.config,
599
- authClient.authority,
600
- silentRequest,
601
- this.logger,
602
- this.performanceClient
603
- );
604
-
605
- // Get the frame handle for the silent request
606
- iframe = await invokeAsync(
607
- initiateCodeRequest,
608
- BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
609
- this.logger,
610
- this.performanceClient,
611
- correlationId
612
- )(navigateUrl, this.performanceClient, this.logger, correlationId);
613
- }
596
+ // Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
597
+ const iframe = createHiddenIframe();
614
598
 
615
599
  const responseType = this.config.auth.OIDCOptions.responseMode;
616
600
  // Wait for response from the redirect bridge.
617
601
  let responseString: string;
618
602
  try {
619
- responseString = await invokeAsync(
603
+ const responsePromise = invokeAsync(
620
604
  this.waitForIframeResponse.bind(this),
621
605
  BrowserPerformanceEvents.SilentHandlerMonitorIframeForHash,
622
606
  this.logger,
623
607
  this.performanceClient,
624
608
  correlationId
625
609
  )(iframe, request);
610
+ responsePromise.catch(() => {
611
+ /*
612
+ * If URL creation or navigation below throws before
613
+ * responsePromise is awaited, the listener still rejects on
614
+ * timeout. Swallow it here so it does not surface as an
615
+ * unhandled rejection; the navigation error is propagated
616
+ * instead.
617
+ */
618
+ });
619
+
620
+ if (request.httpMethod === Constants.HttpMethod.POST) {
621
+ await invokeAsync(
622
+ initiateCodeFlowWithPost,
623
+ BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
624
+ this.logger,
625
+ this.performanceClient,
626
+ correlationId
627
+ )(
628
+ iframe,
629
+ this.config,
630
+ authClient.authority,
631
+ silentRequest,
632
+ this.logger,
633
+ this.performanceClient
634
+ );
635
+ } else {
636
+ // Create authorize request url
637
+ const navigateUrl = await invokeAsync(
638
+ Authorize.getAuthCodeRequestUrl,
639
+ PerformanceEvents.GetAuthCodeUrl,
640
+ this.logger,
641
+ this.performanceClient,
642
+ correlationId
643
+ )(
644
+ this.config,
645
+ authClient.authority,
646
+ silentRequest,
647
+ this.logger,
648
+ this.performanceClient
649
+ );
650
+
651
+ // Navigate the iframe to the authorize request url
652
+ await invokeAsync(
653
+ initiateCodeRequest,
654
+ BrowserPerformanceEvents.SilentHandlerInitiateAuthRequest,
655
+ this.logger,
656
+ this.performanceClient,
657
+ correlationId
658
+ )(iframe, navigateUrl, this.logger, correlationId);
659
+ }
660
+
661
+ responseString = await responsePromise;
626
662
  } finally {
627
663
  invoke(
628
664
  removeHiddenIframe,
@@ -68,7 +68,9 @@ export class SilentRefreshClient extends StandardInteractionClient {
68
68
  this.config.auth.clientId,
69
69
  this.correlationId,
70
70
  this.browserStorage,
71
- this.logger
71
+ this.logger,
72
+ undefined,
73
+ this.config.system.serverTelemetryEnabled
72
74
  );
73
75
 
74
76
  const refreshTokenClient = await this.createRefreshTokenClient({