@azure/msal-browser 5.14.0 → 5.15.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 (448) hide show
  1. package/dist/app/IPublicClientApplication.mjs +16 -16
  2. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  3. package/dist/app/PublicClientApplication.mjs +1 -1
  4. package/dist/app/PublicClientApplication.mjs.map +1 -1
  5. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +3 -3
  7. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
  8. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +7 -7
  9. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
  10. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +2 -2
  11. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
  12. package/dist/cache/AccountManager.mjs +1 -1
  13. package/dist/cache/AccountManager.mjs.map +1 -1
  14. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  15. package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
  16. package/dist/cache/BrowserCacheManager.mjs +10 -10
  17. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  18. package/dist/cache/CacheHelpers.mjs +1 -1
  19. package/dist/cache/CacheHelpers.mjs.map +1 -1
  20. package/dist/cache/CacheKeys.mjs +1 -1
  21. package/dist/cache/CacheKeys.mjs.map +1 -1
  22. package/dist/cache/CookieStorage.mjs +4 -4
  23. package/dist/cache/CookieStorage.mjs.map +1 -1
  24. package/dist/cache/DatabaseStorage.mjs +7 -7
  25. package/dist/cache/DatabaseStorage.mjs.map +1 -1
  26. package/dist/cache/EncryptedData.mjs +1 -1
  27. package/dist/cache/LocalStorage.mjs +5 -5
  28. package/dist/cache/LocalStorage.mjs.map +1 -1
  29. package/dist/cache/MemoryStorage.mjs +1 -1
  30. package/dist/cache/MemoryStorage.mjs.map +1 -1
  31. package/dist/cache/SessionStorage.mjs +2 -2
  32. package/dist/cache/SessionStorage.mjs.map +1 -1
  33. package/dist/cache/TokenCache.mjs +7 -7
  34. package/dist/cache/TokenCache.mjs.map +1 -1
  35. package/dist/config/Configuration.mjs +3 -3
  36. package/dist/config/Configuration.mjs.map +1 -1
  37. package/dist/controllers/NestedAppAuthController.mjs +14 -15
  38. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  39. package/dist/controllers/StandardController.mjs +12 -12
  40. package/dist/controllers/StandardController.mjs.map +1 -1
  41. package/dist/crypto/BrowserCrypto.mjs +7 -7
  42. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  43. package/dist/crypto/CryptoOps.mjs +3 -3
  44. package/dist/crypto/CryptoOps.mjs.map +1 -1
  45. package/dist/crypto/PkceGenerator.mjs +3 -3
  46. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  47. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  48. package/dist/crypto/SignedHttpRequest.mjs.map +1 -1
  49. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  50. package/dist/custom_auth/CustomAuthConstants.mjs.map +1 -1
  51. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  52. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  53. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  54. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  55. package/dist/custom_auth/core/CustomAuthAuthority.mjs +2 -2
  56. package/dist/custom_auth/core/CustomAuthAuthority.mjs.map +1 -1
  57. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  58. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs.map +1 -1
  59. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  60. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs.map +1 -1
  61. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  62. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs.map +1 -1
  63. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  64. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  65. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs.map +1 -1
  66. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  67. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
  68. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  69. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +1 -1
  70. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  71. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs.map +1 -1
  72. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  73. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs.map +1 -1
  74. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  75. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +1 -1
  76. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  77. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs.map +1 -1
  78. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  79. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
  80. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  81. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +1 -1
  82. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  83. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs.map +1 -1
  84. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  85. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs.map +1 -1
  86. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  87. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
  88. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  89. package/dist/custom_auth/core/error/CustomAuthApiError.mjs.map +1 -1
  90. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  91. package/dist/custom_auth/core/error/CustomAuthError.mjs.map +1 -1
  92. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  93. package/dist/custom_auth/core/error/HttpError.mjs.map +1 -1
  94. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  95. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  96. package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
  97. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  98. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs.map +1 -1
  99. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  100. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  101. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs.map +1 -1
  102. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  103. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs.map +1 -1
  104. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  105. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs.map +1 -1
  106. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  107. package/dist/custom_auth/core/error/ParsedUrlError.mjs.map +1 -1
  108. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  109. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  110. package/dist/custom_auth/core/error/UnexpectedError.mjs.map +1 -1
  111. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  112. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs.map +1 -1
  113. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  114. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs.map +1 -1
  115. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  116. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs.map +1 -1
  117. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  118. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs.map +1 -1
  119. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  120. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs.map +1 -1
  121. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  122. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs.map +1 -1
  123. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  124. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  125. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs.map +1 -1
  126. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  127. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  128. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs.map +1 -1
  129. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  130. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs.map +1 -1
  131. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  132. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  133. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs.map +1 -1
  134. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  135. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs.map +1 -1
  136. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  137. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs.map +1 -1
  138. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  139. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs.map +1 -1
  140. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  141. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  142. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  143. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs.map +1 -1
  144. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  145. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs.map +1 -1
  146. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  147. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  148. package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
  149. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  150. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs.map +1 -1
  151. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  152. package/dist/custom_auth/core/utils/UrlUtils.mjs.map +1 -1
  153. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  154. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs.map +1 -1
  155. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  156. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs.map +1 -1
  157. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  158. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs.map +1 -1
  159. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  160. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs.map +1 -1
  161. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  162. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs.map +1 -1
  163. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  164. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs.map +1 -1
  165. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  166. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs.map +1 -1
  167. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  168. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs.map +1 -1
  169. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +2 -2
  170. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
  171. package/dist/custom_auth/index.mjs +1 -1
  172. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  173. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs.map +1 -1
  174. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  175. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs.map +1 -1
  176. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  177. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs.map +1 -1
  178. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  179. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs.map +1 -1
  180. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  181. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs.map +1 -1
  182. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  183. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs.map +1 -1
  184. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  185. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs.map +1 -1
  186. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  187. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs.map +1 -1
  188. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  189. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs.map +1 -1
  190. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  191. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs.map +1 -1
  192. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  193. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs.map +1 -1
  194. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  195. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs.map +1 -1
  196. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  197. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs.map +1 -1
  198. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  199. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs.map +1 -1
  200. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  201. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs.map +1 -1
  202. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  203. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
  204. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  205. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
  206. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  207. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +1 -1
  208. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  209. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs.map +1 -1
  210. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  211. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs.map +1 -1
  212. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  213. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs.map +1 -1
  214. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  215. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs.map +1 -1
  216. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  217. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs.map +1 -1
  218. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  219. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs.map +1 -1
  220. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  221. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs.map +1 -1
  222. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  223. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  224. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs.map +1 -1
  225. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  226. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs.map +1 -1
  227. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  228. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs.map +1 -1
  229. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  230. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs.map +1 -1
  231. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  232. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs.map +1 -1
  233. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  234. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs.map +1 -1
  235. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  236. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs.map +1 -1
  237. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  238. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs.map +1 -1
  239. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  240. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs.map +1 -1
  241. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  242. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs.map +1 -1
  243. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  244. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs.map +1 -1
  245. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  246. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs.map +1 -1
  247. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  248. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs.map +1 -1
  249. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  250. package/dist/encode/Base64Decode.mjs +2 -2
  251. package/dist/encode/Base64Decode.mjs.map +1 -1
  252. package/dist/encode/Base64Encode.mjs +1 -1
  253. package/dist/error/BrowserAuthError.mjs +5 -5
  254. package/dist/error/BrowserAuthError.mjs.map +1 -1
  255. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  256. package/dist/error/BrowserConfigurationAuthError.mjs +5 -5
  257. package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
  258. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  259. package/dist/error/NativeAuthError.mjs +20 -10
  260. package/dist/error/NativeAuthError.mjs.map +1 -1
  261. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  262. package/dist/error/NestedAppAuthError.mjs +9 -5
  263. package/dist/error/NestedAppAuthError.mjs.map +1 -1
  264. package/dist/event/EventHandler.mjs +1 -1
  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 +4 -4
  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 +23 -19
  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 +13 -13
  281. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  282. package/dist/interaction_client/SilentAuthCodeClient.mjs +4 -4
  283. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  284. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  285. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  286. package/dist/interaction_client/SilentIframeClient.mjs +4 -4
  287. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  288. package/dist/interaction_client/SilentRefreshClient.mjs +3 -3
  289. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  290. package/dist/interaction_client/StandardInteractionClient.mjs +5 -5
  291. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  292. package/dist/interaction_handler/InteractionHandler.mjs +3 -3
  293. package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
  294. package/dist/interaction_handler/SilentHandler.mjs +2 -2
  295. package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
  296. package/dist/log-strings-mapping.json +2 -2
  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 +18 -17
  303. package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
  304. package/dist/navigation/NavigationClient.mjs +2 -2
  305. package/dist/navigation/NavigationClient.mjs.map +1 -1
  306. package/dist/network/FetchClient.mjs +7 -7
  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 +1 -1
  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 +8 -8
  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 +4 -4
  320. package/dist/request/RequestHelpers.mjs.map +1 -1
  321. package/dist/response/ResponseHandler.mjs +8 -8
  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 +1 -1
  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 +4 -4
  333. package/dist/utils/BrowserProtocolUtils.mjs.map +1 -1
  334. package/dist/utils/BrowserUtils.mjs +24 -20
  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 +2 -2
  341. package/lib/custom-auth-path/msal-custom-auth.cjs +4837 -4772
  342. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  343. package/lib/custom-auth-path/msal-custom-auth.js +4837 -4772
  344. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  345. package/lib/log-strings-mapping.json +2 -2
  346. package/lib/msal-browser.cjs +7079 -7012
  347. package/lib/msal-browser.cjs.map +1 -1
  348. package/lib/msal-browser.js +7079 -7012
  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 +80 -76
  352. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  353. package/lib/redirect-bridge/msal-redirect-bridge.js +80 -76
  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 +2 -2
  357. package/src/app/IPublicClientApplication.ts +30 -15
  358. package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +2 -0
  359. package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +8 -2
  360. package/src/broker/nativeBroker/PlatformAuthProvider.ts +2 -1
  361. package/src/cache/BrowserCacheManager.ts +19 -7
  362. package/src/cache/CookieStorage.ts +13 -3
  363. package/src/cache/DatabaseStorage.ts +12 -6
  364. package/src/cache/LocalStorage.ts +8 -4
  365. package/src/cache/SessionStorage.ts +2 -1
  366. package/src/cache/TokenCache.ts +15 -6
  367. package/src/config/Configuration.ts +4 -2
  368. package/src/controllers/NestedAppAuthController.ts +19 -11
  369. package/src/controllers/StandardController.ts +20 -9
  370. package/src/crypto/BrowserCrypto.ts +10 -2
  371. package/src/crypto/CryptoOps.ts +4 -2
  372. package/src/crypto/PkceGenerator.ts +8 -2
  373. package/src/custom_auth/core/CustomAuthAuthority.ts +4 -2
  374. package/src/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.ts +2 -1
  375. package/src/encode/Base64Decode.ts +2 -1
  376. package/src/error/BrowserAuthError.ts +9 -3
  377. package/src/error/BrowserConfigurationAuthError.ts +9 -3
  378. package/src/error/NativeAuthError.ts +44 -11
  379. package/src/error/NestedAppAuthError.ts +14 -4
  380. package/src/interaction_client/BaseInteractionClient.ts +8 -3
  381. package/src/interaction_client/PlatformAuthInteractionClient.ts +49 -21
  382. package/src/interaction_client/PopupClient.ts +14 -8
  383. package/src/interaction_client/RedirectClient.ts +21 -10
  384. package/src/interaction_client/SilentAuthCodeClient.ts +5 -3
  385. package/src/interaction_client/SilentIframeClient.ts +5 -3
  386. package/src/interaction_client/SilentRefreshClient.ts +3 -2
  387. package/src/interaction_client/StandardInteractionClient.ts +8 -4
  388. package/src/interaction_handler/InteractionHandler.ts +4 -2
  389. package/src/interaction_handler/SilentHandler.ts +4 -1
  390. package/src/naa/mapping/NestedAppAuthAdapter.ts +43 -14
  391. package/src/navigation/NavigationClient.ts +1 -0
  392. package/src/network/FetchClient.ts +14 -6
  393. package/src/packageMetadata.ts +1 -1
  394. package/src/protocol/Authorize.ts +23 -7
  395. package/src/request/RequestHelpers.ts +6 -3
  396. package/src/response/ResponseHandler.ts +20 -7
  397. package/src/utils/BrowserProtocolUtils.ts +11 -3
  398. package/src/utils/BrowserUtils.ts +41 -16
  399. package/types/app/IPublicClientApplication.d.ts.map +1 -1
  400. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
  401. package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
  402. package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
  403. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  404. package/types/cache/CookieStorage.d.ts +1 -1
  405. package/types/cache/CookieStorage.d.ts.map +1 -1
  406. package/types/cache/DatabaseStorage.d.ts.map +1 -1
  407. package/types/cache/LocalStorage.d.ts.map +1 -1
  408. package/types/cache/SessionStorage.d.ts.map +1 -1
  409. package/types/cache/TokenCache.d.ts.map +1 -1
  410. package/types/config/Configuration.d.ts.map +1 -1
  411. package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  412. package/types/controllers/StandardController.d.ts.map +1 -1
  413. package/types/crypto/BrowserCrypto.d.ts.map +1 -1
  414. package/types/crypto/CryptoOps.d.ts.map +1 -1
  415. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  416. package/types/custom_auth/core/CustomAuthAuthority.d.ts.map +1 -1
  417. package/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
  418. package/types/encode/Base64Decode.d.ts.map +1 -1
  419. package/types/error/BrowserAuthError.d.ts +2 -2
  420. package/types/error/BrowserAuthError.d.ts.map +1 -1
  421. package/types/error/BrowserConfigurationAuthError.d.ts +2 -2
  422. package/types/error/BrowserConfigurationAuthError.d.ts.map +1 -1
  423. package/types/error/NativeAuthError.d.ts +2 -2
  424. package/types/error/NativeAuthError.d.ts.map +1 -1
  425. package/types/error/NestedAppAuthError.d.ts +2 -2
  426. package/types/error/NestedAppAuthError.d.ts.map +1 -1
  427. package/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  428. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  429. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  430. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  431. package/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  432. package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  433. package/types/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  434. package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  435. package/types/interaction_handler/InteractionHandler.d.ts.map +1 -1
  436. package/types/interaction_handler/SilentHandler.d.ts.map +1 -1
  437. package/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
  438. package/types/navigation/NavigationClient.d.ts.map +1 -1
  439. package/types/network/FetchClient.d.ts.map +1 -1
  440. package/types/packageMetadata.d.ts +1 -1
  441. package/types/protocol/Authorize.d.ts.map +1 -1
  442. package/types/request/RequestHelpers.d.ts.map +1 -1
  443. package/types/response/ResponseHandler.d.ts +1 -1
  444. package/types/response/ResponseHandler.d.ts.map +1 -1
  445. package/types/utils/BrowserProtocolUtils.d.ts +1 -1
  446. package/types/utils/BrowserProtocolUtils.d.ts.map +1 -1
  447. package/types/utils/BrowserUtils.d.ts +2 -2
  448. package/types/utils/BrowserUtils.d.ts.map +1 -1
