@azure/msal-browser 5.27.0 → 5.29.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 (567) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  4. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +9 -1
  5. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +7 -6
  7. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs.map +1 -1
  8. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +4 -2
  9. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
  10. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +21 -7
  11. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs.map +1 -1
  12. package/dist/cache/AccountManager.mjs +1 -1
  13. package/dist/cache/AsyncMemoryStorage.mjs +14 -1
  14. package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
  15. package/dist/cache/BrowserCacheManager.mjs +9 -2
  16. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  17. package/dist/cache/CacheHelpers.mjs +1 -1
  18. package/dist/cache/CacheKeys.mjs +1 -1
  19. package/dist/cache/CookieStorage.mjs +1 -1
  20. package/dist/cache/DatabaseStorage.mjs +1 -1
  21. package/dist/cache/EncryptedData.mjs +1 -1
  22. package/dist/cache/LocalStorage.mjs +1 -1
  23. package/dist/cache/MemoryStorage.mjs +1 -1
  24. package/dist/cache/SessionStorage.mjs +1 -1
  25. package/dist/cache/TokenCache.mjs +1 -1
  26. package/dist/config/Configuration.mjs +1 -1
  27. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  28. package/dist/controllers/StandardController.mjs +65 -7
  29. package/dist/controllers/StandardController.mjs.map +1 -1
  30. package/dist/crypto/BrowserCrypto.mjs +1 -1
  31. package/dist/crypto/CryptoOps.mjs +1 -1
  32. package/dist/crypto/PkceGenerator.mjs +1 -1
  33. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  34. package/dist/crypto/TokenBindingKeyManager.mjs +14 -1
  35. package/dist/crypto/TokenBindingKeyManager.mjs.map +1 -1
  36. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  37. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +6 -4
  38. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  39. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +58 -50
  40. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  41. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  50. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  51. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  52. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  53. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  54. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  55. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  56. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  57. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  58. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +3 -5
  59. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
  60. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +19 -13
  61. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
  62. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +8 -2
  63. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs.map +1 -1
  64. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +58 -69
  65. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
  66. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +68 -0
  67. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -0
  68. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +44 -16
  69. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
  70. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +100 -0
  71. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -0
  72. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +5 -3
  73. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs.map +1 -1
  74. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +27 -19
  75. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
  76. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +2 -4
  77. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
  78. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +2 -3
  79. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
  80. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +20 -8
  81. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
  82. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +110 -0
  83. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -0
  84. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  85. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  86. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  87. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  88. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +2 -1
  89. package/dist/custom_auth/core/error/InvalidArgumentError.mjs.map +1 -1
  90. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  91. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  92. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  93. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  94. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  95. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  96. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  97. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  98. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  99. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  100. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  101. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  102. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  103. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  104. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  105. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  106. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  107. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +465 -186
  108. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
  109. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +2 -6
  110. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs.map +1 -1
  111. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +18 -3
  112. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -1
  113. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  114. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  115. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  116. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  117. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  118. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  119. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  120. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  121. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  122. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +10 -8
  123. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs.map +1 -1
  124. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +1 -1
  125. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +147 -38
  126. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -1
  127. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
  128. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +1 -1
  129. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +21 -10
  130. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs.map +1 -1
  131. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
  132. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +2 -12
  133. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
  134. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +2 -2
  135. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -1
  136. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  137. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  138. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +15 -3
  139. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs.map +1 -1
  140. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +10 -3
  141. package/dist/custom_auth/core/telemetry/PublicApiId.mjs.map +1 -1
  142. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +17 -2
  143. package/dist/custom_auth/core/utils/ArgumentValidator.mjs.map +1 -1
  144. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  145. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  146. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  147. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  148. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  149. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  150. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  151. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  152. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  153. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  154. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  155. package/dist/custom_auth/index.mjs +6 -3
  156. package/dist/custom_auth/index.mjs.map +1 -1
  157. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  158. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  159. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  160. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  161. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  162. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  163. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  164. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  165. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  166. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  167. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  168. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +49 -14
  169. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
  170. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +24 -0
  171. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs.map +1 -0
  172. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  173. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  174. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  175. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  176. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  177. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  178. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  179. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  180. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  181. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  182. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  183. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  184. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  185. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +4 -7
  186. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
  187. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +2 -2
  188. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs.map +1 -1
  189. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  190. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  191. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  192. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  193. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  194. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  195. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  196. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  197. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  198. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  199. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  200. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  201. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  202. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  203. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +17 -8
  204. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
  205. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +78 -0
  206. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs.map +1 -0
  207. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +48 -0
  208. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs.map +1 -0
  209. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +49 -0
  210. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs.map +1 -0
  211. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +21 -21
  212. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs.map +1 -1
  213. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  214. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  215. package/dist/encode/Base64Decode.mjs +1 -1
  216. package/dist/encode/Base64Encode.mjs +1 -1
  217. package/dist/error/BrowserAuthError.mjs +1 -1
  218. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  219. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  220. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  221. package/dist/error/NativeAuthError.mjs +1 -1
  222. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  223. package/dist/error/NestedAppAuthError.mjs +1 -1
  224. package/dist/event/EventHandler.mjs +1 -1
  225. package/dist/event/EventMessage.mjs +1 -1
  226. package/dist/event/EventType.mjs +1 -1
  227. package/dist/index.mjs +1 -1
  228. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  229. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  230. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +526 -90
  231. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  232. package/dist/interaction_client/PopupClient.mjs +27 -20
  233. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  234. package/dist/interaction_client/RedirectClient.mjs +29 -14
  235. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  236. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  237. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  238. package/dist/interaction_client/SilentIframeClient.mjs +44 -32
  239. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  240. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  241. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  242. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  243. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  244. package/dist/log-strings-mapping.json +77 -25
  245. package/dist/naa/BridgeError.mjs +1 -1
  246. package/dist/naa/BridgeProxy.mjs +1 -1
  247. package/dist/naa/BridgeStatusCode.mjs +1 -1
  248. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  249. package/dist/navigation/NavigationClient.mjs +1 -1
  250. package/dist/network/FetchClient.mjs +1 -1
  251. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  252. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  253. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  254. package/dist/packageMetadata.mjs +2 -2
  255. package/dist/popup_relay/constants.mjs +1 -1
  256. package/dist/popup_relay/index.mjs +1 -1
  257. package/dist/popup_relay/relayClient.mjs +1 -1
  258. package/dist/protocol/Authorize.mjs +21 -13
  259. package/dist/protocol/Authorize.mjs.map +1 -1
  260. package/dist/redirect_bridge/index.mjs +1 -1
  261. package/dist/request/RequestHelpers.mjs +35 -11
  262. package/dist/request/RequestHelpers.mjs.map +1 -1
  263. package/dist/request/SilentRequestHelpers.mjs +6 -6
  264. package/dist/request/SilentRequestHelpers.mjs.map +1 -1
  265. package/dist/response/ResponseHandler.mjs +1 -1
  266. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  267. package/dist/telemetry/BrowserPerformanceEvents.mjs +3 -2
  268. package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
  269. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  270. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  271. package/dist/utils/BrowserConstants.mjs +1 -1
  272. package/dist/utils/BrowserDetection.mjs +1 -1
  273. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  274. package/dist/utils/BrowserUtils.mjs +1 -1
  275. package/dist/utils/Helpers.mjs +1 -1
  276. package/dist/utils/IframeMonitor.mjs +1 -1
  277. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  278. package/dist/utils/PopupMonitor.mjs +1 -1
  279. package/dist/utils/PopupOriginCheck.mjs +1 -1
  280. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  281. package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
  282. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  283. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  284. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  285. package/dist/webBrokerBridge/index.mjs +1 -1
  286. package/lib/custom-auth-path/log-strings-mapping.json +69 -17
  287. package/lib/custom-auth-path/msal-custom-auth.cjs +2394 -920
  288. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  289. package/lib/custom-auth-path/msal-custom-auth.js +2394 -920
  290. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  291. package/lib/log-strings-mapping.json +23 -11
  292. package/lib/msal-browser.cjs +943 -278
  293. package/lib/msal-browser.cjs.map +1 -1
  294. package/lib/msal-browser.js +943 -278
  295. package/lib/msal-browser.js.map +1 -1
  296. package/lib/msal-browser.min.js +2 -2
  297. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  298. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  299. package/lib/popup-relay/msal-popup-relay.js +2 -2
  300. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  301. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  302. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  303. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  304. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  305. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  306. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  307. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
  308. package/package.json +2 -2
  309. package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +15 -0
  310. package/src/broker/nativeBroker/PlatformAuthExtensionHandler.ts +6 -21
  311. package/src/broker/nativeBroker/PlatformAuthProvider.ts +3 -1
  312. package/src/broker/nativeBroker/PlatformAuthRequest.ts +12 -8
  313. package/src/broker/nativeBroker/PlatformAuthResponse.ts +31 -0
  314. package/src/cache/AsyncMemoryStorage.ts +16 -0
  315. package/src/cache/BrowserCacheManager.ts +19 -1
  316. package/src/controllers/StandardController.ts +107 -11
  317. package/src/crypto/TokenBindingKeyManager.ts +21 -0
  318. package/src/custom_auth/CustomAuthActionInputs.ts +12 -5
  319. package/src/custom_auth/CustomAuthPublicClientApplication.ts +5 -3
  320. package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +5 -3
  321. package/src/custom_auth/controller/CustomAuthStandardController.ts +79 -92
  322. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +14 -0
  323. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +1 -4
  324. package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +5 -4
  325. package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +28 -16
  326. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.ts +6 -0
  327. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +83 -72
  328. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +23 -0
  329. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +28 -0
  330. package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +10 -6
  331. package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +9 -6
  332. package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +4 -6
  333. package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +36 -0
  334. package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +8 -8
  335. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +94 -0
  336. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +68 -14
  337. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +150 -0
  338. package/src/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.ts +8 -2
  339. package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +48 -24
  340. package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +1 -3
  341. package/src/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.ts +24 -2
  342. package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +1 -2
  343. package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +34 -9
  344. package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +179 -0
  345. package/src/custom_auth/core/error/InvalidArgumentError.ts +1 -1
  346. package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +13 -12
  347. package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +771 -261
  348. package/src/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.ts +2 -6
  349. package/src/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.ts +27 -15
  350. package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +97 -26
  351. package/src/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.ts +9 -6
  352. package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +330 -63
  353. package/src/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.ts +51 -15
  354. package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +25 -6
  355. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.ts +0 -6
  356. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +48 -48
  357. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +44 -37
  358. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +32 -15
  359. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +14 -10
  360. package/src/custom_auth/core/telemetry/FlowApiIdHelperV2.ts +24 -1
  361. package/src/custom_auth/core/telemetry/PublicApiId.ts +7 -0
  362. package/src/custom_auth/core/utils/ArgumentValidator.ts +26 -0
  363. package/src/custom_auth/index.ts +21 -11
  364. package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +8 -10
  365. package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +71 -16
  366. package/src/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.ts +30 -0
  367. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +4 -8
  368. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +4 -5
  369. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +3 -6
  370. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.ts +0 -3
  371. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.ts +2 -3
  372. package/src/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.ts +49 -0
  373. package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +8 -4
  374. package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +18 -4
  375. package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +26 -5
  376. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.ts +101 -0
  377. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.ts +53 -0
  378. package/src/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.ts +97 -0
  379. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.ts +0 -6
  380. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.ts +33 -43
  381. package/src/interaction_client/PlatformAuthInteractionClient.ts +886 -148
  382. package/src/interaction_client/PopupClient.ts +104 -83
  383. package/src/interaction_client/RedirectClient.ts +88 -34
  384. package/src/interaction_client/SilentIframeClient.ts +121 -95
  385. package/src/packageMetadata.ts +1 -1
  386. package/src/protocol/Authorize.ts +46 -18
  387. package/src/request/RequestHelpers.ts +64 -11
  388. package/src/request/SilentRequestHelpers.ts +8 -9
  389. package/src/telemetry/BrowserPerformanceEvents.ts +1 -0
  390. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
  391. package/types/broker/nativeBroker/PlatformAuthExtensionHandler.d.ts.map +1 -1
  392. package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
  393. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +6 -1
  394. package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
  395. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +21 -0
  396. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
  397. package/types/cache/AsyncMemoryStorage.d.ts +5 -0
  398. package/types/cache/AsyncMemoryStorage.d.ts.map +1 -1
  399. package/types/cache/BrowserCacheManager.d.ts +4 -0
  400. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  401. package/types/controllers/StandardController.d.ts +5 -0
  402. package/types/controllers/StandardController.d.ts.map +1 -1
  403. package/types/crypto/TokenBindingKeyManager.d.ts +9 -0
  404. package/types/crypto/TokenBindingKeyManager.d.ts.map +1 -1
  405. package/types/custom_auth/CustomAuthActionInputs.d.ts +12 -5
  406. package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
  407. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  408. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +5 -3
  409. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
  410. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +5 -3
  411. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
  412. package/types/custom_auth/controller/CustomAuthStandardController.d.ts +2 -0
  413. package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
  414. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +10 -0
  415. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -0
  416. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +1 -4
  417. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
  418. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +5 -4
  419. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
  420. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +17 -8
  421. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
  422. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts +6 -0
  423. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.d.ts.map +1 -1
  424. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +23 -44
  425. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
  426. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +14 -0
  427. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -0
  428. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +16 -0
  429. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -0
  430. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +7 -6
  431. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
  432. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +8 -7
  433. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
  434. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +4 -6
  435. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
  436. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +20 -0
  437. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -0
  438. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +7 -8
  439. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
  440. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +22 -0
  441. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -0
  442. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +3 -6
  443. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
  444. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +28 -0
  445. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -0
  446. package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts +3 -2
  447. package/types/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.d.ts.map +1 -1
  448. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +6 -8
  449. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
  450. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +1 -3
  451. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
  452. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts +18 -2
  453. package/types/custom_auth/core/auth_flow/v2/state/CustomAuthStateParametersV2.d.ts.map +1 -1
  454. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +1 -2
  455. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
  456. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +5 -6
  457. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
  458. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +23 -0
  459. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -0
  460. package/types/custom_auth/core/error/InvalidArgumentError.d.ts +1 -0
  461. package/types/custom_auth/core/error/InvalidArgumentError.d.ts.map +1 -1
  462. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +9 -1
  463. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
  464. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +19 -10
  465. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
  466. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts +1 -1
  467. package/types/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.d.ts.map +1 -1
  468. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts +19 -5
  469. package/types/custom_auth/core/interaction_client/v2/parameter/FlowParamsV2.d.ts.map +1 -1
  470. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +39 -4
  471. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
  472. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts +8 -0
  473. package/types/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.d.ts.map +1 -1
  474. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts +8 -2
  475. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
  476. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts +4 -3
  477. package/types/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.d.ts.map +1 -1
  478. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +13 -1
  479. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
  480. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorResponsesV2.d.ts.map +1 -1
  481. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +36 -9
  482. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
  483. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +30 -17
  484. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
  485. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +18 -4
  486. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
  487. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +8 -11
  488. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
  489. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts +2 -1
  490. package/types/custom_auth/core/telemetry/FlowApiIdHelperV2.d.ts.map +1 -1
  491. package/types/custom_auth/core/telemetry/PublicApiId.d.ts +7 -0
  492. package/types/custom_auth/core/telemetry/PublicApiId.d.ts.map +1 -1
  493. package/types/custom_auth/core/utils/ArgumentValidator.d.ts +3 -0
  494. package/types/custom_auth/core/utils/ArgumentValidator.d.ts.map +1 -1
  495. package/types/custom_auth/index.d.ts +10 -5
  496. package/types/custom_auth/index.d.ts.map +1 -1
  497. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +7 -11
  498. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
  499. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +7 -5
  500. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
  501. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts +7 -0
  502. package/types/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.d.ts.map +1 -0
  503. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +4 -8
  504. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
  505. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +5 -5
  506. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
  507. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +3 -6
  508. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
  509. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts +0 -1
  510. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateParametersV2.d.ts.map +1 -1
  511. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts +3 -2
  512. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.d.ts.map +1 -1
  513. package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts +27 -0
  514. package/types/custom_auth/sign_up/auth_flow/v2/result/ExistingAccountActionResultsV2.d.ts.map +1 -0
  515. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +6 -3
  516. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
  517. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +13 -3
  518. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
  519. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +8 -3
  520. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
  521. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts +24 -0
  522. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.d.ts.map +1 -0
  523. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts +18 -0
  524. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.d.ts.map +1 -0
  525. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts +7 -0
  526. package/types/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.d.ts.map +1 -0
  527. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts +0 -4
  528. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateParametersV2.d.ts.map +1 -1
  529. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts +5 -4
  530. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.d.ts.map +1 -1
  531. package/types/interaction_client/PlatformAuthInteractionClient.d.ts +110 -8
  532. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  533. package/types/interaction_client/PopupClient.d.ts.map +1 -1
  534. package/types/interaction_client/RedirectClient.d.ts.map +1 -1
  535. package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
  536. package/types/packageMetadata.d.ts +1 -1
  537. package/types/protocol/Authorize.d.ts +4 -4
  538. package/types/protocol/Authorize.d.ts.map +1 -1
  539. package/types/request/RequestHelpers.d.ts +21 -3
  540. package/types/request/RequestHelpers.d.ts.map +1 -1
  541. package/types/request/SilentRequestHelpers.d.ts.map +1 -1
  542. package/types/telemetry/BrowserPerformanceEvents.d.ts +1 -0
  543. package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
  544. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs +0 -70
  545. package/dist/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +0 -1
  546. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs +0 -25
  547. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.mjs.map +0 -1
  548. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs +0 -45
  549. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.mjs.map +0 -1
  550. package/src/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.ts +0 -23
  551. package/src/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.ts +0 -19
  552. package/src/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -20
  553. package/src/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.ts +0 -97
  554. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.ts +0 -34
  555. package/src/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.ts +0 -61
  556. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts +0 -14
  557. package/types/custom_auth/core/auth_flow/v2/result/MFAResendChallengeResultV2.d.ts.map +0 -1
  558. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts +0 -13
  559. package/types/custom_auth/core/auth_flow/v2/result/ResendCodeResultV2.d.ts.map +0 -1
  560. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -8
  561. package/types/custom_auth/sign_in/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +0 -1
  562. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -17
  563. package/types/custom_auth/sign_in/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +0 -1
  564. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts +0 -11
  565. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpAttributesRequiredStateBaseV2.d.ts.map +0 -1
  566. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts +0 -19
  567. package/types/custom_auth/sign_up/auth_flow/v2/state/SignUpPasswordRequiredStateV2.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v5.27.0 2026-10-27 */