@@ -1307,7 +1307,8 @@ export class StandardController implements IController {
1307
1307
  if (request.code && request.nativeAccountId) {
1308
1308
  // Throw error in case server returns both spa_code and spa_accountid in exchange for auth code.
1309
1309
  throw createBrowserAuthError(
1310
- BrowserAuthErrorCodes.spaCodeAndNativeAccountIdPresent
1310
+ BrowserAuthErrorCodes.spaCodeAndNativeAccountIdPresent,
1311
+ correlationId
1311
1312
  );
1312
1313
  } else if (request.code) {
1313
1314
  const hybridAuthCode = request.code;
@@ -1404,12 +1405,14 @@ export class StandardController implements IController {
1404
1405
  return result;
1405
1406
  } else {
1406
1407
  throw createBrowserAuthError(
1407
- BrowserAuthErrorCodes.unableToAcquireTokenFromNativePlatform
1408
+ BrowserAuthErrorCodes.unableToAcquireTokenFromNativePlatform,
1409
+ correlationId
1408
1410
  );
1409
1411
  }
1410
1412
  } else {
1411
1413
  throw createBrowserAuthError(
1412
- BrowserAuthErrorCodes.authCodeOrNativeAccountIdRequired
1414
+ BrowserAuthErrorCodes.authCodeOrNativeAccountIdRequired,
1415
+ correlationId
1413
1416
  );
1414
1417
  }
1415
1418
  } catch (e) {
@@ -1505,7 +1508,8 @@ export class StandardController implements IController {
1505
1508
  )(commonRequest);
1506
1509
  default:
1507
1510
  throw createClientAuthError(
1508
- ClientAuthErrorCodes.tokenRefreshRequired
1511
+ ClientAuthErrorCodes.tokenRefreshRequired,
1512
+ commonRequest.correlationId
1509
1513
  );
1510
1514
  }