1
+ /*! @azure/msal-browser v5.29.0 2026-11-06 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -6,7 +6,7 @@
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
7
7
  })(this, (function (exports) { 'use strict';
8
8
 
9
- /*! @azure/msal-common v16.15.0 2026-10-27 */
9
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -66,7 +66,7 @@
66
66
  */
67
67
  const POPUP_ORIGIN_CHECK_DONE = "pocd";
68
68
 
69
- /*! @azure/msal-common v16.15.0 2026-10-27 */
69
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
70
70
  /*
71
71
  * Copyright (c) Microsoft Corporation. All rights reserved.
72
72
  * Licensed under the MIT License.
@@ -305,7 +305,7 @@
305
305
  // Token renewal offset default in seconds
306
306
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
307
307
 
308
- /*! @azure/msal-common v16.15.0 2026-10-27 */
308
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
309
309
  /*
310
310
  * Copyright (c) Microsoft Corporation. All rights reserved.
311
311
  * Licensed under the MIT License.
@@ -334,7 +334,7 @@
334
334
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
335
335
  }
336
336
 
337
- /*! @azure/msal-common v16.15.0 2026-10-27 */
337
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
338
338
 
339
339
  /*
340
340
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -357,7 +357,7 @@
357
357
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
358
358
  }
359
359
 
360
- /*! @azure/msal-common v16.15.0 2026-10-27 */
360
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
361
361
  /*
362
362
  * Copyright (c) Microsoft Corporation. All rights reserved.
363
363
  * Licensed under the MIT License.
@@ -443,7 +443,7 @@
443
443
  userCanceled: userCanceled
444
444
  });
445
445
 
446
- /*! @azure/msal-common v16.15.0 2026-10-27 */
446
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
447
447
 
448
448
  /*
449
449
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -481,7 +481,7 @@
481
481
  };
482
482
  }
483
483
 
484
- /*! @azure/msal-common v16.15.0 2026-10-27 */
484
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
485
485
 
486
486
  /*
487
487
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -547,7 +547,7 @@
547
547
  return matches[2];
548
548
  }
549
549
 
550
- /*! @azure/msal-common v16.15.0 2026-10-27 */
550
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
551
551
 
552
552
  /*
553
553
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -635,7 +635,7 @@
635
635
  return updatedAccountInfo;
636
636
  }
637
637
 
638
- /*! @azure/msal-common v16.15.0 2026-10-27 */
638
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
639
639
  /*
640
640
  * Copyright (c) Microsoft Corporation. All rights reserved.
641
641
  * Licensed under the MIT License.
@@ -649,7 +649,7 @@
649
649
  Ciam: 3,
650
650
  };
651
651
 
652
- /*! @azure/msal-common v16.15.0 2026-10-27 */
652
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
653
653
  /*
654
654
  * Copyright (c) Microsoft Corporation. All rights reserved.
655
655
  * Licensed under the MIT License.
@@ -671,7 +671,7 @@
671
671
  return null;
672
672
  }
673
673
 
674
- /*! @azure/msal-common v16.15.0 2026-10-27 */
674
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
675
675
  /*
676
676
  * Copyright (c) Microsoft Corporation. All rights reserved.
677
677
  * Licensed under the MIT License.
@@ -695,7 +695,7 @@
695
695
  EAR: "EAR",
696
696
  };
697
697
 
698
- /*! @azure/msal-common v16.15.0 2026-10-27 */
698
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
699
699
  /**
700
700
  * Returns the AccountInfo interface for this account.
701
701
  * @internal
@@ -884,7 +884,7 @@
884
884
  entity.hasOwnProperty("authorityType"));
885
885
  }
886
886
 
887
- /*! @azure/msal-common v16.15.0 2026-10-27 */
887
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
888
888
  /*
889
889
  * Copyright (c) Microsoft Corporation. All rights reserved.
890
890
  * Licensed under the MIT License.
@@ -901,7 +901,7 @@
901
901
  unexpectedError: unexpectedError
902
902
  });
903
903
 
904
- /*! @azure/msal-common v16.15.0 2026-10-27 */
904
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
905
905
 
906
906
  /*
907
907
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -921,7 +921,7 @@
921
921
  return new ClientConfigurationError(errorCode, correlationId);
922
922
  }
923
923
 
924
- /*! @azure/msal-common v16.15.0 2026-10-27 */
924
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
925
925
  /*
926
926
  * Copyright (c) Microsoft Corporation. All rights reserved.
927
927
  * Licensed under the MIT License.
@@ -961,7 +961,7 @@
961
961
  return headerName === undefined ? undefined : headers[headerName];
962
962
  }
963
963
 
964
- /*! @azure/msal-common v16.15.0 2026-10-27 */
964
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
965
965
  /*
966
966
  * Copyright (c) Microsoft Corporation. All rights reserved.
967
967
  * Licensed under the MIT License.
@@ -1031,7 +1031,7 @@
1031
1031
  urlParseError: urlParseError
1032
1032
  });
1033
1033
 
1034
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1034
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1035
1035
 
1036
1036
  /*
1037
1037
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1090,7 +1090,7 @@
1090
1090
  }
1091
1091
  }
1092
1092
 
1093
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1093
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1094
1094
  /*
1095
1095
  * Copyright (c) Microsoft Corporation. All rights reserved.
1096
1096
  * Licensed under the MIT License.
@@ -1102,7 +1102,7 @@
1102
1102
  response.hasOwnProperty("jwks_uri"));
1103
1103
  }
1104
1104
 
1105
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1105
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1106
1106
  /*
1107
1107
  * Copyright (c) Microsoft Corporation. All rights reserved.
1108
1108
  * Licensed under the MIT License.
@@ -1182,7 +1182,7 @@
1182
1182
  }
1183
1183
  }
1184
1184
 
1185
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1185
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1186
1186
 
1187
1187
  /*
1188
1188
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1340,7 +1340,7 @@
1340
1340
  }
1341
1341
  }
1342
1342
 
1343
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1343
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1344
1344
 
1345
1345
  /*
1346
1346
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1494,7 +1494,7 @@
1494
1494
  return null;
1495
1495
  }
1496
1496
 
1497
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1497
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1498
1498
  /*
1499
1499
  * Copyright (c) Microsoft Corporation. All rights reserved.
1500
1500
  * Licensed under the MIT License.
@@ -1512,7 +1512,7 @@
1512
1512
  AzureUsGovernment: "https://login.microsoftonline.us",
1513
1513
  };
1514
1514
 
1515
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1515
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1516
1516
  /*
1517
1517
  * Copyright (c) Microsoft Corporation. All rights reserved.
1518
1518
  * Licensed under the MIT License.
@@ -1522,7 +1522,7 @@
1522
1522
  response.hasOwnProperty("metadata"));
1523
1523
  }
1524
1524
 
1525
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1525
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1526
1526
  /*
1527
1527
  * Copyright (c) Microsoft Corporation. All rights reserved.
1528
1528
  * Licensed under the MIT License.
@@ -1532,7 +1532,7 @@
1532
1532
  response.hasOwnProperty("error_description"));
1533
1533
  }
1534
1534
 
1535
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1535
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1536
1536
  /*
1537
1537
  * Copyright (c) Microsoft Corporation. All rights reserved.
1538
1538
  * Licensed under the MIT License.
@@ -1603,7 +1603,7 @@
1603
1603
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1604
1604
  const SetUserData = "setUserData";
1605
1605
 
1606
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1606
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1607
1607
  /*
1608
1608
  * Copyright (c) Microsoft Corporation. All rights reserved.
1609
1609
  * Licensed under the MIT License.
@@ -1696,7 +1696,7 @@
1696
1696
  };
1697
1697
  };
1698
1698
 
1699
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1699
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1700
1700
 
1701
1701
  /*
1702
1702
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1807,7 +1807,7 @@
1807
1807
  },
1808
1808
  };
1809
1809
 
1810
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1810
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1811
1811
  /*
1812
1812
  * Copyright (c) Microsoft Corporation. All rights reserved.
1813
1813
  * Licensed under the MIT License.
@@ -1872,7 +1872,7 @@
1872
1872
  return cachedAtSec > nowSeconds();
1873
1873
  }
1874
1874
 
1875
- /*! @azure/msal-common v16.15.0 2026-10-27 */
1875
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
1876
1876
 
1877
1877
  /*
1878
1878
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2159,7 +2159,7 @@
2159
2159
  return [...attributeTokens].sort().join(" ");
2160
2160
  }
2161
2161
 
2162
- /*! @azure/msal-common v16.15.0 2026-10-27 */
2162
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
2163
2163
 
2164
2164
  /*
2165
2165
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3127,7 +3127,7 @@
3127
3127
  };
3128
3128
  }
3129
3129
 
3130
- /*! @azure/msal-common v16.15.0 2026-10-27 */
3130
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
3131
3131
 
3132
3132
  /*
3133
3133
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3161,7 +3161,7 @@
3161
3161
  }
3162
3162
  }
3163
3163
 
3164
- /*! @azure/msal-common v16.15.0 2026-10-27 */
3164
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
3165
3165
 
3166
3166
  /*
3167
3167
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3357,7 +3357,7 @@
3357
3357
  }
3358
3358
  }
3359
3359
 
3360
- /*! @azure/msal-common v16.15.0 2026-10-27 */
3360
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
3361
3361
 
3362
3362
  /*
3363
3363
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3857,7 +3857,7 @@
3857
3857
  }
3858
3858
  }
3859
3859
 
3860
- /*! @azure/msal-common v16.15.0 2026-10-27 */
3860
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
3861
3861
 
3862
3862
  /*
3863
3863
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3988,7 +3988,7 @@
3988
3988
  }
3989
3989
  }
3990
3990
 
3991
- /*! @azure/msal-common v16.15.0 2026-10-27 */
3991
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
3992
3992
 
3993
3993
  /*
3994
3994
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4036,7 +4036,7 @@
4036
4036
  },
4037
4037
  };
4038
4038
 
4039
- /*! @azure/msal-common v16.15.0 2026-10-27 */
4039
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
4040
4040
 
4041
4041
  /*
4042
4042
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4059,7 +4059,7 @@
4059
4059
  },
4060
4060
  };
4061
4061
 
4062
- /*! @azure/msal-common v16.15.0 2026-10-27 */
4062
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
4063
4063
  /*
4064
4064
  * Copyright (c) Microsoft Corporation. All rights reserved.
4065
4065
  * Licensed under the MIT License.
@@ -4348,12 +4348,12 @@
4348
4348
  }
4349
4349
  }
4350
4350
 
4351
- /*! @azure/msal-common v16.15.0 2026-10-27 */
4351
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
4352
4352
  /* eslint-disable header/header */
4353
4353
  const name$1 = "@azure/msal-common";
4354
- const version$1 = "16.15.0";
4354
+ const version$1 = "16.16.1";
4355
4355
 
4356
- /*! @azure/msal-common v16.15.0 2026-10-27 */
4356
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
4357
4357
  /*
4358
4358
  * Copyright (c) Microsoft Corporation. All rights reserved.
4359
4359
  * Licensed under the MIT License.
@@ -4361,7 +4361,7 @@
4361
4361
  const cacheQuotaExceeded = "cache_quota_exceeded";
4362
4362
  const cacheErrorUnknown = "cache_error_unknown";
4363
4363
 
4364
- /*! @azure/msal-common v16.15.0 2026-10-27 */
4364
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
4365
4365
 
4366
4366
  /*
4367
4367
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4399,7 +4399,7 @@
4399
4399
  }
4400
4400
  }
4401
4401
 
4402
- /*! @azure/msal-common v16.15.0 2026-10-27 */
4402
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
4403
4403
 
4404
4404
  /*
4405
4405
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4648,6 +4648,7 @@
4648
4648
  };
4649
4649
  const tokenKeys = this.getTokenKeys();
4650
4650
  const currentScopes = ScopeSet.fromString(credential.target, correlationId);
4651
+ const accessTokenKeysToRemove = [];
4651
4652
  tokenKeys.accessToken.forEach((key) => {
4652
4653
  if (!this.accessTokenKeyMatchesFilter(key, accessTokenFilter, false)) {
4653
4654
  return;
@@ -4657,10 +4658,13 @@
4657
4658
  this.credentialMatchesFilter(tokenEntity, accessTokenFilter, correlationId)) {
4658
4659
  const tokenScopeSet = ScopeSet.fromString(tokenEntity.target, correlationId);
4659
4660
  if (tokenScopeSet.intersectingScopeSets(currentScopes)) {
4660
- this.removeAccessToken(key, correlationId);
4661
+ accessTokenKeysToRemove.push(key);
4661
4662
  }
4662
4663
  }
4663
4664
  });
4665
+ for (const key of accessTokenKeysToRemove) {
4666
+ await this.removeAccessTokenAndTokenBindingKey(key, correlationId, credential.keyId);
4667
+ }
4664
4668
  await this.setAccessTokenCredential(credential, correlationId, kmsi, additionalCacheKeyHash);
4665
4669
  }
4666
4670
  /**
@@ -4859,19 +4863,25 @@
4859
4863
  * @param account
4860
4864
  */
4861
4865
  removeAccount(account, correlationId) {
4862
- this.removeAccountContext(account, correlationId);
4863
4866
  const accountKeys = this.getAccountKeys();
4864
4867
  const keyFilter = (key) => {
4865
4868
  return (key.includes(account.homeAccountId) &&
4866
4869
  key.includes(account.environment));
4867
4870
  };
4871
+ this.getTokenKeys()
4872
+ .idToken.filter(keyFilter)
4873
+ .forEach((key) => {
4874
+ this.removeIdToken(key, correlationId);
4875
+ });
4876
+ this.removeAccountContext(account, correlationId);
4868
4877
  accountKeys.filter(keyFilter).forEach((key) => {
4869
4878
  this.removeItem(key, correlationId);
4870
4879
  this.performanceClient.incrementFields({ accountsRemoved: 1 }, correlationId);
4871
4880
  });
4872
4881
  }
4873
4882
  /**
4874
- * Removes credentials associated with the provided account
4883
+ * Removes access and refresh tokens associated with the provided account,
4884
+ * preserving the account and its ID tokens.
4875
4885
  * @param account
4876
4886
  */