1511
1515
  }
@@ -1538,7 +1542,8 @@ export class StandardController implements IController {
1538
1542
  )(commonRequest);
1539
1543
  default:
1540
1544
  throw createClientAuthError(
1541
- ClientAuthErrorCodes.tokenRefreshRequired
1545
+ ClientAuthErrorCodes.tokenRefreshRequired,
1546
+ commonRequest.correlationId
1542
1547
  );
1543
1548
  }
1544
1549
  }
@@ -1738,6 +1743,7 @@ export class StandardController implements IController {
1738
1743
  ? TimeUtils.toSecondsFromDate(result.extExpiresOn)
1739
1744
  : 0,
1740
1745
  base64Decode,
1746
+ request.correlationId || "",
1741
1747
  undefined, // refreshOn
1742
1748
  result.tokenType as Constants.AuthenticationScheme,
1743
1749
  undefined, // userAssertionHash
@@ -1784,7 +1790,8 @@ export class StandardController implements IController {
1784
1790
  this.logger.trace("acquireTokenNative called", correlationId);
1785
1791
  if (!this.platformAuthProvider) {
1786
1792
  throw createBrowserAuthError(
1787
- BrowserAuthErrorCodes.nativeConnectionNotEstablished
1793
+ BrowserAuthErrorCodes.nativeConnectionNotEstablished,
1794
+ correlationId
1788
1795
  );
1789
1796
  }
1790
1797
 
@@ -2195,7 +2202,10 @@ export class StandardController implements IController {
2195
2202
 
2196
2203
  const account = request.account || this.getActiveAccount();
2197
2204
  if (!account) {
2198
- throw createBrowserAuthError(BrowserAuthErrorCodes.noAccountError);
2205
+ throw createBrowserAuthError(
2206
+ BrowserAuthErrorCodes.noAccountError,
2207
+ correlationId
2208
+ );
2199
2209
  }
2200
2210
 
2201
2211
  return this.acquireTokenSilentDeduped(request, account, correlationId)
@@ -2219,7 +2229,7 @@ export class StandardController implements IController {
2219
2229
  .catch((error: Error) => {
2220
2230
  if (error instanceof AuthError) {
2221
2231
  // Ensures PWB scenarios can correctly match request to response
2222
- error.setCorrelationId(correlationId);
2232
+ error.correlationId = correlationId;
2223
2233
  }
2224
2234
 
2225
2235
  atsMeasurement.end(
@@ -2530,7 +2540,8 @@ export class StandardController implements IController {
2530
2540
  this.platformAuthProvider = undefined; // Prevent future requests from continuing to attempt
2531
2541
  // Cache will not contain tokens, given that previous WAM requests succeeded. Skip cache and RT renewal and go straight to iframe renewal
2532
2542
  throw createClientAuthError(
2533
- ClientAuthErrorCodes.tokenRefreshRequired
2543
+ ClientAuthErrorCodes.tokenRefreshRequired,
2544
+ silentRequest.correlationId
2534
2545
  );
2535
2546
  }
2536
2547
  throw e;
@@ -59,15 +59,20 @@ export function validateCryptoAvailable(
59
59
  ): void {
60
60
  if (!window) {
61
61
  throw createBrowserAuthError(
62
- BrowserAuthErrorCodes.nonBrowserEnvironment
62
+ BrowserAuthErrorCodes.nonBrowserEnvironment,
63
+ ""
63
64
  );
64
65
  }
65
66
  if (!window.crypto) {
66
- throw createBrowserAuthError(BrowserAuthErrorCodes.cryptoNonExistent);
67
+ throw createBrowserAuthError(
68
+ BrowserAuthErrorCodes.cryptoNonExistent,
69
+ ""
70
+ );
67
71
  }
68
72
  if (!skipValidateSubtleCrypto && !window.crypto.subtle) {
69
73
  throw createBrowserAuthError(
70
74
  BrowserAuthErrorCodes.cryptoNonExistent,
75
+ "",
71
76
  SUBTLE_SUBERROR
72
77
  );
73
78
  }
@@ -260,6 +265,7 @@ export async function decryptEarResponse(
260
265
  if (earJweParts.length !== 5) {
261
266
  throw createBrowserAuthError(
262
267
  BrowserAuthErrorCodes.failedToDecryptEarResponse,
268
+ "",
263
269
  "jwe_length"
264
270
  );
265
271
  }
@@ -267,6 +273,7 @@ export async function decryptEarResponse(
267
273
  const key = await importEarKey(earJwk).catch(() => {
268
274
  throw createBrowserAuthError(
269
275
  BrowserAuthErrorCodes.failedToDecryptEarResponse,
276
+ "",
270
277
  "import_key"
271
278
  );
272
279
  });
@@ -298,6 +305,7 @@ export async function decryptEarResponse(
298
305
  } catch (e) {
299
306
  throw createBrowserAuthError(
300
307
  BrowserAuthErrorCodes.failedToDecryptEarResponse,
308
+ "",
301
309
  "decrypt"
302
310
  );
303
311
  }
@@ -183,7 +183,8 @@ export class CryptoOps implements ICrypto {
183
183
  const keyFound = await this.cache.containsKey(kid, correlationId);
184
184
  if (keyFound) {
185
185
  throw createClientAuthError(
186
- ClientAuthErrorCodes.bindingKeyNotRemoved
186
+ ClientAuthErrorCodes.bindingKeyNotRemoved,
187
+ correlationId
187
188
  );
188
189
  }
189
190
  }
@@ -242,7 +243,8 @@ export class CryptoOps implements ICrypto {
242
243
 
243
244
  if (!cachedKeyPair) {
244
245
  throw createBrowserAuthError(
245
- BrowserAuthErrorCodes.cryptoKeyNotFound
246
+ BrowserAuthErrorCodes.cryptoKeyNotFound,
247
+ correlationId || ""
246
248
  );
247
249
  }
248
250
 
@@ -76,7 +76,10 @@ function generateCodeVerifier(
76
76
  const pkceCodeVerifierB64: string = urlEncodeArr(buffer);
77
77
  return pkceCodeVerifierB64;
78
78
  } catch (e) {
79
- throw createBrowserAuthError(BrowserAuthErrorCodes.pkceNotCreated);
79
+ throw createBrowserAuthError(
80
+ BrowserAuthErrorCodes.pkceNotCreated,
81
+ correlationId
82
+ );
80
83
  }
81
84
  }
82
85
 
@@ -102,6 +105,9 @@ async function generateCodeChallengeFromVerifier(
102
105
  // encode hash as base64
103
106
  return urlEncodeArr(new Uint8Array(pkceHashedCodeVerifier));
104
107
  } catch (e) {
105
- throw createBrowserAuthError(BrowserAuthErrorCodes.pkceNotCreated);
108
+ throw createBrowserAuthError(
109
+ BrowserAuthErrorCodes.pkceNotCreated,
110
+ correlationId
111
+ );
106
112
  }
107
113
  }
@@ -37,8 +37,10 @@ export class CustomAuthAuthority extends Authority {
37
37
  performanceClient: IPerformanceClient,
38
38
  private customAuthProxyDomain?: string
39
39
  ) {
40
- const ciamAuthorityUrl =
41
- CustomAuthAuthority.transformCIAMAuthority(authority);
40
+ const ciamAuthorityUrl = CustomAuthAuthority.transformCIAMAuthority(
41
+ authority,
42
+ ""
43
+ );
42
44
 
43
45
  const authorityOptions: AuthorityOptions = {
44
46
  protocolMode: config.system.protocolMode,
@@ -135,7 +135,8 @@ export class CustomAuthSilentCacheClient extends CustomAuthInteractionClientBase
135
135
  if (postLogoutRedirectUri) {
136
136
  const absoluteRedirectUri = UrlString.getAbsoluteUrl(
137
137
  postLogoutRedirectUri,
138
- getCurrentUri()
138
+ getCurrentUri(),
139
+ correlationId
139
140
  );
140
141
 
141
142
  this.logger.verbose(
@@ -38,7 +38,8 @@ export function base64DecToArr(base64String: string): Uint8Array {
38
38
  break;
39
39
  default:
40
40
  throw createBrowserAuthError(
41
- BrowserAuthErrorCodes.invalidBase64String
41
+ BrowserAuthErrorCodes.invalidBase64String,
42
+ ""
42
43
  );
43
44
  }
44
45
  const binString = atob(encodedString);
@@ -15,8 +15,13 @@ export function getDefaultErrorMessage(code: string): string {
15
15
  * Browser library error class thrown by the MSAL.js library for SPAs
16
16
  */
17
17
  export class BrowserAuthError extends AuthError {
18
- constructor(errorCode: string, subError?: string) {
19
- super(errorCode, getDefaultErrorMessage(errorCode), subError);
18
+ constructor(errorCode: string, correlationId: string, subError?: string) {
19
+ super(
20
+ errorCode,
21
+ correlationId,
22
+ getDefaultErrorMessage(errorCode),
23
+ subError
24
+ );
20
25
 
21
26
  Object.setPrototypeOf(this, BrowserAuthError.prototype);
22
27
  this.name = "BrowserAuthError";
@@ -25,7 +30,8 @@ export class BrowserAuthError extends AuthError {
25
30
 
26
31
  export function createBrowserAuthError(
27
32
  errorCode: string,
33
+ correlationId: string,
28
34
  subError?: string
29
35
  ): BrowserAuthError {
30
- return new BrowserAuthError(errorCode, subError);
36
+ return new BrowserAuthError(errorCode, correlationId, subError);
31
37
  }
@@ -11,8 +11,12 @@ export { BrowserConfigurationAuthErrorCodes };
11
11
  * Browser library error class thrown by the MSAL.js library for SPAs
12
12
  */
13
13
  export class BrowserConfigurationAuthError extends AuthError {
14
- constructor(errorCode: string, errorMessage?: string) {
15
- super(errorCode, errorMessage);
14
+ constructor(
15
+ errorCode: string,
16
+ correlationId: string,
17
+ errorMessage?: string
18
+ ) {
19
+ super(errorCode, correlationId, errorMessage);
16
20
  this.name = "BrowserConfigurationAuthError";
17
21
 
18
22
  Object.setPrototypeOf(this, BrowserConfigurationAuthError.prototype);
@@ -20,10 +24,12 @@ export class BrowserConfigurationAuthError extends AuthError {
20
24
  }
21
25
 
22
26
  export function createBrowserConfigurationAuthError(
23
- errorCode: string
27
+ errorCode: string,
28
+ correlationId: string
24
29
  ): BrowserConfigurationAuthError {
25
30
  return new BrowserConfigurationAuthError(
26
31
  errorCode,
32
+ correlationId,
27
33
  getDefaultErrorMessage(errorCode)
28
34
  );
29
35
  }
@@ -32,8 +32,17 @@ const INVALID_METHOD_ERROR = -2147186943;
32
32
  export class NativeAuthError extends AuthError {
33
33
  ext: OSError | undefined;
34
34
 
35
- constructor(errorCode: string, description?: string, ext?: OSError) {
36
- super(errorCode, description || getDefaultErrorMessage(errorCode));
35
+ constructor(
36
+ errorCode: string,
37
+ correlationId: string,
38
+ description?: string,
39
+ ext?: OSError
40
+ ) {
41
+ super(
42
+ errorCode,
43
+ correlationId,
44
+ description || getDefaultErrorMessage(errorCode)
45
+ );
37
46
 
38
47
  Object.setPrototypeOf(this, NativeAuthError.prototype);
39
48
  this.name = "NativeAuthError";
@@ -79,32 +88,56 @@ export function isFatalNativeAuthError(error: NativeAuthError): boolean {
79
88
  */
80
89
  export function createNativeAuthError(
81
90
  code: string,
91
+ correlationId: string,
82
92
  description?: string,
83
93
  ext?: OSError
84
94
  ): AuthError {
95
+ let error: AuthError;
85
96
  if (ext && ext.status) {
86
97
  switch (ext.status) {
87
98
  case NativeStatusCodes.ACCOUNT_UNAVAILABLE:
88
- return createInteractionRequiredAuthError(
99
+ error = createInteractionRequiredAuthError(
89
100
  InteractionRequiredAuthErrorCodes.nativeAccountUnavailable,
101
+ correlationId,
90
102
  getDefaultErrorMessage(code)
91
103
  );
104
+ break;
92
105
  case NativeStatusCodes.USER_INTERACTION_REQUIRED:
93
- return new InteractionRequiredAuthError(code, description);
106
+ error = new InteractionRequiredAuthError(
107
+ code,
108
+ correlationId,
109
+ description
110
+ );
111
+ break;
94
112
  case NativeStatusCodes.USER_CANCEL:
95
- return createBrowserAuthError(
96
- BrowserAuthErrorCodes.userCancelled
113
+ error = createBrowserAuthError(
114
+ BrowserAuthErrorCodes.userCancelled,
115
+ correlationId
97
116
  );
117
+ break;
98
118
  case NativeStatusCodes.NO_NETWORK:
99
- return createBrowserAuthError(
100
- BrowserAuthErrorCodes.noNetworkConnectivity
119
+ error = createBrowserAuthError(
120
+ BrowserAuthErrorCodes.noNetworkConnectivity,
121
+ correlationId
101
122
  );
123
+ break;
102
124
  case NativeStatusCodes.UI_NOT_ALLOWED:
103
- return createInteractionRequiredAuthError(
104
- InteractionRequiredAuthErrorCodes.uiNotAllowed
125
+ error = createInteractionRequiredAuthError(
126
+ InteractionRequiredAuthErrorCodes.uiNotAllowed,
127
+ correlationId
128
+ );
129
+ break;
130
+ default:
131
+ error = new NativeAuthError(
132
+ code,
133
+ correlationId,
134
+ description,
135
+ ext
105
136
  );
106
137
  }
138
+ return error;
107
139
  }
108
140
 
109
- return new NativeAuthError(code, description, ext);
141
+ error = new NativeAuthError(code, correlationId, description, ext);
142
+ return error;
110
143
  }
@@ -7,14 +7,24 @@ import { AuthError } from "@azure/msal-common/browser";
7
7
  import { unsupportedMethod } from "./NativeAuthErrorCodes.js";
8
8
 
9
9
  export class NestedAppAuthError extends AuthError {
10
- constructor(errorCode: string, errorMessage?: string) {
11
- super(errorCode, errorMessage);
10
+ constructor(
11
+ errorCode: string,
12
+ correlationId: string,
13
+ errorMessage?: string
14
+ ) {
15
+ super(errorCode, correlationId, errorMessage);
12
16
 
13
17
  Object.setPrototypeOf(this, NestedAppAuthError.prototype);
14
18
  this.name = "NestedAppAuthError";
15
19
  }
16
20
 
17
- public static createUnsupportedError(): NestedAppAuthError {
18
- return new NestedAppAuthError(unsupportedMethod);
21
+ public static createUnsupportedError(
22
+ correlationId?: string
23
+ ): NestedAppAuthError {
24
+ /*
25
+ * Some controller stubs (perf callbacks, getPerformanceClient, getRedirectResponse)
26
+ * have no request param and thus no correlationId to forward
27
+ */
28
+ return new NestedAppAuthError(unsupportedMethod, correlationId || "");
19
29
  }
20
30
  }
@@ -97,7 +97,11 @@ export function getRedirectUri(
97
97
  ): string {
98
98
  logger.verbose("getRedirectUri called", correlationId);
99
99
  const redirectUri = requestRedirectUri || clientConfigRedirectUri || "";
100
- return UrlString.getAbsoluteUrl(redirectUri, BrowserUtils.getCurrentUri());
100
+ return UrlString.getAbsoluteUrl(
101
+ redirectUri,
102
+ BrowserUtils.getCurrentUri(),
103
+ correlationId
104
+ );
101
105
  }
102
106
 
103
107
  /**
@@ -189,7 +193,7 @@ export async function getDiscoveredAuthority(
189
193
  const userAuthority =
190
194
  account && resolvedInstanceAware
191
195
  ? config.auth.authority.replace(
192
- UrlString.getDomainFromUrl(resolvedAuthority),
196
+ UrlString.getDomainFromUrl(resolvedAuthority, correlationId),
193
197
  account.environment
194
198
  )
195
199
  : resolvedAuthority;
@@ -217,7 +221,8 @@ export async function getDiscoveredAuthority(
217
221
 
218
222
  if (account && !discoveredAuthority.isAlias(account.environment)) {
219
223
  throw createClientConfigurationError(
220
- ClientConfigurationErrorCodes.authorityMismatch
224
+ ClientConfigurationErrorCodes.authorityMismatch,
225
+ correlationId
221
226
  );
222
227
  }
223
228
 
@@ -266,7 +266,10 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
266
266
  return {
267
267
  authority: request.authority,
268
268
  correlationId: this.correlationId,
269
- scopes: ScopeSet.fromString(request.scope).asArray(),
269
+ scopes: ScopeSet.fromString(
270
+ request.scope,
271
+ this.correlationId
272
+ ).asArray(),
270
273
  account: cachedAccount,
271
274
  forceRefresh: false,
272
275
  };
@@ -287,7 +290,10 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
287
290
  "NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided",
288
291
  this.correlationId
289
292
  );
290
- throw createClientAuthError(ClientAuthErrorCodes.noAccountFound);
293
+ throw createClientAuthError(
294
+ ClientAuthErrorCodes.noAccountFound,
295
+ this.correlationId
296
+ );
291
297
  }
292
298
  // fetch the account from browser cache
293
299
  const account = this.browserStorage.getBaseAccountInfo(
@@ -298,7 +304,10 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
298
304
  );
299
305
 
300
306
  if (!account) {
301
- throw createClientAuthError(ClientAuthErrorCodes.noAccountFound);
307
+ throw createClientAuthError(
308
+ ClientAuthErrorCodes.noAccountFound,
309
+ this.correlationId
310
+ );
302
311
  }
303
312
 
304
313
  // leverage silent flow for cached tokens retrieval
@@ -320,7 +329,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
320
329
 
321
330
  const idTokenClaims = AuthToken.extractTokenClaims(
322
331
  idToken?.secret || "",
323
- base64Decode
332
+ base64Decode,
333
+ this.correlationId
324
334
  );
325
335
 
326
336
  const fullAccount = updateAccountTenantProfileData(
@@ -395,7 +405,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
395
405
  const redirectUri = navigateToLoginRequestUrl
396
406
  ? UrlString.getAbsoluteUrl(
397
407
  request.redirectStartPage || window.location.href,
398
- getCurrentUri()
408
+ getCurrentUri(),
409
+ this.correlationId
399
410
  )
400
411
  : getRedirectUri(
401
412
  request.redirectUri,
@@ -522,7 +533,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
522
533
  // generate identifiers
523
534
  const idTokenClaims = AuthToken.extractTokenClaims(
524
535
  response.id_token,
525
- base64Decode
536
+ base64Decode,
537
+ this.correlationId
526
538
  );
527
539
 
528
540
  const homeAccountIdentifier = this.createHomeAccountIdentifier(
@@ -552,7 +564,10 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
552
564
  response.account.id !== request.accountId
553
565
  ) {
554
566
  // User switch in native broker prompt is not supported. All users must first sign in through web flow to ensure server state is in sync
555
- throw createNativeAuthError(NativeAuthErrorCodes.userSwitch);
567
+ throw createNativeAuthError(
568
+ NativeAuthErrorCodes.userSwitch,
569
+ this.correlationId
570
+ );
556
571
  }
557
572
 
558
573
  // Get the preferred_cache domain for the given authority
@@ -640,8 +655,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
640
655
  */
641
656
  generateScopes(requestScopes: string, responseScopes?: string): ScopeSet {
642
657
  return responseScopes
643
- ? ScopeSet.fromString(responseScopes)
644
- : ScopeSet.fromString(requestScopes);
658
+ ? ScopeSet.fromString(responseScopes, this.correlationId)
659
+ : ScopeSet.fromString(requestScopes, this.correlationId);
645
660
  }
646
661
 
647
662
  /**
@@ -689,7 +704,10 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
689
704
  * PopTokenGenerator to query the full key for signing
690
705
  */
691
706
  if (!request.keyId) {
692
- throw createClientAuthError(ClientAuthErrorCodes.keyIdMissing);
707
+ throw createClientAuthError(
708
+ ClientAuthErrorCodes.keyIdMissing,
709
+ this.correlationId
710
+ );
693
711
  }
694
712
  return popTokenGenerator.signPopToken(
695
713
  response.access_token,
@@ -751,6 +769,13 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
751
769
  */
752
770
  if (accountInfo.nativeAccountId !== response.account.id) {
753
771
  accountInfo.nativeAccountId = response.account.id;
772
+ // Also update the matching tenant profile (source of truth)
773
+ const targetTenantId = tid || accountInfo.tenantId;
774
+ const tenantProfile =
775
+ accountInfo.tenantProfiles?.get(targetTenantId);
776
+ if (tenantProfile) {
777
+ tenantProfile.nativeAccountId = response.account.id;
778
+ }
754
779
  }
755
780
 
756
781
  // generate PoP token as needed
@@ -861,6 +886,7 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
861
886
  tokenExpirationSeconds,
862
887
  0,
863
888
  base64Decode,
889
+ request.correlationId,
864
890
  undefined,
865
891
  request.tokenType as Constants.AuthenticationScheme,
866
892
  undefined,
@@ -994,16 +1020,13 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
994
1020
 
995
1021
  // scopes are expected to be received by the native broker as "scope" and will be added to the request below. Other properties that should be dropped from the request to the native broker can be included in the object destructuring here.
996
1022
  const { scopes, claims, ...remainingProperties } = request;
997
- const scopeSet = new ScopeSet(scopes || []);
1023
+ const scopeSet = new ScopeSet(scopes || [], this.correlationId);
998
1024
  scopeSet.appendScopes(Constants.OIDC_DEFAULT_SCOPES);
999
1025
 
1000
- const mergedClaims =
1001
- configClaims && configClaims.length
1002
- ? RequestParameterBuilder.addClientCapabilitiesToClaims(
1003
- claims,
1004
- configClaims
1005
- )
1006
- : claims;
1026
+ const mergedClaims = RequestParameterBuilder.buildMergedClaims(
1027
+ claims,
1028
+ configClaims?.length ? configClaims : undefined
1029
+ );
1007
1030
 
1008
1031
  const validatedRequest: PlatformAuthRequest = {
1009
1032
  ...remainingProperties,
@@ -1032,7 +1055,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
1032
1055
  // Check for PoP token requests: signPopToken should only be set to true if popKid is not set
1033
1056
  if (validatedRequest.signPopToken && !!request.popKid) {
1034
1057
  throw createBrowserAuthError(
1035
- BrowserAuthErrorCodes.invalidPopTokenRequest
1058
+ BrowserAuthErrorCodes.invalidPopTokenRequest,
1059
+ this.correlationId
1036
1060
  );
1037
1061
  }
1038
1062
 
@@ -1110,7 +1134,10 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
1110
1134
  );
1111
1135
  }
1112
1136
 
1113
- const canonicalAuthority = new UrlString(requestAuthority);
1137
+ const canonicalAuthority = new UrlString(
1138
+ requestAuthority,
1139
+ this.correlationId
1140
+ );
1114
1141
  canonicalAuthority.validateAsUri();
1115
1142
  return canonicalAuthority;
1116
1143
  }
@@ -1154,7 +1181,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
1154
1181
  this.correlationId
1155
1182
  );
1156
1183
  throw createBrowserAuthError(
1157
- BrowserAuthErrorCodes.nativePromptNotSupported
1184
+ BrowserAuthErrorCodes.nativePromptNotSupported,
1185
+ this.correlationId
1158
1186
  );
1159
1187
  }
1160
1188
  }
@@ -434,7 +434,7 @@ export class PopupClient extends StandardInteractionClient {
434
434
  popupParams.popup?.close();
435
435
 
436
436
  if (e instanceof AuthError) {
437
- (e as AuthError).setCorrelationId(this.correlationId);
437
+ (e as AuthError).correlationId = this.correlationId;
438
438
  serverTelemetryManager.cacheFailedRequest(e);
439
439
  }
440
440
  throw e;
@@ -759,7 +759,8 @@ export class PopupClient extends StandardInteractionClient {
759
759
  };
760
760
  const absoluteUrl = UrlString.getAbsoluteUrl(
761
761
  mainWindowRedirectUri,
762
- BrowserUtils.getCurrentUri()
762
+ BrowserUtils.getCurrentUri(),
763
+ this.correlationId
763
764
  );
764
765
  await this.navigationClient.navigateInternal(
765
766
  absoluteUrl,
@@ -779,7 +780,8 @@ export class PopupClient extends StandardInteractionClient {
779
780
  validRequest.state || "",
780
781
  {
781
782
  interactionType: InteractionType.Popup,
782
- }
783
+ },
784
+ validRequest.correlationId
783
785
  );
784
786
 
785
787
  // Create logout string and navigate user window to logout.
@@ -818,7 +820,8 @@ export class PopupClient extends StandardInteractionClient {
818
820
  };
819
821
  const absoluteUrl = UrlString.getAbsoluteUrl(
820
822
  mainWindowRedirectUri,
821
- BrowserUtils.getCurrentUri()
823
+ BrowserUtils.getCurrentUri(),
824
+ this.correlationId
822
825
  );
823
826
 
824
827
  this.logger.verbose(
@@ -844,7 +847,7 @@ export class PopupClient extends StandardInteractionClient {
844
847
  popupParams.popup?.close();
845
848
 
846
849
  if (e instanceof AuthError) {
847
- (e as AuthError).setCorrelationId(this.correlationId);
850
+ (e as AuthError).correlationId = this.correlationId;
848
851
  serverTelemetryManager.cacheFailedRequest(e);
849
852
  }
850
853
  this.eventHandler.emitEvent(
@@ -886,7 +889,8 @@ export class PopupClient extends StandardInteractionClient {
886
889
  // Throw error if request URL is empty.
887
890
  this.logger.error("Navigate url is empty", this.correlationId);
888
891
  throw createBrowserAuthError(
889
- BrowserAuthErrorCodes.emptyNavigateUri
892
+ BrowserAuthErrorCodes.emptyNavigateUri,
893
+ this.correlationId
890
894
  );
891
895
  }
892
896
  }
@@ -927,7 +931,8 @@ export class PopupClient extends StandardInteractionClient {
927
931
  // Popup will be null if popups are blocked
928
932
  if (!popupWindow) {
929
933
  throw createBrowserAuthError(
930
- BrowserAuthErrorCodes.emptyWindowError
934
+ BrowserAuthErrorCodes.emptyWindowError,
935
+ this.correlationId
931
936
  );
932
937
  }
933
938
  try {
@@ -958,7 +963,8 @@ export class PopupClient extends StandardInteractionClient {
958
963
  this.correlationId
959
964
  );
960
965
  throw createBrowserAuthError(
961
- BrowserAuthErrorCodes.popupWindowError
966
+ BrowserAuthErrorCodes.popupWindowError,
967
+ this.correlationId
962
968
  );
963
969
  }
964
970
  }