4877
4887
  removeAccountContext(account, correlationId) {
@@ -4880,9 +4890,6 @@
4880
4890
  return (key.includes(account.homeAccountId) &&
4881
4891
  key.includes(account.environment));
4882
4892
  };
4883
- allTokenKeys.idToken.filter(keyFilter).forEach((key) => {
4884
- this.removeIdToken(key, correlationId);
4885
- });
4886
4893
  allTokenKeys.accessToken.filter(keyFilter).forEach((key) => {
4887
4894
  this.removeAccessToken(key, correlationId);
4888
4895
  });
@@ -4896,12 +4903,32 @@
4896
4903
  * @param correlationId
4897
4904
  */
4898
4905
  removeAccessToken(key, correlationId) {
4906
+ const credential = this.removeAccessTokenCredential(key, correlationId);
4907
+ if (credential) {
4908
+ void this.removeTokenBindingKeyForCredential(credential, correlationId);
4909
+ }
4910
+ }
4911
+ /**
4912
+ * Removes an access token and waits for any unreferenced token-binding key
4913
+ * cleanup. Internal callers that require deterministic cleanup should use
4914
+ * this method instead of the synchronous public cache contract.
4915
+ */
4916
+ async removeAccessTokenAndTokenBindingKey(key, correlationId, preservedKeyId) {
4917
+ const credential = this.removeAccessTokenCredential(key, correlationId);
4918
+ if (credential) {
4919
+ await this.removeTokenBindingKeyForCredential(credential, correlationId, preservedKeyId);
4920
+ }
4921
+ }
4922
+ removeAccessTokenCredential(key, correlationId) {
4899
4923
  const credential = this.getAccessTokenCredential(key, correlationId);
4900
4924
  if (!credential) {
4901
- return;
4925
+ return null;
4902
4926
  }
4903
4927
  this.removeItem(key, correlationId);
4904
4928
  this.performanceClient.incrementFields({ accessTokensRemoved: 1 }, correlationId);
4929
+ return credential;
4930
+ }
4931
+ async removeTokenBindingKeyForCredential(credential, correlationId, preservedKeyId) {
4905
4932
  // Remove Token Binding Key from key store for token-bound access token credentials
4906
4933
  if (credential.credentialType.toLowerCase() ===
4907
4934
  CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {
@@ -4911,19 +4938,28 @@
4911
4938
  case AuthenticationScheme$1.DPOP.toLowerCase(): {
4912
4939
  const accessTokenWithAuthSchemeEntity = credential;
4913
4940
  const kid = accessTokenWithAuthSchemeEntity.keyId;
4914
- if (kid) {
4915
- void this.tokenBindingKeyManager
4916
- .removeTokenBindingKey(kid, correlationId)
4917
- .catch(() => {
4941
+ if (kid &&
4942
+ kid !== preservedKeyId &&
4943
+ !this.isTokenBindingKeyReferenced(kid, correlationId)) {
4944
+ try {
4945
+ await this.tokenBindingKeyManager.removeTokenBindingKey(kid, correlationId);
4946
+ }
4947
+ catch {
4918
4948
  this.commonLogger.error("0id34f", correlationId);
4919
4949
  this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
4920
- });
4950
+ }
4921
4951
  }
4922
4952
  break;
4923
4953
  }
4924
4954
  }
4925
4955
  }
4926
4956
  }
4957
+ isTokenBindingKeyReferenced(keyId, correlationId) {
4958
+ return this.getTokenKeys().accessToken.some((accessTokenKey) => {
4959
+ const accessToken = this.getAccessTokenCredential(accessTokenKey, correlationId);
4960
+ return accessToken?.keyId === keyId;
4961
+ });
4962
+ }
4927
4963
  /**
4928
4964
  * Removes all app metadata objects from cache.
4929
4965
  */
@@ -5062,6 +5098,7 @@
5062
5098
  const scopes = ScopeSet.createSearchScopes(request.scopes, correlationId);
5063
5099
  const authScheme = request.authenticationScheme ||
5064
5100
  AuthenticationScheme$1.BEARER;
5101
+ const normalizedAuthScheme = authScheme.toLowerCase();
5065
5102
  /*
5066
5103
  * Distinguish between Bearer and PoP/SSH token cache types
5067
5104
  * Cast to lowercase to handle "bearer" from ADFS
@@ -5087,7 +5124,10 @@
5087
5124
  tokenType: authScheme,
5088
5125
  keyId: authScheme === AuthenticationScheme$1.SSH
5089
5126
  ? request.sshKid
5090
- : undefined,
5127
+ : normalizedAuthScheme ===
5128
+ AuthenticationScheme$1.DPOP.toLowerCase()
5129
+ ? request.popKid || request.dpopJkt
5130
+ : undefined,
5091
5131
  additionalCacheKeyComponents: additionalCacheKeyComponents,
5092
5132
  };
5093
5133
  const accessTokenKeys = (tokenKeys && tokenKeys.accessToken) ||
@@ -5587,7 +5627,7 @@
5587
5627
  }
5588
5628
  }
5589
5629
 
5590
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5630
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5591
5631
  /*
5592
5632
  * Copyright (c) Microsoft Corporation. All rights reserved.
5593
5633
  * Licensed under the MIT License.
@@ -5652,7 +5692,7 @@
5652
5692
  "fetchRetryCount",
5653
5693
  ]);
5654
5694
 
5655
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5695
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5656
5696
 
5657
5697
  /*
5658
5698
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5710,7 +5750,7 @@
5710
5750
  }
5711
5751
  }
5712
5752
 
5713
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5753
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5714
5754
 
5715
5755
  /*
5716
5756
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5808,7 +5848,7 @@
5808
5848
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5809
5849
  }
5810
5850
 
5811
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5851
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5812
5852
  /*
5813
5853
  * Copyright (c) Microsoft Corporation. All rights reserved.
5814
5854
  * Licensed under the MIT License.
@@ -5835,7 +5875,7 @@
5835
5875
  }
5836
5876
  }
5837
5877
 
5838
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5878
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5839
5879
 
5840
5880
  /*
5841
5881
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5856,7 +5896,7 @@
5856
5896
  return new JoseHeaderError(code, correlationId);
5857
5897
  }
5858
5898
 
5859
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5899
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5860
5900
  /*
5861
5901
  * Copyright (c) Microsoft Corporation. All rights reserved.
5862
5902
  * Licensed under the MIT License.
@@ -5881,7 +5921,7 @@
5881
5921
  return Object.getPrototypeOf(value) === proto;
5882
5922
  }
5883
5923
 
5884
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5924
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5885
5925
  /*
5886
5926
  * Copyright (c) Microsoft Corporation. All rights reserved.
5887
5927
  * Licensed under the MIT License.
@@ -5891,7 +5931,7 @@
5891
5931
  const missingJwkError = "missing_jwk_error";
5892
5932
  const invalidJwkError = "invalid_jwk_error";
5893
5933
 
5894
- /*! @azure/msal-common v16.15.0 2026-10-27 */
5934
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5895
5935
 
5896
5936
  /*
5897
5937
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5957,7 +5997,7 @@
5957
5997
  }
5958
5998
  }
5959
5999
 
5960
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6000
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
5961
6001
 
5962
6002
  /*
5963
6003
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6058,7 +6098,7 @@
6058
6098
  }
6059
6099
  }
6060
6100
 
6061
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6101
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6062
6102
 
6063
6103
  /*
6064
6104
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6108,13 +6148,22 @@
6108
6148
  throw createClientConfigurationError(invalidDpopNonce, correlationId);
6109
6149
  }
6110
6150
  }
6151
+ /**
6152
+ * Validates and normalizes the HTTP resource context for a DPoP-bound request.
6153
+ * @internal
6154
+ */
6155
+ function normalizeDpopResourceRequestContext(context, correlationId = "") {
6156
+ return {
6157
+ htm: normalizeHtm(context.htm, correlationId),
6158
+ htu: normalizeHtu(context.htu, correlationId),
6159
+ };
6160
+ }
6111
6161
  /**
6112
6162
  * Builds RFC 9449 DPoP proof JWT payloads for token-endpoint and
6113
6163
  * resource-endpoint proof bindings.
6114
6164
  *
6115
- * Not exported from any public package entry point.
6116
- * This helper is internal-only until DPoP is wired into acquisition flows
6117
- * in a subsequent work item.
6165
+ * Exported from package entry points for use by MSAL Browser.
6166
+ * This helper remains an unsupported internal API for direct consumers.
6118
6167
  *
6119
6168
  * DPoP proofs do not contain SHR fields (at, ts, m, u, p, q).
6120
6169
  * @internal
@@ -6169,10 +6218,11 @@
6169
6218
  */
6170
6219
  buildResourceProofClaims(params, correlationId = "") {
6171
6220
  validateDpopNonce(params.nonce, correlationId);
6221
+ const resourceContext = normalizeDpopResourceRequestContext(params, correlationId);
6172
6222
  const claims = {
6173
6223
  jti: this.cryptoUtils.createNewGuid(),
6174
- htm: normalizeHtm(params.htm, correlationId),
6175
- htu: normalizeHtu(params.htu, correlationId),
6224
+ htm: resourceContext.htm,
6225
+ htu: resourceContext.htu,
6176
6226
  ath: params.ath,
6177
6227
  iat: nowSeconds(),
6178
6228
  };
@@ -6203,7 +6253,7 @@
6203
6253
  }
6204
6254
  }
6205
6255
 
6206
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6256
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6207
6257
  /*
6208
6258
  * Copyright (c) Microsoft Corporation. All rights reserved.
6209
6259
  * Licensed under the MIT License.
@@ -6267,7 +6317,7 @@
6267
6317
  uiNotAllowed: uiNotAllowed
6268
6318
  });
6269
6319
 
6270
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6320
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6271
6321
 
6272
6322
  /*
6273
6323
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6334,7 +6384,7 @@
6334
6384
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
6335
6385
  }
6336
6386
 
6337
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6387
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6338
6388
 
6339
6389
  /*
6340
6390
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6353,7 +6403,7 @@
6353
6403
  }
6354
6404
  }
6355
6405
 
6356
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6406
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6357
6407
 
6358
6408
  /*
6359
6409
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6424,7 +6474,7 @@
6424
6474
  }
6425
6475
  }
6426
6476
 
6427
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6477
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6428
6478
 
6429
6479
  /*
6430
6480
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6852,7 +6902,7 @@
6852
6902
  return baseAccount;
6853
6903
  }
6854
6904
 
6855
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6905
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6856
6906
  /*
6857
6907
  * Copyright (c) Microsoft Corporation. All rights reserved.
6858
6908
  * Licensed under the MIT License.
@@ -6862,7 +6912,7 @@
6862
6912
  UPN: "UPN",
6863
6913
  };
6864
6914
 
6865
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6915
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6866
6916
  /*
6867
6917
  * Copyright (c) Microsoft Corporation. All rights reserved.
6868
6918
  * Licensed under the MIT License.
@@ -6881,7 +6931,7 @@
6881
6931
  }
6882
6932
  }
6883
6933
 
6884
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6934
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6885
6935
 
6886
6936
  /*
6887
6937
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6905,7 +6955,7 @@
6905
6955
  };
6906
6956
  }
6907
6957
 
6908
- /*! @azure/msal-common v16.15.0 2026-10-27 */
6958
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6909
6959
 
6910
6960
  /*
6911
6961
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6995,7 +7045,7 @@
6995
7045
  return undefined;
6996
7046
  }
6997
7047
 
6998
- /*! @azure/msal-common v16.15.0 2026-10-27 */
7048
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
6999
7049
 
7000
7050
  /*
7001
7051
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7026,7 +7076,7 @@
7026
7076
  return new NetworkError(error, httpStatus, responseHeaders);
7027
7077
  }
7028
7078
 
7029
- /*! @azure/msal-common v16.15.0 2026-10-27 */
7079
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
7030
7080
 
7031
7081
  /*
7032
7082
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7160,7 +7210,7 @@
7160
7210
  return response;
7161
7211
  }
7162
7212
 
7163
- /*! @azure/msal-common v16.15.0 2026-10-27 */
7213
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
7164
7214
 
7165
7215
  /*
7166
7216
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7427,7 +7477,7 @@
7427
7477
  }
7428
7478
  }
7429
7479
 
7430
- /*! @azure/msal-common v16.15.0 2026-10-27 */
7480
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
7431
7481
 
7432
7482
  /*
7433
7483
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7657,7 +7707,7 @@
7657
7707
  return account.loginHint || account.idTokenClaims?.login_hint || null;
7658
7708
  }
7659
7709
 
7660
- /*! @azure/msal-common v16.15.0 2026-10-27 */
7710
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
7661
7711
 
7662
7712
  /*
7663
7713
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8206,7 +8256,7 @@
8206
8256
  }
8207
8257
  }
8208
8258
 
8209
- /*! @azure/msal-common v16.15.0 2026-10-27 */
8259
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
8210
8260
 
8211
8261
  /*
8212
8262
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8441,7 +8491,7 @@
8441
8491
  }
8442
8492
  }
8443
8493
 
8444
- /*! @azure/msal-common v16.15.0 2026-10-27 */
8494
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
8445
8495
 
8446
8496
  /*
8447
8497
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8734,7 +8784,7 @@
8734
8784
  clearNativeBrokerErrorCode() { }
8735
8785
  }
8736
8786
 
8737
- /*! @azure/msal-common v16.15.0 2026-10-27 */
8787
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
8738
8788
 
8739
8789
  /*
8740
8790
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8861,7 +8911,7 @@
8861
8911
  }
8862
8912
  }
8863
8913
 
8864
- /*! @azure/msal-common v16.15.0 2026-10-27 */
8914
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
8865
8915
 
8866
8916
  /*
8867
8917
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8877,7 +8927,7 @@
8877
8927
  },
8878
8928
  };
8879
8929
 
8880
- /*! @azure/msal-common v16.15.0 2026-10-27 */
8930
+ /*! @azure/msal-common v16.16.1 2026-11-06 */
8881
8931
 
8882
8932
  /*
8883
8933
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9026,6 +9076,7 @@
9026
9076
  const PlatformAuthHandleNativeResponse = "platformAuthHandleNativeResponse";
9027
9077
  const PlatformAuthCacheAccount = "platformAuthCacheAccount";
9028
9078
  const PlatformAuthCacheNativeTokens = "platformAuthCacheNativeTokens";
9079
+ const PlatformAuthDpopKeyCleanup = "platformAuthDpopKeyCleanup";
9029
9080
  const RemoveHiddenIframe = "removeHiddenIframe";
9030
9081
  const ImportExistingCache = "importExistingCache";
9031
9082
  /**
@@ -10586,6 +10637,19 @@
10586
10637
  return cacheKeys;
10587
10638
  }
10588
10639
  }
10640
+ /**
10641
+ * Returns whether a key is available in persistent storage. Unlike
10642
+ * containsKey, this does not consult the in-memory fallback.
10643
+ */
10644
+ async containsKeyInPersistentStorage(key, correlationId) {
10645
+ try {
10646
+ return await this.indexedDBCache.containsKey(key);
10647
+ }
10648
+ catch (e) {
10649
+ this.handleDatabaseAccessError(e, correlationId);
10650
+ return false;
10651
+ }
10652
+ }
10589
10653
  /**
10590
10654
  * Returns true or false if the given key is present in the cache.
10591
10655
  * @param key
@@ -10691,6 +10755,12 @@
10691
10755
  throw createClientAuthError(bindingKeyNotRemoved, correlationId);
10692
10756
  }
10693
10757
  }
10758
+ /**
10759
+ * Returns whether a browser token-binding key is available.
10760
+ */
10761
+ async hasTokenBindingKey(keyId, correlationId) {
10762
+ return this.cache.containsKey(keyId, correlationId);
10763
+ }
10694
10764
  /**
10695
10765
  * Clears browser token-binding keys from memory and persistent storage.
10696
10766
  * @param correlationId - Request correlation identifier.
@@ -10752,6 +10822,13 @@
10752
10822
  }
10753
10823
  return cachedKeyPair;
10754
10824
  }
10825
+ /**
10826
+ * Returns whether a browser token-binding key survived in persistent
10827
+ * storage and can be restored after a redirect navigation.
10828
+ */
10829
+ async isTokenBindingKeyPersisted(keyId, correlationId) {
10830
+ return this.cache.containsKeyInPersistentStorage(keyId, correlationId);
10831
+ }
10755
10832
  /** @internal */
10756
10833
  getTokenBindingKeyTelemetry(cachedKeyPair, fallbackAlgorithm) {
10757
10834
  return {
@@ -11585,7 +11662,7 @@
11585
11662
 
11586
11663
  /* eslint-disable header/header */
11587
11664
  const name = "@azure/msal-browser";
11588
- const version = "5.27.0";
11665
+ const version = "5.29.0";
11589
11666
 
11590
11667
  /*
11591
11668
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -12217,7 +12294,7 @@
12217
12294
  throw cacheError;
12218
12295
  }
12219
12296
  // When cache quota is exceeded, start removing access tokens until we can successfully set the item
12220
- this.removeAccessToken(accessTokenKeys[i], correlationId, false // Don't save token keys yet, do it at the end
12297
+ await this.removeAccessTokenAndTokenBindingKey(accessTokenKeys[i], correlationId, undefined, false // Don't save token keys yet, do it at the end
12221
12298
  );
12222
12299
  }
12223
12300
  else {
@@ -12359,6 +12436,13 @@
12359
12436
  super.removeAccessToken(key, correlationId);
12360
12437
  updateTokenKeys && this.removeAccessTokenKeys([key], correlationId);
12361
12438
  }
12439
+ /**
12440
+ * Removes an access token and awaits token-binding key cleanup.
12441
+ */
12442
+ async removeAccessTokenAndTokenBindingKey(key, correlationId, preservedKeyId, updateTokenKeys = true) {
12443
+ await super.removeAccessTokenAndTokenBindingKey(key, correlationId, preservedKeyId);
12444
+ updateTokenKeys && this.removeAccessTokenKeys([key], correlationId);
12445
+ }
12362
12446
  /**
12363
12447
  * Remove access token key from the key map
12364
12448
  * @param key
@@ -13472,19 +13556,13 @@
13472
13556
  }
13473
13557
  /**
13474
13558
  * Resolves the token-binding parameters needed before building authorize or token requests.
13475
- * Public PCA DPoP requests use a dpopJkt thumbprint, while platform broker PoP requests use
13476
- * a reqCnf confirmation claim. Requests that do not require request-time token binding return
13477
- * no additional parameters.
13559
+ * DPoP requests provision a browser key for token endpoint redemption. Platform broker
13560
+ * authorization requests retain the key for auth-code fallback but suppress dpop_jkt on
13561
+ * /authorize. Platform broker PoP requests use a reqCnf confirmation claim.
13478
13562
  */
13479
13563
  async function getTokenBindingRequestParams(request, tokenBindingKeyManager, logger, performanceClient) {
13480
13564
  switch (request.authenticationScheme) {
13481
13565
  case AuthenticationScheme$1.DPOP:
13482
- if (request.platformBroker) {
13483
- return {};
13484
- }
13485
- if (request.dpopJkt) {
13486
- return { dpopJkt: request.dpopJkt };
13487
- }
13488
13566
  return {
13489
13567
  dpopJkt: await tokenBindingKeyManager.provisionTokenBindingKey({
13490
13568
  tokenBindingKeyType: AuthenticationScheme$1.DPOP.toLowerCase(),
@@ -13507,6 +13585,36 @@
13507
13585
  return {};
13508
13586
  }
13509
13587
  }
13588
+ /**
13589
+ * Removes a DPoP key that was provisioned for an authorization attempt which
13590
+ * did not complete. Cleanup failures are recorded without replacing the
13591
+ * original authorization error.
13592
+ */
13593
+ async function removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient) {
13594
+ if (request.authenticationScheme !== AuthenticationScheme$1.DPOP ||
13595
+ !request.dpopJkt) {
13596
+ return;
13597
+ }
13598
+ try {
13599
+ await tokenBindingKeyManager.removeTokenBindingKey(request.dpopJkt, request.correlationId);
13600
+ }
13601
+ catch {
13602
+ logger.error("1su7ne", request.correlationId);
13603
+ performanceClient.incrementFields({ removeTokenBindingKeyFailure: 1 }, request.correlationId);
13604
+ }
13605
+ }
13606
+ /**
13607
+ * Returns whether an MSAL-owned DPoP key is available in persistent storage
13608
+ * before a redirect navigation. Custom managers without a persistence probe
13609
+ * retain their existing behavior.
13610
+ */
13611
+ async function isTokenBindingKeyPersistedForRedirect(request, tokenBindingKeyManager) {
13612
+ const keyId = request.dpopJkt ?? request.keyId;
13613
+ if (!keyId || !tokenBindingKeyManager.isTokenBindingKeyPersisted) {
13614
+ return true;
13615
+ }
13616
+ return tokenBindingKeyManager.isTokenBindingKeyPersisted(keyId, request.correlationId);
13617
+ }
13510
13618
  /**
13511
13619
  * Initializer function for all request APIs
13512
13620
  * @param request
@@ -14194,12 +14302,26 @@
14194
14302
  * Copyright (c) Microsoft Corporation. All rights reserved.
14195
14303
  * Licensed under the MIT License.
14196
14304
  */
14305
+ /**
14306
+ * Key storage enclaves supported by the platform broker.
14307
+ */
14308
+ const PlatformAuthEnclave = {
14309
+ /**
14310
+ * Persisted software key using MS_KEY_STORAGE_PROVIDER.
14311
+ */
14312
+ SOFTWARE: "sw"};
14197
14313
  /**
14198
14314
  * Token types supported by the platform broker request contract.
14199
14315
  */
14200
14316
  const PlatformAuthTokenType = {
14201
14317
  DPOP_WITH_PROOF: "dpop+proof",
14202
14318
  };
14319
+ /**
14320
+ * Token binding preferences supported by the platform broker.
14321
+ */
14322
+ const PlatformAuthBindingPreference = {
14323
+ ATTESTED: "attested",
14324
+ };
14203
14325
  const PROOF_OF_POSSESSION_TOKEN_TYPES = [
14204
14326
  AuthenticationScheme$1.POP,
14205
14327
  AuthenticationScheme$1.DPOP,
@@ -14215,19 +14337,19 @@
14215
14337
  /**
14216
14338
  * Adds canonical proof request fields to the broker no-cache property bag.
14217
14339
  */
14218
- function createPlatformAuthExtraParametersNoCache(extraParametersNoCache, isProofOfPossessionRequest, resourceRequestMethod, resourceRequestUri, dpopNonce) {
14219
- if (!isProofOfPossessionRequest) {
14220
- return extraParametersNoCache;
14340
+ function createPlatformAuthExtraParametersNoCache(tokenType, resourceRequestMethod, resourceRequestUri, dpopNonce) {
14341
+ if (!isProofOfPossessionTokenType(tokenType)) {
14342
+ return undefined;
14221
14343
  }
14222
14344
  return {
14223
- ...extraParametersNoCache,
14224
14345
  ...(resourceRequestMethod && {
14225
14346
  pop_method: resourceRequestMethod,
14226
14347
  }),
14227
14348
  ...(resourceRequestUri && {
14228
14349
  pop_url: resourceRequestUri,
14229
14350
  }),
14230
- ...(dpopNonce && {
14351
+ ...(tokenType === PlatformAuthTokenType.DPOP_WITH_PROOF &&
14352
+ dpopNonce && {
14231
14353
  pop_nonce: dpopNonce,
14232
14354
  }),
14233
14355
  };
@@ -14375,6 +14497,7 @@
14375
14497
  * Copyright (c) Microsoft Corporation. All rights reserved.
14376
14498
  * Licensed under the MIT License.
14377
14499
  */
14500
+ const DPOP_POP_KID_NOT_SUPPORTED = "dpop_pop_kid_not_supported";
14378
14501
  class PlatformAuthInteractionClient extends BaseInteractionClient {
14379
14502
  constructor(config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, apiId, performanceClient, provider, accountId, nativeStorageImpl, correlationId, tokenBindingKeyManager) {
14380
14503
  super(config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, provider, tokenBindingKeyManager);
@@ -14432,35 +14555,43 @@
14432
14555
  }, e);
14433
14556
  throw e;
14434
14557
  }
14435
- // check if the tokens can be retrieved from internal cache
14436
- try {
14437
- const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
14438
- // Served from the native internal cache; token did not come directly from the broker
14439
- nativeATMeasurement.add({
14440
- isNativeBroker: false,
14441
- });
14442
- nativeATMeasurement.end({
14443
- success: true,
14444
- fromCache: true,
14445
- });
14446
- return result;
14447
- }
14448
- catch (e) {
14449
- if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
14450
- this.logger.info("0eitbc", this.correlationId);
14558
+ if (this.apiId === ApiId.acquireTokenSilent_silentFlow) {
14559
+ let cachedResult;
14560
+ try {
14561
+ cachedResult = await this.acquireTokensFromCache(this.accountId, nativeRequest, cacheLookupPolicy);
14562
+ }
14563
+ catch (e) {
14564
+ if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
14565
+ this.logger.info("0eitbc", this.correlationId);
14566
+ nativeATMeasurement.add({
14567
+ isNativeBroker: false,
14568
+ });
14569
+ nativeATMeasurement.end({
14570
+ success: false,
14571
+ });
14572
+ await this.resetGeneratedDpopRequestKeyBestEffort(nativeRequest);
14573
+ throw e;
14574
+ }
14575
+ // continue with a native call for any and all errors
14576
+ this.logger.info("0957j1", this.correlationId);
14577
+ }
14578
+ if (cachedResult) {
14579
+ // Served from the native internal cache; token did not come directly from the broker
14451
14580
  nativeATMeasurement.add({
14452
14581
  isNativeBroker: false,
14453
14582
  });
14454
14583
  nativeATMeasurement.end({
14455
- success: false,
14584
+ success: true,
14585
+ fromCache: true,
14456
14586
  });
14457
- throw e;
14587
+ await this.resetGeneratedDpopRequestKey(nativeRequest);
14588
+ return cachedResult;
14458
14589
  }
14459
- // continue with a native call for any and all errors
14460
- this.logger.info("0957j1", this.correlationId);
14461
14590
  }
14462
14591
  // dispatch the request to the broker
14463
14592
  try {
14593
+ await this.prepareDpopBrokerRequest(nativeRequest);
14594
+ this.addDpopBrokerAttemptTelemetry(nativeRequest);
14464
14595
  const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
14465
14596
  const result = await invokeAsync(this.handleNativeResponse.bind(this), PlatformAuthHandleNativeResponse, this.logger, this.performanceClient, this.correlationId)(validatedResponse, nativeRequest, reqTimestamp, request.storeInCache);
14466
14597
  nativeATMeasurement.end({
@@ -14478,6 +14609,7 @@
14478
14609
  success: false,
14479
14610
  }, e);
14480
14611
  this.setBrokerErrorTelemetry(e);
14612
+ await this.resetGeneratedDpopRequestKeyBestEffort(nativeRequest);
14481
14613
  throw e;
14482
14614
  }
14483
14615
  }
@@ -14512,6 +14644,7 @@
14512
14644
  scopes: ScopeSet.fromString(request.scope, this.correlationId).asArray(),
14513
14645
  account: cachedAccount,
14514
14646
  forceRefresh: false,
14647
+ ...this.createSilentCacheTokenBindingParameters(request),
14515
14648
  resource: request.extraParameters?.resource,
14516
14649
  };
14517
14650
  // Preserve FMI partition semantics for silent cache filtering.
@@ -14521,12 +14654,41 @@
14521
14654
  return silentRequest;
14522
14655
  }
14523
14656
  /**
14524
- * Fetches the tokens from the cache if un-expired
14657
+ * Maps platform-broker token-binding state to silent-cache request fields.
14658
+ * @param request
14659
+ */
14660
+ createSilentCacheTokenBindingParameters(request) {
14661
+ const authenticationScheme = this.isDpopBrokerRequest(request)
14662
+ ? AuthenticationScheme$1.DPOP
14663
+ : request.tokenType;
14664
+ if (authenticationScheme !== AuthenticationScheme$1.DPOP &&
14665
+ authenticationScheme !== AuthenticationScheme$1.POP) {
14666
+ return { authenticationScheme };
14667
+ }
14668
+ return {
14669
+ authenticationScheme,
14670
+ ...(authenticationScheme === AuthenticationScheme$1.DPOP &&
14671
+ request.keyId && { dpopJkt: request.keyId }),
14672
+ ...(authenticationScheme === AuthenticationScheme$1.POP &&
14673
+ request.signPopToken === false &&
14674
+ request.keyId && { popKid: request.keyId }),
14675
+ resourceRequestMethod: request.resourceRequestMethod,
14676
+ resourceRequestUri: request.resourceRequestUri,
14677
+ };
14678
+ }
14679
+ /**
14680
+ * Fetches unexpired tokens when allowed by cache policy.
14525
14681
  * @param nativeAccountId
14526
14682
  * @param request
14527
- * @returns authenticationResult
14683
+ * @param cacheLookupPolicy
14684
+ * @returns Cached result, or undefined when cache policy bypasses lookup.
14528
14685
  */
14529
- async acquireTokensFromCache(nativeAccountId, request) {
14686
+ async acquireTokensFromCache(nativeAccountId, request, cacheLookupPolicy = CacheLookupPolicy.Default) {
14687
+ if (cacheLookupPolicy === CacheLookupPolicy.RefreshTokenAndNetwork ||
14688
+ cacheLookupPolicy === CacheLookupPolicy.Skip) {
14689
+ this.logger.verbose("03uwyk", this.correlationId);
14690
+ return undefined;
14691
+ }
14530
14692
  if (!nativeAccountId) {
14531
14693
  this.logger.warning("1ndf3e", this.correlationId);
14532
14694
  throw createClientAuthError(noAccountFound, this.correlationId);
@@ -14568,10 +14730,22 @@
14568
14730
  const nativeRequest = await invokeAsync(this.initializePlatformRequest.bind(this), PlatformAuthInteractionClientInitializeRequest, this.logger, this.performanceClient, this.correlationId)(request);
14569
14731
  const navigateToLoginRequestUrl = options?.navigateToLoginRequestUrl ?? true;
14570
14732
  try {
14571
- await this.platformAuthProvider.sendMessage(nativeRequest);
14733
+ await this.prepareDpopBrokerRequest(nativeRequest);
14734
+ this.addDpopBrokerAttemptTelemetry(nativeRequest);
14735
+ const response = await this.platformAuthProvider.sendMessage(nativeRequest);
14736
+ const dpopBrokerOutcome = this.validateDpopBrokerOutcome(response, nativeRequest);
14737
+ if (dpopBrokerOutcome === "L3") {
14738
+ await this.resetGeneratedDpopRequestKey(nativeRequest);
14739
+ }
14572
14740
  }
14573
14741
  catch (e) {
14574
- // Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
14742
+ /*
14743
+ * Raw persistent/transient broker errors are retrieved again in
14744
+ * phase two. Availability errors are thrown for controller-managed
14745
+ * web fallback, while translated cancellation, network, and
14746
+ * interaction-required errors are surfaced without being swallowed.
14747
+ */
14748
+ await this.resetGeneratedDpopRequestKeyBestEffort(nativeRequest);
14575
14749
  if (e instanceof NativeAuthError) {
14576
14750
  const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
14577
14751
  serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
@@ -14586,6 +14760,16 @@
14586
14760
  throw e;
14587
14761
  }
14588
14762
  }
14763
+ else if (this.isDpopBrokerRequest(nativeRequest)) {
14764
+ throw e;
14765
+ }
14766
+ }
14767
+ try {
14768
+ await this.ensureRedirectDpopKeyIsPersisted(nativeRequest);
14769
+ }
14770
+ catch (e) {
14771
+ await this.resetGeneratedDpopRequestKeyBestEffort(nativeRequest);
14772
+ throw e;
14589
14773
  }
14590
14774
  this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify({
14591
14775
  ...nativeRequest,
@@ -14600,7 +14784,14 @@
14600
14784
  ? UrlString.getAbsoluteUrl(request.redirectStartPage || window.location.href, getCurrentUri(), this.correlationId)
14601
14785
  : getRedirectUri(request.redirectUri, this.config.auth.redirectUri, this.logger, this.correlationId);
14602
14786
  rootMeasurement.end({ success: true });
14603
- await this.navigationClient.navigateExternal(redirectUri, navigationOptions); // Need to treat this as external to ensure handleRedirectPromise is run again
14787
+ try {
14788
+ await this.navigationClient.navigateExternal(redirectUri, navigationOptions); // Need to treat this as external to ensure handleRedirectPromise is run again
14789
+ }
14790
+ catch (e) {
14791
+ this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));
14792
+ await this.resetGeneratedDpopRequestKeyBestEffort(nativeRequest);
14793
+ throw e;
14794
+ }
14604
14795
  }
14605
14796
  /**
14606
14797
  * If the previous page called native platform for a token using redirect APIs, send the same request again and return the response
@@ -14633,6 +14824,8 @@
14633
14824
  this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));
14634
14825
  const reqTimestamp = nowSeconds();
14635
14826
  try {
14827
+ await this.prepareDpopBrokerRequest(request, true);
14828
+ this.addDpopBrokerAttemptTelemetry(request);
14636
14829
  this.logger.verbose("003x5a", this.correlationId);
14637
14830
  const response = await this.platformAuthProvider.sendMessage(request);
14638
14831
  const authResult = await invokeAsync(this.handleNativeResponse.bind(this), PlatformAuthHandleNativeResponse, this.logger, this.performanceClient, this.correlationId)(response, request, reqTimestamp, storeInCache);
@@ -14641,7 +14834,12 @@
14641
14834
  return authResult;
14642
14835
  }
14643
14836
  catch (e) {
14837
+ if (e instanceof NativeAuthError) {
14838
+ const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
14839
+ serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
14840
+ }
14644
14841
  this.setBrokerErrorTelemetry(e);
14842
+ await this.resetGeneratedDpopRequestKeyBestEffort(request);
14645
14843
  throw e;
14646
14844
  }
14647
14845
  }
@@ -14661,6 +14859,7 @@
14661
14859
  */
14662
14860
  async handleNativeResponse(response, request, reqTimestamp, storeInCache) {
14663
14861
  this.logger.trace("1bojln", this.correlationId);
14862
+ const dpopBrokerOutcome = this.validateDpopBrokerOutcome(response, request);
14664
14863
  // generate identifiers
14665
14864
  const idTokenClaims = extractTokenClaims(response.id_token, base64Decode, this.correlationId);
14666
14865
  const homeAccountIdentifier = this.createHomeAccountIdentifier(response, idTokenClaims);
@@ -14686,10 +14885,17 @@
14686
14885
  response.expires_in = Number(response.expires_in);
14687
14886
  // generate authenticationResult
14688
14887
  const result = await invokeAsync(this.generateAuthenticationResult.bind(this), NativeGenerateAuthResult, this.logger, this.performanceClient, this.correlationId)(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
14888
+ const isL3DpopResponse = dpopBrokerOutcome === "L3";
14689
14889
  // cache accounts and tokens in the appropriate storage
14690
- await invokeAsync(this.cacheAccount.bind(this), PlatformAuthCacheAccount, this.logger, this.performanceClient, this.correlationId)(baseAccount, isKmsi(idTokenClaims));
14890
+ const shouldRemoveGeneratedDpopKey = isL3DpopResponse ||
14891
+ (this.isDpopBrokerRequest(request) &&
14892
+ storeInCache?.accessToken === false);
14893
+ if (shouldRemoveGeneratedDpopKey) {
14894
+ await this.resetGeneratedDpopRequestKey(request);
14895
+ }
14896
+ await invokeAsync(this.cacheAccount.bind(this), PlatformAuthCacheAccount, this.logger, this.performanceClient, this.correlationId)(baseAccount, isKmsi(idTokenClaims), !isL3DpopResponse);
14691
14897
  await invokeAsync(this.cacheNativeTokens.bind(this), PlatformAuthCacheNativeTokens, this.logger, this.performanceClient, this.correlationId)(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache(), // environment
14692
- storeInCache);
14898
+ storeInCache, dpopBrokerOutcome);
14693
14899
  return result;
14694
14900
  }
14695
14901
  /**
@@ -14765,7 +14971,7 @@
14765
14971
  */
14766
14972
  async generateAuthenticationResult(response, request, idTokenClaims, accountEntity, authority, reqTimestamp) {
14767
14973
  // Add Native Broker fields to Telemetry
14768
- const mats = this.addTelemetryFromNativeResponse(response.properties.MATS);
14974
+ const mats = this.addTelemetryFromNativeResponse(response.properties?.MATS);
14769
14975
  // If scopes not returned in server response, use request scopes
14770
14976
  const responseScopes = this.generateScopes(request.scope, response.scope);
14771
14977
  const accountProperties = response.account.properties || {};
@@ -14791,9 +14997,17 @@
14791
14997
  }
14792
14998
  // generate PoP token as needed
14793
14999
  const responseAccessToken = await this.generatePopAccessToken(response, request);
14794
- const tokenType = request.tokenType === AuthenticationScheme$1.POP
14795
- ? AuthenticationScheme$1.POP
14796
- : AuthenticationScheme$1.BEARER;
15000
+ const isDpopRequest = this.isDpopBrokerRequest(request);
15001
+ let tokenType = AuthenticationScheme$1.BEARER;
15002
+ if (isDpopRequest) {
15003
+ tokenType = AuthenticationScheme$1.DPOP;
15004
+ }
15005
+ else if (request.tokenType === AuthenticationScheme$1.POP) {
15006
+ tokenType = AuthenticationScheme$1.POP;
15007
+ }
15008
+ const dpopProof = isDpopRequest
15009
+ ? await this.generateDpopProof(response, request)
15010
+ : undefined;
14797
15011
  const result = {
14798
15012
  authority: authority,
14799
15013
  uniqueId: uid,
@@ -14807,6 +15021,7 @@
14807
15021
  // Request timestamp and NativeResponse expires_in are in seconds, converting to Date for AuthenticationResult
14808
15022
  expiresOn: toDateFromSeconds(reqTimestamp + response.expires_in),
14809
15023
  tokenType: tokenType,
15024
+ dpopProof,
14810
15025
  correlationId: this.correlationId,
14811
15026
  state: response.state,
14812
15027
  fromPlatformBroker: true,
@@ -14820,11 +15035,13 @@
14820
15035
  * cache the account entity in browser storage
14821
15036
  * @param accountEntity
14822
15037
  */
14823
- async cacheAccount(accountEntity, kmsi) {
15038
+ async cacheAccount(accountEntity, kmsi, clearExistingTokens = true) {
14824
15039
  // Store the account info and hence `nativeAccountId` in browser cache
14825
15040
  await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi, this.apiId);
14826
- // Remove any existing cached tokens for this account in browser storage
14827
- this.browserStorage.removeAccountContext(getAccountInfo(accountEntity), this.correlationId);
15041
+ // Remove cached web access and refresh tokens, preserving ID tokens.
15042
+ if (clearExistingTokens) {
15043
+ this.browserStorage.removeAccountContext(getAccountInfo(accountEntity), this.correlationId);
15044
+ }
14828
15045
  }
14829
15046
  /**
14830
15047
  * Stores the access_token and id_token in inmemory storage
@@ -14836,8 +15053,18 @@
14836
15053
  * @param tenantId
14837
15054
  * @param reqTimestamp
14838
15055
  */
14839
- async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment, storeInCache) {
15056
+ async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment, storeInCache, dpopBrokerOutcome = "none") {
14840
15057
  const cachedIdToken = createIdTokenEntity(homeAccountIdentifier, environment, response.id_token || "", request.clientId, idTokenClaims.tid || "");
15058
+ // save idtoken credential in configured browser storage
15059
+ if (!!cachedIdToken && storeInCache?.idToken !== false) {
15060
+ await this.browserStorage.setIdTokenCredential(cachedIdToken, this.correlationId, isKmsi(idTokenClaims));
15061
+ }
15062
+ if (dpopBrokerOutcome === "L3") {
15063
+ return;
15064
+ }
15065
+ if (storeInCache?.accessToken === false) {
15066
+ return;
15067
+ }
14841
15068
  // cache accessToken in inmemory storage
14842
15069
  const expiresIn = request.tokenType === AuthenticationScheme$1.POP
14843
15070
  ? SHR_NONCE_VALIDITY
@@ -14847,18 +15074,14 @@
14847
15074
  const tokenExpirationSeconds = reqTimestamp + expiresIn;
14848
15075
  const responseScopes = this.generateScopes(response.scope, request.scope);
14849
15076
  const additionalCacheKeyComponents = request.attributeTokens
14850
- ? {
14851
- attribute_tokens: request.attributeTokens,
14852
- }
15077
+ ? { attribute_tokens: request.attributeTokens }
14853
15078
  : undefined;
14854
- const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, environment, response.access_token, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode, request.correlationId, undefined, request.tokenType, undefined, request.keyId, additionalCacheKeyComponents);
15079
+ const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, environment, response.access_token, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode, request.correlationId, undefined, this.isDpopBrokerRequest(request)
15080
+ ? AuthenticationScheme$1.DPOP
15081
+ : request.tokenType, undefined, request.keyId, additionalCacheKeyComponents);
14855
15082
  if (request.extraParameters?.resource) {
14856
15083
  cachedAccessToken.resource = request.extraParameters.resource;
14857
15084
  }
14858
- // save idtoken credential in configured browser storage
14859
- if (!!cachedIdToken && storeInCache?.idToken !== false) {
14860
- await this.browserStorage.setIdTokenCredential(cachedIdToken, this.correlationId, isKmsi(idTokenClaims));
14861
- }
14862
15085
  // save access token credential in memory storage
14863
15086
  const nativeCacheRecord = {
14864
15087
  accessToken: cachedAccessToken,
@@ -14935,11 +15158,7 @@
14935
15158
  const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
14936
15159
  ? undefined
14937
15160
  : this.config.auth.clientCapabilities;
14938
- /*
14939
- * 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.
14940
- * attributeTokens is destructured out because PlatformAuthRequest represents it as a pre-serialized string, not the caller-provided Array<string>.
14941
- */
14942
- const { scopes, claims, extraParametersNoCache, dpopNonce } = request;
15161
+ const { scopes, claims, dpopNonce } = request;
14943
15162
  const scopeSet = new ScopeSet([...(scopes || []), ...OIDC_DEFAULT_SCOPES$1], this.correlationId);
14944
15163
  const mergedClaims = buildMergedClaims$1(claims, configClaims?.length ? configClaims : undefined);
14945
15164
  const hasAttributeTokens = !!request.attributeTokens?.length;
@@ -14963,57 +15182,391 @@
14963
15182
  loginHint: request.loginHint,
14964
15183
  extraParameters: {
14965
15184
  ...request.extraParameters,
14966
- ...(request.resource && { resource: request.resource }), // resource is set for MCP scenarios
15185
+ // Native broker resource is set for MCP scenarios.
15186
+ ...(request.resource && { resource: request.resource }),
14967
15187
  },
14968
15188
  extendedExpiryToken: false,
14969
15189
  keyId: request.popKid,
14970
- resourceRequestMethod: request.resourceRequestMethod,
14971
- resourceRequestUri: request.resourceRequestUri,
14972
- shrClaims: request.shrClaims,
14973
- shrNonce: request.shrNonce,
14974
- extraParametersNoCache: createPlatformAuthExtraParametersNoCache(extraParametersNoCache, isProofOfPossessionTokenType(request.authenticationScheme), request.resourceRequestMethod, request.resourceRequestUri, dpopNonce),
14975
15190
  };
14976
15191
  if (hasAttributeTokens) {
14977
15192
  validatedRequest.attributeTokens =
14978
15193
  serializeAttributeTokens(request.attributeTokens);
14979
15194
  }
14980
- // Check for PoP token requests: signPopToken should only be set to true if popKid is not set
14981
- if (validatedRequest.signPopToken && !!request.popKid) {
14982
- throw createBrowserAuthError(invalidPopTokenRequest, this.correlationId);
14983
- }
14984
15195
  this.handleExtraBrokerParams(validatedRequest, request.embeddedClientId);
14985
15196
  validatedRequest.extraParameters =
14986
15197
  validatedRequest.extraParameters || {};
14987
15198
  validatedRequest.extraParameters.telemetry =
14988
15199
  PlatformAuthConstants.MATS_TELEMETRY;
14989
15200
  if (request.authenticationScheme === AuthenticationScheme$1.POP) {
14990
- // add POP request type
14991
15201
  const shrParameters = {
14992
- resourceRequestUri: request.resourceRequestUri,
14993
15202
  resourceRequestMethod: request.resourceRequestMethod,
15203
+ resourceRequestUri: request.resourceRequestUri,
14994
15204
  shrClaims: request.shrClaims,
14995
15205
  shrNonce: request.shrNonce,
14996
15206
  correlationId: this.correlationId,
14997
15207
  };
14998
15208
  const popTokenGenerator = new PopTokenGenerator(this.browserCrypto, this.tokenBindingKeyManager, this.performanceClient);
14999
- // generate reqCnf if not provided in the request
15000
- let reqCnfData;
15001
15209
  if (!validatedRequest.keyId) {
15002
15210
  const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PopTokenGenerateCnf, this.logger, this.performanceClient, this.correlationId)(shrParameters, this.logger);
15003
- reqCnfData = generatedReqCnfData.reqCnfString;
15211
+ validatedRequest.reqCnf = generatedReqCnfData.reqCnfString;
15004
15212
  validatedRequest.keyId = generatedReqCnfData.kid;
15005
15213
  validatedRequest.signPopToken = true;
15006
15214
  }
15007
15215
  else {
15008
- reqCnfData = this.browserCrypto.base64UrlEncode(JSON.stringify({ kid: validatedRequest.keyId }));
15216
+ validatedRequest.reqCnf = this.browserCrypto.base64UrlEncode(JSON.stringify({ kid: validatedRequest.keyId }));
15009
15217
  validatedRequest.signPopToken = false;
15010
15218
  }
15011
- // SPAs require whole string to be passed to broker
15012
- validatedRequest.reqCnf = reqCnfData;
15219
+ validatedRequest.resourceRequestMethod =
15220
+ request.resourceRequestMethod;
15221
+ validatedRequest.resourceRequestUri = request.resourceRequestUri;
15222
+ validatedRequest.shrClaims = request.shrClaims;
15223
+ validatedRequest.shrNonce = request.shrNonce;
15224
+ }
15225
+ else if (request.authenticationScheme === AuthenticationScheme$1.DPOP) {
15226
+ Object.assign(validatedRequest, this.createDpopRequestParameters(request));
15013
15227
  }
15228
+ validatedRequest.extraParametersNoCache =
15229
+ createPlatformAuthExtraParametersNoCache(validatedRequest.tokenType, validatedRequest.resourceRequestMethod, validatedRequest.resourceRequestUri, dpopNonce);
15014
15230
  this.addRequestSKUs(validatedRequest);
15015
15231
  return validatedRequest;
15016
15232
  }
15233
+ /**
15234
+ * Creates and validates the broker-specific parameters for a DPoP request.
15235
+ * @param request - Developer-provided token request.
15236
+ * @returns Broker parameters for a DPoP token and resource proof.
15237
+ */
15238
+ createDpopRequestParameters(request) {
15239
+ if (request.popKid) {
15240
+ throw createBrowserAuthError(DPOP_POP_KID_NOT_SUPPORTED, this.correlationId);
15241
+ }
15242
+ if (!request.resourceRequestMethod?.trim() ||
15243
+ !request.resourceRequestUri?.trim()) {
15244
+ throw createClientConfigurationError(dpopMissingResourceContext, this.correlationId);
15245
+ }
15246
+ const resourceContext = normalizeDpopResourceRequestContext({
15247
+ htm: request.resourceRequestMethod,
15248
+ htu: request.resourceRequestUri,
15249
+ }, this.correlationId);
15250
+ return {
15251
+ tokenType: PlatformAuthTokenType.DPOP_WITH_PROOF,
15252
+ preferBinding: PlatformAuthBindingPreference.ATTESTED,
15253
+ keyId: request.dpopJkt,
15254
+ resourceRequestMethod: resourceContext.htm,
15255
+ resourceRequestUri: resourceContext.htu,
15256
+ };
15257
+ }
15258
+ /**
15259
+ * Provisions the local key and confirmation data for a DPoP broker request.
15260
+ * @param request - Broker request to prepare.
15261
+ * @param reuseExistingKey - Whether a complete existing key binding may be reused.
15262
+ */
15263
+ async prepareDpopBrokerRequest(request, reuseExistingKey = false) {
15264
+ if (request.tokenType !== PlatformAuthTokenType.DPOP_WITH_PROOF) {
15265
+ return;
15266
+ }
15267
+ /*
15268
+ * Phase one clears both fields after an L3 response or non-fatal broker
15269
+ * error. In that case phase two must provision a replacement. If either
15270
+ * field remains, treat it as a retained binding and validate it fully.
15271
+ */
15272
+ if (reuseExistingKey && (request.keyId || request.reqCnf)) {
15273
+ if (!request.keyId || !request.reqCnf) {
15274
+ throw createAuthError(unexpectedError, this.correlationId, "DPoP request key binding is incomplete after redirect.");
15275
+ }
15276
+ const expectedReqCnf = this.createDpopBrokerReqCnf(request.keyId);
15277
+ if (request.reqCnf !== expectedReqCnf) {
15278
+ throw createAuthError(unexpectedError, this.correlationId, "DPoP request key binding is invalid after redirect.");
15279
+ }
15280
+ const hasKey = this.tokenBindingKeyManager.hasTokenBindingKey !== undefined
15281
+ ? await this.tokenBindingKeyManager.hasTokenBindingKey(request.keyId, this.correlationId)
15282
+ : await this.tokenBindingKeyManager
15283
+ .getTokenBindingPublicKeyJwk(request.keyId, this.correlationId)
15284
+ .then(() => true, () => false);
15285
+ if (!hasKey) {
15286
+ throw createAuthError(unexpectedError, this.correlationId, "DPoP request key is unavailable after redirect.");
15287
+ }
15288
+ return;
15289
+ }
15290
+ if (request.reqCnf) {
15291
+ throw createAuthError(unexpectedError, this.correlationId, "Unexpected preexisting DPoP request key.");
15292
+ }
15293
+ if (!request.keyId) {
15294
+ request.keyId =
15295
+ await this.tokenBindingKeyManager.provisionTokenBindingKey({
15296
+ tokenBindingKeyType: AuthenticationScheme$1.DPOP.toLowerCase(),
15297
+ tokenBindingKeyAlgorithm: JsonWebTokenAlgorithms.ES256,
15298
+ correlationId: this.correlationId,
15299
+ });
15300
+ }
15301
+ request.reqCnf = this.createDpopBrokerReqCnf(request.keyId);
15302
+ }
15303
+ /**
15304
+ * Creates the confirmation claim for an MSAL-owned broker DPoP key.
15305
+ * @param keyId - Browser-managed DPoP key identifier.
15306
+ * @returns Encoded broker confirmation claim.
15307
+ */
15308
+ createDpopBrokerReqCnf(keyId) {
15309
+ return this.browserCrypto.base64UrlEncode(JSON.stringify({
15310
+ kid: keyId,
15311
+ xms_ksl: PlatformAuthInteractionClient.MSAL_DPOP_KEY_STORAGE_LOCATION,
15312
+ }));
15313
+ }
15314
+ /**
15315
+ * Ensures an owned DPoP key can survive redirect navigation before the
15316
+ * request metadata is persisted for phase two.
15317
+ */
15318
+ async ensureRedirectDpopKeyIsPersisted(request) {
15319
+ if (!this.isDpopBrokerRequest(request) || !request.keyId) {
15320
+ return;
15321
+ }
15322
+ if (!(await isTokenBindingKeyPersistedForRedirect(request, this.tokenBindingKeyManager))) {
15323
+ throw createAuthError(unexpectedError, this.correlationId, "DPoP request key could not be persisted for redirect.");
15324
+ }
15325
+ }
15326
+ /**
15327
+ * Validates and normalizes the DPoP binding outcome returned by the broker.
15328
+ * @param response - Broker response to validate.
15329
+ * @param request - Broker request associated with the response.
15330
+ * @returns The validated DPoP binding level, or `none` for non-DPoP requests.
15331
+ */
15332
+ validateDpopBrokerOutcome(response, request) {
15333
+ const isDpopRequest = this.isDpopBrokerRequest(request);
15334
+ const normalizedResponse = this.normalizeDpopBrokerResponse(response);
15335
+ const normalizedRequestTokenType = request.tokenType
15336
+ ?.trim()
15337
+ .toLowerCase();
15338
+ const bindingPreferenceSent = request.bindingPreferenceSent ??
15339
+ request.preferBinding !== undefined;
15340
+ const hasDpopResponse = this.isDpopBrokerTokenType(normalizedResponse.tokenType) ||
15341
+ normalizedResponse.proof !== undefined ||
15342
+ normalizedResponse.hasBindingAttested;
15343
+ if (!isDpopRequest) {
15344
+ if (hasDpopResponse) {
15345
+ this.throwInvalidDpopResponse("unexpected_response", "Unexpected DPoP broker response.");
15346
+ }
15347
+ return "none";
15348
+ }
15349
+ if (!this.isDpopBrokerTokenType(normalizedResponse.tokenType)) {
15350
+ this.throwInvalidDpopResponse("unknown_token_type", "Unknown DPoP broker response.");
15351
+ }
15352
+ this.validateNormalizedDpopBrokerResponse(normalizedResponse, bindingPreferenceSent);
15353
+ if (normalizedResponse.tokenType ===
15354
+ PlatformAuthTokenType.DPOP_WITH_PROOF.toLowerCase()) {
15355
+ return this.validateDpopBrokerL3Outcome(normalizedRequestTokenType, normalizedResponse);
15356
+ }
15357
+ return this.validateDpopBrokerL1Outcome(request, normalizedRequestTokenType, normalizedResponse, bindingPreferenceSent);
15358
+ }
15359
+ /**
15360
+ * Normalizes the canonical DPoP fields returned under response properties.
15361
+ */
15362
+ normalizeDpopBrokerResponse(response) {
15363
+ const responseProperties = response.properties;
15364
+ const rawTokenType = responseProperties?.token_type;
15365
+ const tokenType = typeof rawTokenType === "string"
15366
+ ? rawTokenType.trim().toLowerCase()
15367
+ : undefined;
15368
+ const rawBindingAttested = responseProperties?.binding_attested;
15369
+ let bindingAttested;
15370
+ if (typeof rawBindingAttested === "string") {
15371
+ const normalizedBindingAttested = rawBindingAttested
15372
+ .trim()
15373
+ .toLowerCase();
15374
+ if (normalizedBindingAttested === "true") {
15375
+ bindingAttested = true;
15376
+ }
15377
+ else if (normalizedBindingAttested === "false") {
15378
+ bindingAttested = false;
15379
+ }
15380
+ }
15381
+ return {
15382
+ tokenType,
15383
+ proof: responseProperties?.DPoP,
15384
+ bindingAttested,
15385
+ hasBindingAttested: rawBindingAttested !== undefined,
15386
+ hasMalformedBindingAttested: rawBindingAttested !== undefined &&
15387
+ bindingAttested === undefined,
15388
+ };
15389
+ }
15390
+ /**
15391
+ * Validates normalized fields shared by L1 and L3 broker DPoP responses.
15392
+ */
15393
+ validateNormalizedDpopBrokerResponse(normalizedResponse, bindingPreferenceSent) {
15394
+ if (normalizedResponse.hasMalformedBindingAttested) {
15395
+ this.throwInvalidDpopResponse("invalid_attestation", "Conflicting DPoP broker response.");
15396
+ }
15397
+ if (bindingPreferenceSent &&
15398
+ normalizedResponse.bindingAttested === undefined) {
15399
+ this.throwInvalidDpopResponse("missing_attestation", "Conflicting DPoP broker response.");
15400
+ }
15401
+ }
15402
+ /**
15403
+ * Validates a broker-returned L3 DPoP proof outcome.
15404
+ */
15405
+ validateDpopBrokerL3Outcome(normalizedRequestTokenType, normalizedResponse) {
15406
+ const dpopWithProofTokenType = PlatformAuthTokenType.DPOP_WITH_PROOF.toLowerCase();
15407
+ if (typeof normalizedResponse.proof !== "string" ||
15408
+ normalizedResponse.proof.trim().length === 0) {
15409
+ this.throwInvalidDpopResponse("missing_proof", "Malformed DPoP broker response.");
15410
+ }
15411
+ if (normalizedResponse.bindingAttested !== true) {
15412
+ this.throwInvalidDpopResponse("invalid_attestation", "Malformed DPoP broker response.");
15413
+ }
15414
+ if (normalizedRequestTokenType !== dpopWithProofTokenType ||
15415
+ normalizedResponse.tokenType !== dpopWithProofTokenType) {
15416
+ this.throwInvalidDpopResponse("conflicting_fields", "Malformed DPoP broker response.");
15417
+ }
15418
+ this.performanceClient.addFields({
15419
+ "ext.brokerDpopOutcome": "l3",
15420
+ "ext.brokerDpopBindingLevel": "L3",
15421
+ }, this.correlationId);
15422
+ return "L3";
15423
+ }
15424
+ /**
15425
+ * Validates an L1 DPoP outcome that MSAL will sign with its local key.
15426
+ */
15427
+ validateDpopBrokerL1Outcome(request, normalizedRequestTokenType, normalizedResponse, bindingPreferenceSent) {
15428
+ if (normalizedResponse.proof !== undefined) {
15429
+ this.throwInvalidDpopResponse("conflicting_fields", "Malformed DPoP broker L1 response.");
15430
+ }
15431
+ if (normalizedRequestTokenType !==
15432
+ PlatformAuthTokenType.DPOP_WITH_PROOF.toLowerCase()) {
15433
+ this.throwInvalidDpopResponse("conflicting_fields", "Malformed DPoP broker L1 response.");
15434
+ }
15435
+ if (normalizedResponse.bindingAttested !== false &&
15436
+ !(!bindingPreferenceSent &&
15437
+ normalizedResponse.bindingAttested === undefined)) {
15438
+ this.throwInvalidDpopResponse("invalid_attestation", "Malformed DPoP broker L1 response.");
15439
+ }
15440
+ if (!request.reqCnf || !request.keyId) {
15441
+ this.throwInvalidDpopResponse("missing_l1_binding", "Malformed DPoP broker L1 response.");
15442
+ }
15443
+ this.performanceClient.addFields({
15444
+ "ext.brokerDpopOutcome": "l1",
15445
+ "ext.brokerDpopBindingLevel": "L1",
15446
+ }, this.correlationId);
15447
+ return "L1";
15448
+ }
15449
+ /**
15450
+ * Emits bounded failure telemetry and rejects an invalid DPoP response.
15451
+ */
15452
+ throwInvalidDpopResponse(failureReason, message) {
15453
+ this.performanceClient.addFields({
15454
+ "ext.brokerDpopOutcome": "invalid_response",
15455
+ "ext.brokerDpopFailureReason": failureReason,
15456
+ }, this.correlationId);
15457
+ throw createAuthError(unexpectedError, this.correlationId, message);
15458
+ }
15459
+ /**
15460
+ * Returns the broker proof or signs an L1 resource proof with the local key.
15461
+ * @param response - Broker response containing the access token and optional proof.
15462
+ * @param request - Broker request containing the proof context and local key.
15463
+ * @returns The resource proof for the broker access token.
15464
+ */
15465
+ async generateDpopProof(response, request) {
15466
+ const brokerProof = response.properties?.DPoP;
15467
+ if (brokerProof !== undefined) {
15468
+ return brokerProof;
15469
+ }
15470
+ const dpopProofGenerator = new DpopProofGenerator(this.browserCrypto, this.tokenBindingKeyManager);
15471
+ return dpopProofGenerator.generateResourceProof({
15472
+ htu: request.resourceRequestUri,
15473
+ htm: request.resourceRequestMethod,
15474
+ accessToken: response.access_token,
15475
+ nonce: request.extraParametersNoCache?.pop_nonce,
15476
+ }, request.keyId, this.correlationId);
15477
+ }
15478
+ /**
15479
+ * Removes a generated DPoP request key and clears its request metadata.
15480
+ * @param request - Broker request whose generated key should be removed.
15481
+ */
15482
+ async resetGeneratedDpopRequestKey(request) {
15483
+ if (!this.isDpopBrokerRequest(request) || !request.keyId) {
15484
+ return;
15485
+ }
15486
+ const cleanupMeasurement = this.performanceClient.startMeasurement(PlatformAuthDpopKeyCleanup, this.correlationId);
15487
+ this.performanceClient.incrementFields({ "ext.brokerDpopKeyCleanupAttemptCount": 1 }, this.correlationId);
15488
+ try {
15489
+ if (request.keyId && !(await this.removeDpopKey(request.keyId))) {
15490
+ throw createAuthError(unexpectedError, this.correlationId, "Failed to remove generated DPoP request key.");
15491
+ }
15492
+ this.performanceClient.addFields({
15493
+ "ext.brokerDpopKeyCleanupOutcome": "succeeded",
15494
+ }, this.correlationId);
15495
+ cleanupMeasurement.end({ success: true });
15496
+ request.keyId = undefined;
15497
+ request.reqCnf = undefined;
15498
+ }
15499
+ catch (error) {
15500
+ this.performanceClient.addFields({
15501
+ "ext.brokerDpopKeyCleanupOutcome": "failed",
15502
+ }, this.correlationId);
15503
+ this.performanceClient.incrementFields({ "ext.brokerDpopKeyCleanupFailureCount": 1 }, this.correlationId);
15504
+ cleanupMeasurement.end({ success: false }, error);
15505
+ throw error;
15506
+ }
15507
+ }
15508
+ /**
15509
+ * Attempts to remove a generated DPoP request key without replacing an
15510
+ * existing operation error with a cleanup failure.
15511
+ * @param request - Broker request whose generated key should be removed.
15512
+ */
15513
+ async resetGeneratedDpopRequestKeyBestEffort(request) {
15514
+ try {
15515
+ await this.resetGeneratedDpopRequestKey(request);
15516
+ }
15517
+ catch {
15518
+ this.logger.error("1kxxak", this.correlationId);
15519
+ this.performanceClient.incrementFields({ removeTokenBindingKeyFailure: 1 }, this.correlationId);
15520
+ request.keyId = undefined;
15521
+ request.reqCnf = undefined;
15522
+ }
15523
+ }
15524
+ /**
15525
+ * Records that a DPoP request is about to be dispatched to the platform broker.
15526
+ * @param request - Broker request about to cross the provider boundary.
15527
+ */
15528
+ addDpopBrokerAttemptTelemetry(request) {
15529
+ if (!this.isDpopBrokerRequest(request)) {
15530
+ return;
15531
+ }
15532
+ this.performanceClient.addFields({
15533
+ "ext.brokerDpopAttempted": 1,
15534
+ }, this.correlationId);
15535
+ }
15536
+ /**
15537
+ * Determines whether a request uses the DPoP broker protocol.
15538
+ * @param request - Broker request to inspect.
15539
+ * @returns Whether the request uses a DPoP token type.
15540
+ */
15541
+ isDpopBrokerRequest(request) {
15542
+ return this.isDpopBrokerTokenType(request.tokenType);
15543
+ }
15544
+ /**
15545
+ * Determines whether a token type represents a DPoP broker request.
15546
+ * @param tokenType - Token type to inspect.
15547
+ * @returns Whether the token type is a supported DPoP broker token type.
15548
+ */
15549
+ isDpopBrokerTokenType(tokenType) {
15550
+ const normalizedTokenType = tokenType?.trim().toLowerCase();
15551
+ return (normalizedTokenType === PlatformAuthTokenType.DPOP_WITH_PROOF ||
15552
+ normalizedTokenType ===
15553
+ AuthenticationScheme$1.DPOP.toLowerCase());
15554
+ }
15555
+ /**
15556
+ * Removes a DPoP key while reporting cleanup failures.
15557
+ * @param keyId - Identifier of the DPoP key to remove.
15558
+ * @returns Whether the key was removed successfully.
15559
+ */
15560
+ async removeDpopKey(keyId) {
15561
+ try {
15562
+ await this.tokenBindingKeyManager.removeTokenBindingKey(keyId, this.correlationId);
15563
+ return true;
15564
+ }
15565
+ catch {
15566
+ this.logger.error("1w60e4", this.correlationId);
15567
+ return false;
15568
+ }
15569
+ }
15017
15570
  async getCanonicalAuthority(request) {
15018
15571
  const requestAuthority = request.authority || this.config.auth.authority;
15019
15572
  const { azureCloudOptions, account } = request;
@@ -15052,29 +15605,28 @@
15052
15605
  }
15053
15606
  }
15054
15607
  /**
15055
- * Handles extra broker request parameters
15056
- * @param request {PlatformAuthRequest}
15057
- * @private
15608
+ * Handles extra broker request parameters.
15609
+ * @param request - Platform broker request.
15610
+ * @param embeddedClientId - Embedded application client identifier.
15058
15611
  */
15059
15612
  handleExtraBrokerParams(request, embeddedClientId) {
15060
- const hasExtraBrokerParams = request.extraParameters &&
15061
- request.extraParameters.hasOwnProperty(BROKER_CLIENT_ID) &&
15062
- request.extraParameters.hasOwnProperty(BROKER_REDIRECT_URI) &&
15063
- request.extraParameters.hasOwnProperty(CLIENT_ID);
15613
+ const hasOwnParameter = (parameter) => Object.prototype.hasOwnProperty.call(request.extraParameters, parameter);
15614
+ const hasExtraBrokerParams = hasOwnParameter(BROKER_CLIENT_ID) &&
15615
+ hasOwnParameter(BROKER_REDIRECT_URI) &&
15616
+ hasOwnParameter(CLIENT_ID);
15064
15617
  if (!embeddedClientId && !hasExtraBrokerParams) {
15065
15618
  return;
15066
15619
  }
15067
- let child_client_id = "";
15068
- const child_redirect_uri = request.redirectUri;
15620
+ const childRedirectUri = request.redirectUri;
15621
+ const childClientId = embeddedClientId ||
15622
+ request.extraParameters?.[CLIENT_ID] ||
15623
+ "";
15069
15624
  if (embeddedClientId) {
15070
15625
  request.redirectUri = this.config.auth.redirectUri;
15071
- child_client_id = embeddedClientId;
15072
15626
  }
15073
15627
  else if (request.extraParameters) {
15074
15628
  request.redirectUri =
15075
15629
  request.extraParameters[BROKER_REDIRECT_URI];
15076
- child_client_id =
15077
- request.extraParameters[CLIENT_ID];
15078
15630
  }
15079
15631
  const {
15080
15632
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -15085,15 +15637,20 @@
15085
15637
  [CLIENT_ID]: _clientId, ...remainingExtraParameters } = request.extraParameters || {};
15086
15638
  request.extraParameters = {
15087
15639
  ...remainingExtraParameters,
15088
- child_client_id,
15089
- child_redirect_uri,
15640
+ child_client_id: childClientId,
15641
+ child_redirect_uri: childRedirectUri,
15090
15642
  };
15091
15643
  this.performanceClient?.addFields({
15092
- embeddedClientId: child_client_id,
15093
- embeddedRedirectUri: child_redirect_uri,
15644
+ embeddedClientId: childClientId,
15645
+ embeddedRedirectUri: childRedirectUri,
15094
15646
  }, this.correlationId);
15095
15647
  }
15096
- }
15648
+ }
15649
+ /**
15650
+ * Storage location reported for MSAL-owned browser DPoP keys in reqCnf.
15651
+ * This does not constrain the binding selected by the platform broker.
15652
+ */
15653
+ PlatformAuthInteractionClient.MSAL_DPOP_KEY_STORAGE_LOCATION = PlatformAuthEnclave.SOFTWARE;
15097
15654
 
15098
15655
  /*
15099
15656
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -15199,6 +15756,7 @@
15199
15756
  }
15200
15757
  }
15201
15758
  if (request.authenticationScheme === AuthenticationScheme$1.DPOP &&
15759
+ !request.platformBroker &&
15202
15760
  request.dpopJkt) {
15203
15761
  parameters.set(DPOP_JKT, request.dpopJkt);
15204
15762
  }
@@ -15322,19 +15880,25 @@
15322
15880
  * @param nativeMessageHandler
15323
15881
  * @returns
15324
15882
  */
15325
- async function handleResponsePlatformBroker(request, accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider) {
15883
+ async function handleResponsePlatformBroker(request, accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager = new TokenBindingKeyManager(logger, performanceClient)) {
15326
15884
  logger.verbose("11qcow", request.correlationId);
15327
15885
  if (!platformAuthProvider) {
15328
15886
  throw createBrowserAuthError(nativeConnectionNotEstablished, request.correlationId);
15329
15887
  }
15330
15888
  const browserCrypto = new CryptoOps(logger, performanceClient);
15331
- const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId);
15889
+ const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
15332
15890
  const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
15333
- return invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)({
15334
- ...request,
15335
- state: userRequestState,
15336
- prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
15337
- });
15891
+ try {
15892
+ return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)({
15893
+ ...request,
15894
+ state: userRequestState,
15895
+ prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
15896
+ });
15897
+ }
15898
+ catch (e) {
15899
+ await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
15900
+ throw e;
15901
+ }
15338
15902
  }
15339
15903
  /**
15340
15904
  * Response handler when server returns code on the /authorize request
@@ -15347,13 +15911,13 @@
15347
15911
  * @param performanceClient
15348
15912
  * @returns
15349
15913
  */
15350
- async function handleResponseCode(request, response, codeVerifier, apiId, config, authClient, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider) {
15914
+ async function handleResponseCode(request, response, codeVerifier, apiId, config, authClient, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager = new TokenBindingKeyManager(logger, performanceClient)) {
15351
15915
  // Remove throttle if it exists
15352
15916
  ThrottlingUtils.removeThrottle(browserStorage, config.auth.clientId, request);
15353
15917
  // Instrument clientdata telemetry fields from the authorize response
15354
15918
  instrumentClientData(response, request.correlationId, performanceClient);
15355
15919
  if (response.accountId) {
15356
- return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, response.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider);
15920
+ return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, response.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
15357
15921
  }
15358
15922
  const authCodeRequest = {
15359
15923
  ...request,
@@ -15381,7 +15945,7 @@
15381
15945
  * @param nativeMessageHandler
15382
15946
  * @returns
15383
15947
  */
15384
- async function handleResponseEAR(request, response, apiId, config, authority, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider) {
15948
+ async function handleResponseEAR(request, response, apiId, config, authority, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager = new TokenBindingKeyManager(logger, performanceClient)) {
15385
15949
  // Remove throttle if it exists
15386
15950
  ThrottlingUtils.removeThrottle(browserStorage, config.auth.clientId, request);
15387
15951
  // Instrument clientdata telemetry fields from the authorize response
@@ -15396,9 +15960,9 @@
15396
15960
  }
15397
15961
  const decryptedData = JSON.parse(await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe));
15398
15962
  if (decryptedData.accountId) {
15399
- return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider);
15963
+ return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
15400
15964
  }
15401
- const responseHandler = new ResponseHandler(config.auth.clientId, browserStorage, new CryptoOps(logger, performanceClient), logger, performanceClient, null, null, new TokenBindingKeyManager(logger, performanceClient));
15965
+ const responseHandler = new ResponseHandler(config.auth.clientId, browserStorage, new CryptoOps(logger, performanceClient), logger, performanceClient, null, null, tokenBindingKeyManager);
15402
15966
  // Validate response. This function throws a server error if an error is returned by the server.
15403
15967
  responseHandler.validateTokenResponse(decryptedData, request.correlationId);
15404
15968
  // Temporary until response handler is refactored to be more flow agnostic.
@@ -15845,6 +16409,7 @@
15845
16409
  const extensionRequest = { ...request };
15846
16410
  delete extensionRequest.resourceRequestMethod;
15847
16411
  delete extensionRequest.resourceRequestUri;
16412
+ delete extensionRequest.bindingPreferenceSent;
15848
16413
  const messageBody = {
15849
16414
  method: NativeExtensionMethod.GetToken,
15850
16415
  request: extensionRequest,
@@ -15856,8 +16421,9 @@
15856
16421
  body: messageBody,
15857
16422
  };
15858
16423
  this.logger.trace(`1qadfi ${this.platformAuthType}`, correlationId);
15859
- this.logger.tracePii(`1xm533 ${this.platformAuthType} ${JSON.stringify(req)}`, correlationId);
15860
16424
  this.messageChannel.port1.postMessage(req);
16425
+ request.bindingPreferenceSent =
16426
+ extensionRequest.preferBinding !== undefined;
15861
16427
  const response = await new Promise((resolve, reject) => {
15862
16428
  this.resolvers.set(req.responseId, {
15863
16429
  resolve,
@@ -16054,13 +16620,11 @@
16054
16620
  try {
16055
16621
  const response = request.body.response;
16056
16622
  this.logger.trace(`19hpgm ${this.platformAuthType}`, correlationId);
16057
- this.logger.tracePii(`179a24 ${this.platformAuthType} ${JSON.stringify(response)}`, correlationId);
16058
16623
  if (response.status !== "Success") {
16059
16624
  resolver.reject(createNativeAuthError(response.code, correlationId, response.description, response.ext));
16060
16625
  }
16061
16626
  else if (response.result) {
16062
- if (response.result["code"] &&
16063
- response.result["description"]) {
16627
+ if (response.result["code"]) {
16064
16628
  resolver.reject(createNativeAuthError(response.result["code"], correlationId, response.result["description"], response.result["ext"]));
16065
16629
  }
16066
16630
  else {
@@ -16141,11 +16705,12 @@
16141
16705
  Object.prototype.hasOwnProperty.call(response, "account") &&
16142
16706
  Object.prototype.hasOwnProperty.call(response, "scope") &&
16143
16707
  Object.prototype.hasOwnProperty.call(response, "expires_in")) {
16708
+ const validatedResponse = response;
16144
16709
  validationMeasurement.end({
16145
16710
  success: true,
16146
16711
  platformAuthProviderType: this.platformAuthType,
16147
16712
  });
16148
- return response;
16713
+ return validatedResponse;
16149
16714
  }
16150
16715
  else {
16151
16716
  const error = createAuthError(unexpectedError, responseCorrelationId, "Response missing expected properties.");
@@ -16187,6 +16752,7 @@
16187
16752
  * Copyright (c) Microsoft Corporation. All rights reserved.
16188
16753
  * Licensed under the MIT License.
16189
16754
  */
16755
+ const PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED = "platform_auth_dom_dpop_not_supported";
16190
16756
  class PlatformAuthDOMHandler {
16191
16757
  constructor(logger, performanceClient, correlationId) {
16192
16758
  this.logger = logger;
@@ -16266,6 +16832,10 @@
16266
16832
  });
16267
16833
  this.logger.trace(`02bcil ${this.platformAuthType}`, correlationId);
16268
16834
  try {
16835
+ if (request.tokenType?.trim().toLowerCase() ===
16836
+ PlatformAuthTokenType.DPOP_WITH_PROOF) {
16837
+ throw createBrowserAuthError(PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED, correlationId);
16838
+ }
16269
16839
  const platformDOMRequest = invoke(this.initializePlatformDOMRequest.bind(this), PlatformAuthDOMInitializeRequest, this.logger, this.performanceClient, correlationId)(request);
16270
16840
  const response =
16271
16841
  // @ts-ignore
@@ -16292,6 +16862,7 @@
16292
16862
  this.logger.trace(`15d6yv ${this.platformAuthType}`, requestCorrelationId);
16293
16863
  delete remainingProperties.resourceRequestMethod;
16294
16864
  delete remainingProperties.resourceRequestUri;
16865
+ delete remainingProperties.bindingPreferenceSent;
16295
16866
  const validExtraParameters = this.getDOMExtraParams(remainingProperties, requestCorrelationId);
16296
16867
  const platformDOMRequest = {
16297
16868
  accountId: accountId,
@@ -16519,7 +17090,9 @@
16519
17090
  logger.trace("0uko3r", correlationId);
16520
17091
  const schemeSupported = !authenticationScheme ||
16521
17092
  authenticationScheme === AuthenticationScheme$1.BEARER ||
16522
- authenticationScheme === AuthenticationScheme$1.POP;
17093
+ authenticationScheme === AuthenticationScheme$1.POP ||
17094
+ (authenticationScheme === AuthenticationScheme$1.DPOP &&
17095
+ !(platformAuthProvider instanceof PlatformAuthDOMHandler));
16523
17096
  const fields = {
16524
17097
  allowPlatformBroker: config.system.allowPlatformBroker,
16525
17098
  ...(config.system.allowPlatformBroker && {
@@ -16716,12 +17289,13 @@
16716
17289
  // Wait for the redirect bridge response
16717
17290
  const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
16718
17291
  const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
16719
- return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
17292
+ return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
16720
17293
  }
16721
17294
  }
16722
17295
  catch (e) {
16723
17296
  // Close the synchronous popup if an error is thrown before the window unload event is registered
16724
17297
  popupParams.popup?.close();
17298
+ await removeTokenBindingKeyOnFailure(popupRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
16725
17299
  if (e instanceof AuthError) {
16726
17300
  e.correlationId = this.correlationId;
16727
17301
  serverTelemetryManager.cacheFailedRequest(e);
@@ -16748,23 +17322,29 @@
16748
17322
  ...tokenBindingParams,
16749
17323
  popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
16750
17324
  };
16751
- const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
16752
- // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
16753
- const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
16754
- const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
16755
- if (!serverParams.ear_jwe && serverParams.code) {
16756
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
16757
- serverTelemetryManager: initializeServerTelemetryManager(ApiId.acquireTokenPopup, this.config.auth.clientId, correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled),
16758
- requestAuthority: request.authority,
16759
- requestAzureCloudOptions: request.azureCloudOptions,
16760
- requestExtraQueryParameters: request.extraQueryParameters,
16761
- account: request.account,
16762
- authority: discoveredAuthority,
16763
- });
16764
- return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
17325
+ try {
17326
+ const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
17327
+ // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
17328
+ const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
17329
+ const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
17330
+ if (!serverParams.ear_jwe && serverParams.code) {
17331
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
17332
+ serverTelemetryManager: initializeServerTelemetryManager(ApiId.acquireTokenPopup, this.config.auth.clientId, correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled),
17333
+ requestAuthority: request.authority,
17334
+ requestAzureCloudOptions: request.azureCloudOptions,
17335
+ requestExtraQueryParameters: request.extraQueryParameters,
17336
+ account: request.account,
17337
+ authority: discoveredAuthority,
17338
+ });
17339
+ return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
17340
+ }
17341
+ else {
17342
+ return await invokeAsync(handleResponseEAR, HandleResponseEar, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, ApiId.acquireTokenPopup, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
17343
+ }
16765
17344
  }
16766
- else {
16767
- return invokeAsync(handleResponseEAR, HandleResponseEar, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, ApiId.acquireTokenPopup, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
17345
+ catch (e) {
17346
+ await removeTokenBindingKeyOnFailure(popupRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
17347
+ throw e;
16768
17348
  }
16769
17349
  }
16770
17350
  async executeCodeFlowWithPost(request, popupParams, authClient, pkceVerifier) {
@@ -16775,7 +17355,7 @@
16775
17355
  // Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
16776
17356
  const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
16777
17357
  const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
16778
- return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
17358
+ return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
16779
17359
  }
16780
17360
  /**
16781
17361
  *
@@ -17163,8 +17743,11 @@
17163
17743
  codeChallenge: pkceCodes.challenge,
17164
17744
  ...tokenBindingParams,
17165
17745
  };
17166
- this.browserStorage.cacheAuthorizeRequest(redirectRequest, this.correlationId, pkceCodes.verifier);
17167
17746
  try {
17747
+ if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
17748
+ throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
17749
+ }
17750
+ this.browserStorage.cacheAuthorizeRequest(redirectRequest, this.correlationId, pkceCodes.verifier);
17168
17751
  if (redirectRequest.httpMethod === HttpMethod.POST) {
17169
17752
  return await this.executeCodeFlowWithPost(redirectRequest);
17170
17753
  }
@@ -17184,6 +17767,7 @@
17184
17767
  }
17185
17768
  }
17186
17769
  catch (e) {
17770
+ await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
17187
17771
  if (e instanceof AuthError) {
17188
17772
  e.correlationId = this.correlationId;
17189
17773
  serverTelemetryManager.cacheFailedRequest(e);
@@ -17208,14 +17792,23 @@
17208
17792
  codeChallenge: pkceCodes.challenge,
17209
17793
  ...tokenBindingParams,
17210
17794
  };
17211
- this.browserStorage.cacheAuthorizeRequest(redirectRequest, this.correlationId, pkceCodes.verifier);
17212
- const form = await getEARForm(document, this.config, discoveredAuthority, redirectRequest, this.logger, this.performanceClient);
17213
- form.submit();
17214
- return new Promise((resolve, reject) => {
17215
- setTimeout(() => {
17216
- reject(createBrowserAuthError(timedOut, "", "failed_to_redirect"));
17217
- }, this.config.system.redirectNavigationTimeout);
17218
- });
17795
+ try {
17796
+ if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
17797
+ throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
17798
+ }
17799
+ this.browserStorage.cacheAuthorizeRequest(redirectRequest, this.correlationId, pkceCodes.verifier);
17800
+ const form = await getEARForm(document, this.config, discoveredAuthority, redirectRequest, this.logger, this.performanceClient);
17801
+ form.submit();
17802
+ return await new Promise((resolve, reject) => {
17803
+ setTimeout(() => {
17804
+ reject(createBrowserAuthError(timedOut, "", "failed_to_redirect"));
17805
+ }, this.config.system.redirectNavigationTimeout);
17806
+ });
17807
+ }
17808
+ catch (e) {
17809
+ await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
17810
+ throw e;
17811
+ }
17219
17812
  }
17220
17813
  /**
17221
17814
  * Executes classic Authorization Code flow with a POST request.
@@ -17254,6 +17847,7 @@
17254
17847
  if (!serverParams) {
17255
17848
  // Not a recognized server response hash or hash not associated with a redirect request
17256
17849
  this.logger.info("1qmv0q", this.correlationId);
17850
+ await removeTokenBindingKeyOnFailure(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
17257
17851
  this.browserStorage.resetRequestCache(this.correlationId);
17258
17852
  // Do not instrument "no_server_response" if user clicked back button
17259
17853
  if (getNavigationType() !== "back_forward") {
@@ -17323,6 +17917,7 @@
17323
17917
  return null;
17324
17918
  }
17325
17919
  catch (e) {
17920
+ await removeTokenBindingKeyOnFailure(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
17326
17921
  if (e instanceof AuthError) {
17327
17922
  e.correlationId = this.correlationId;
17328
17923
  serverTelemetryManager.cacheFailedRequest(e);
@@ -17389,10 +17984,10 @@
17389
17984
  const { authority, azureCloudOptions, extraQueryParameters, account } = request;
17390
17985
  if (serverParams.ear_jwe) {
17391
17986
  const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, request.correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
17392
- return invokeAsync(handleResponseEAR, HandleResponseEar, this.logger, this.performanceClient, request.correlationId)(request, serverParams, ApiId.acquireTokenRedirect, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
17987
+ return invokeAsync(handleResponseEAR, HandleResponseEar, this.logger, this.performanceClient, request.correlationId)(request, serverParams, ApiId.acquireTokenRedirect, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
17393
17988
  }
17394
17989
  const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)({ serverTelemetryManager, requestAuthority: request.authority });
17395
- return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, request.correlationId)(request, serverParams, codeVerifier, ApiId.acquireTokenRedirect, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
17990
+ return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, request.correlationId)(request, serverParams, codeVerifier, ApiId.acquireTokenRedirect, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
17396
17991
  }
17397
17992
  /**
17398
17993
  * Redirects window to given URL.
@@ -17723,10 +18318,10 @@
17723
18318
  account: request.account,
17724
18319
  authority: discoveredAuthority,
17725
18320
  });
17726
- return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(silentRequest, serverParams, pkceCodes.verifier, this.apiId, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
18321
+ return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(silentRequest, serverParams, pkceCodes.verifier, this.apiId, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
17727
18322
  }
17728
18323
  else {
17729
- return invokeAsync(handleResponseEAR, HandleResponseEar, this.logger, this.performanceClient, correlationId)(silentRequest, serverParams, this.apiId, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
18324
+ return invokeAsync(handleResponseEAR, HandleResponseEar, this.logger, this.performanceClient, correlationId)(silentRequest, serverParams, this.apiId, this.config, discoveredAuthority, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
17730
18325
  }
17731
18326
  }
17732
18327
  /**
@@ -17776,7 +18371,13 @@
17776
18371
  */
17777
18372
  async silentTokenHelper(authClient, request) {
17778
18373
  const { serverParams, pkceCodes, silentRequest } = await this.silentAuthorizeHelper(authClient, request);
17779
- return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, request.correlationId)(silentRequest, serverParams, pkceCodes.verifier, this.apiId, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider);
18374
+ try {
18375
+ return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, request.correlationId)(silentRequest, serverParams, pkceCodes.verifier, this.apiId, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
18376
+ }
18377
+ catch (e) {
18378
+ await removeTokenBindingKeyOnFailure(silentRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
18379
+ throw e;
18380
+ }
17780
18381
  }
17781
18382
  /**
17782
18383
  * Shared helper that generates PKCE codes, builds the /authorize URL,
@@ -17793,38 +18394,44 @@
17793
18394
  codeChallenge: pkceCodes.challenge,
17794
18395
  ...tokenBindingParams,
17795
18396
  };
17796
- // Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
17797
- const iframe = createHiddenIframe();
17798
- const responseType = this.config.auth.OIDCOptions.responseMode;
17799
- // Wait for response from the redirect bridge.
17800
- let responseString;
17801
18397
  try {
17802
- const responsePromise = invokeAsync(this.waitForIframeResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(iframe, request);
17803
- responsePromise.catch(() => {
17804
- /*
17805
- * If URL creation or navigation below throws before
17806
- * responsePromise is awaited, the listener still rejects on
17807
- * timeout. Swallow it here so it does not surface as an
17808
- * unhandled rejection; the navigation error is propagated
17809
- * instead.
17810
- */
17811
- });
17812
- if (request.httpMethod === HttpMethod.POST) {
17813
- await invokeAsync(initiateCodeFlowWithPost, SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(iframe, this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
18398
+ // Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
18399
+ const iframe = createHiddenIframe();
18400
+ const responseType = this.config.auth.OIDCOptions.responseMode;
18401
+ // Wait for response from the redirect bridge.
18402
+ let responseString;
18403
+ try {
18404
+ const responsePromise = invokeAsync(this.waitForIframeResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(iframe, request);
18405
+ responsePromise.catch(() => {
18406
+ /*
18407
+ * If URL creation or navigation below throws before
18408
+ * responsePromise is awaited, the listener still rejects on
18409
+ * timeout. Swallow it here so it does not surface as an
18410
+ * unhandled rejection; the navigation error is propagated
18411
+ * instead.
18412
+ */
18413
+ });
18414
+ if (request.httpMethod === HttpMethod.POST) {
18415
+ await invokeAsync(initiateCodeFlowWithPost, SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(iframe, this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
18416
+ }
18417
+ else {
18418
+ // Create authorize request url
18419
+ const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
18420
+ // Navigate the iframe to the authorize request url
18421
+ await invokeAsync(initiateCodeRequest, SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(iframe, navigateUrl, this.logger, correlationId);
18422
+ }
18423
+ responseString = await responsePromise;
17814
18424
  }
17815
- else {
17816
- // Create authorize request url
17817
- const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, silentRequest, this.logger, this.performanceClient);
17818
- // Navigate the iframe to the authorize request url
17819
- await invokeAsync(initiateCodeRequest, SilentHandlerInitiateAuthRequest, this.logger, this.performanceClient, correlationId)(iframe, navigateUrl, this.logger, correlationId);
18425
+ finally {
18426
+ invoke(removeHiddenIframe, RemoveHiddenIframe, this.logger, this.performanceClient, correlationId)(iframe);
17820
18427
  }
17821
- responseString = await responsePromise;
18428
+ const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, correlationId)(responseString, responseType, this.logger, this.correlationId);
18429
+ return { serverParams, pkceCodes, silentRequest };
17822
18430
  }
17823
- finally {
17824
- invoke(removeHiddenIframe, RemoveHiddenIframe, this.logger, this.performanceClient, correlationId)(iframe);
18431
+ catch (e) {
18432
+ await removeTokenBindingKeyOnFailure(silentRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
18433
+ throw e;
17825
18434
  }
17826
- const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, correlationId)(responseString, responseType, this.logger, this.correlationId);
17827
- return { serverParams, pkceCodes, silentRequest };
17828
18435
  }
17829
18436
  async waitForIframeResponse(iframe, request) {
17830
18437
  if (this.waitForIframeResponseHook) {
@@ -18097,7 +18704,6 @@
18097
18704
  : undefined,
18098
18705
  extraParameters: canonicalizeStringDict(request.extraParameters),
18099
18706
  extraQueryParameters: canonicalizeStringDict(request.extraQueryParameters),
18100
- extraParametersNoCache: canonicalizeStringDict(request.extraParametersNoCache),
18101
18707
  forceRefresh: !!request.forceRefresh,
18102
18708
  cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
18103
18709
  });
@@ -18106,8 +18712,12 @@
18106
18712
  * Copies caller-owned mutable inputs before asynchronous broker initialization.
18107
18713
  */
18108
18714
  function snapshotPlatformSilentRequest(request) {
18109
- return {
18715
+ const snapshot = {
18110
18716
  ...request,
18717
+ };
18718
+ delete snapshot.extraParametersNoCache;
18719
+ return {
18720
+ ...snapshot,
18111
18721
  scopes: [...(request.scopes || [])],
18112
18722
  account: { ...request.account },
18113
18723
  azureCloudOptions: request.azureCloudOptions
@@ -18119,9 +18729,6 @@
18119
18729
  extraQueryParameters: request.extraQueryParameters
18120
18730
  ? { ...request.extraQueryParameters }
18121
18731
  : undefined,
18122
- extraParametersNoCache: request.extraParametersNoCache
18123
- ? { ...request.extraParametersNoCache }
18124
- : undefined,
18125
18732
  attributeTokens: request.attributeTokens
18126
18733
  ? [...request.attributeTokens]
18127
18734
  : undefined,
@@ -18486,8 +19093,9 @@
18486
19093
  let result;
18487
19094
  const platformAuthProvider = this.platformAuthProvider;
18488
19095
  if (this.canUsePlatformBroker(request) && platformAuthProvider) {
19096
+ const nativeRequest = this.sanitizeNativeBrokerRequest(request, correlationId);
18489
19097
  const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenRedirect, this.performanceClient, platformAuthProvider, this.getNativeAccountId(request), this.nativeInternalStorage, correlationId, this.tokenBindingKeyManager);
18490
- result = invokeAsync(nativeClient.acquireTokenRedirect.bind(nativeClient), NativeInteractionClientAcquireTokenRedirect, this.logger, this.performanceClient, correlationId)(request, atrMeasurement).catch((e) => {
19098
+ result = invokeAsync(nativeClient.acquireTokenRedirect.bind(nativeClient), NativeInteractionClientAcquireTokenRedirect, this.logger, this.performanceClient, correlationId)(nativeRequest, atrMeasurement).catch((e) => {
18491
19099
  if (e instanceof NativeAuthError &&
18492
19100
  isFatalNativeAuthError(e)) {
18493
19101
  this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
@@ -19032,6 +19640,13 @@
19032
19640
  const correlationId = this.getRequestCorrelationId(logoutRequest);
19033
19641
  redirectPreflightCheck(this.initialized, this.config);
19034
19642
  this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNOUT);
19643
+ try {
19644
+ await this.clearNativeCache(logoutRequest?.account, correlationId);
19645
+ }
19646
+ catch (error) {
19647
+ this.browserStorage.setInteractionInProgress(false);
19648
+ throw error;
19649
+ }
19035
19650
  const redirectClient = this.createRedirectClient(correlationId);
19036
19651
  return redirectClient.logout(logoutRequest);
19037
19652
  }
@@ -19045,7 +19660,11 @@
19045
19660
  preflightCheck$1(this.initialized);
19046
19661
  this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNOUT);
19047
19662
  const popupClient = this.createPopupClient(correlationId);
19048
- return popupClient.logout(logoutRequest).finally(() => {
19663
+ const nativeCacheClear = this.clearNativeCache(logoutRequest?.account, correlationId);
19664
+ const popupLogout = popupClient.logout(logoutRequest);
19665
+ return Promise.all([nativeCacheClear, popupLogout])
19666
+ .then(() => undefined)
19667
+ .finally(() => {
19049
19668
  this.browserStorage.setInteractionInProgress(false);
19050
19669
  });
19051
19670
  }
@@ -19064,7 +19683,30 @@
19064
19683
  }
19065
19684
  const correlationId = this.getRequestCorrelationId(logoutRequest);
19066
19685
  const cacheClient = this.createSilentCacheClient(correlationId);
19067
- return cacheClient.logout(logoutRequest);
19686
+ const nativeCacheClear = this.clearNativeCache(logoutRequest?.account, correlationId);
19687
+ const browserCacheClear = cacheClient.logout(logoutRequest);
19688
+ await Promise.all([nativeCacheClear, browserCacheClear]);
19689
+ }
19690
+ async clearNativeCache(account, correlationId) {
19691
+ const homeAccountId = account?.homeAccountId.toLowerCase();
19692
+ const environment = account?.environment.toLowerCase();
19693
+ const accessTokenKeys = this.nativeInternalStorage
19694
+ .getTokenKeys()
19695
+ .accessToken.filter((key) => {
19696
+ if (!account) {
19697
+ return true;
19698
+ }
19699
+ const accessToken = this.nativeInternalStorage.getAccessTokenCredential(key, correlationId);
19700
+ if (!accessToken) {
19701
+ return false;
19702
+ }
19703
+ return (accessToken.homeAccountId.toLowerCase() === homeAccountId &&
19704
+ accessToken.environment.toLowerCase() === environment);
19705
+ });
19706
+ await Promise.all(accessTokenKeys.map((key) => this.nativeInternalStorage.removeAccessTokenAndTokenBindingKey(key, correlationId)));
19707
+ if (!account) {
19708
+ this.nativeInternalStorage.clear(correlationId);
19709
+ }
19068
19710
  }
19069
19711
  // #endregion
19070
19712
  // #region Account APIs
@@ -19146,6 +19788,19 @@
19146
19788
  }
19147
19789
  }
19148
19790
  // #region Helpers
19791
+ /**
19792
+ * Removes internal DPoP key state from application-originated broker requests.
19793
+ */
19794
+ sanitizeNativeBrokerRequest(request, correlationId) {
19795
+ if (!request.dpopJkt) {
19796
+ return request;
19797
+ }
19798
+ this.logger.warning("0rh2us", correlationId);
19799
+ return {
19800
+ ...request,
19801
+ dpopJkt: undefined,
19802
+ };
19803
+ }
19149
19804
  /**
19150
19805
  * Acquire a token from native device (e.g. WAM)
19151
19806
  * @param request
@@ -19165,7 +19820,8 @@
19165
19820
  throw createBrowserAuthError(nativeConnectionNotEstablished, correlationId);
19166
19821
  }
19167
19822
  const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, apiId, this.performanceClient, this.platformAuthProvider, accountId || this.getNativeAccountId(request), this.nativeInternalStorage, correlationId, this.tokenBindingKeyManager);
19168
- return invokeAsync(nativeClient.acquireToken.bind(nativeClient), NativeInteractionClientAcquireToken, this.logger, this.performanceClient, correlationId)(request, cacheLookupPolicy);
19823
+ const nativeRequest = this.sanitizeNativeBrokerRequest(request, correlationId);
19824
+ return invokeAsync(nativeClient.acquireToken.bind(nativeClient), NativeInteractionClientAcquireToken, this.logger, this.performanceClient, correlationId)(nativeRequest, cacheLookupPolicy);
19169
19825
  }
19170
19826
  /**
19171
19827
  * Returns boolean indicating if this request can use the platform broker
@@ -19445,14 +20101,23 @@
19445
20101
  correlationId,
19446
20102
  config: this.config,
19447
20103
  }, this.platformAuthProvider, this.logger, this.performanceClient);
19448
- const inProgressRequest = this.activeSilentTokenRequests.get(preparedRequest.key);
20104
+ const shouldDeduplicate = preparedRequest.request.authenticationScheme !==
20105
+ AuthenticationScheme$1.DPOP;
20106
+ const inProgressRequest = shouldDeduplicate
20107
+ ? this.activeSilentTokenRequests.get(preparedRequest.key)
20108
+ : undefined;
19449
20109
  if (typeof inProgressRequest === "undefined") {
19450
- this.logger.verbose("0fcjbk", correlationId);
20110
+ this.logger.verbose(shouldDeduplicate
20111
+ ? "0fcjbk"
20112
+ : "acquireTokenSilent called for DPoP request, starting an independent operation", correlationId);
19451
20113
  this.performanceClient.addFields({ deduped: false }, correlationId);
19452
20114
  const activeRequest = invokeAsync(this.acquireTokenSilentAsync.bind(this), AcquireTokenSilentAsync, this.logger, this.performanceClient, correlationId)({
19453
20115
  ...preparedRequest.request,
19454
20116
  correlationId,
19455
20117
  }, preparedRequest.account);
20118
+ if (!shouldDeduplicate) {
20119
+ return activeRequest;
20120
+ }
19456
20121
  this.activeSilentTokenRequests.set(preparedRequest.key, activeRequest);
19457
20122
  return activeRequest.finally(() => {
19458
20123
  this.activeSilentTokenRequests.delete(preparedRequest.key);