@azure/msal-browser 5.30.0 → 5.31.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 (516) hide show
  1. package/README.md +4 -2
  2. package/dist/app/IPublicClientApplication.mjs +4 -1
  3. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  4. package/dist/app/PublicClientApplication.mjs +14 -2
  5. package/dist/app/PublicClientApplication.mjs.map +1 -1
  6. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  7. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +10 -23
  8. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
  9. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  10. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +2 -3
  11. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
  12. package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
  13. package/dist/cache/AccountManager.mjs +1 -1
  14. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  15. package/dist/cache/BrowserCacheManager.mjs +39 -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 +26 -5
  28. package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
  29. package/dist/controllers/StandardController.mjs +44 -11
  30. package/dist/controllers/StandardController.mjs.map +1 -1
  31. package/dist/crypto/BrowserCrypto.mjs +5 -3
  32. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  33. package/dist/crypto/CryptoOps.mjs +1 -1
  34. package/dist/crypto/PkceGenerator.mjs +1 -1
  35. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  36. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  37. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  38. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -4
  39. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
  40. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +11 -4
  41. package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
  42. package/dist/custom_auth/core/CustomAuthAuthority.mjs +3 -3
  43. package/dist/custom_auth/core/CustomAuthAuthority.mjs.map +1 -1
  44. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  47. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  48. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  49. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -4
  50. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
  51. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -3
  52. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +1 -1
  53. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  54. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  55. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -8
  56. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +1 -1
  57. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  58. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -3
  59. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
  60. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -3
  61. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +1 -1
  62. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  63. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  64. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -7
  65. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
  66. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -2
  67. package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
  68. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -2
  69. package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
  70. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +1 -1
  71. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +1 -2
  72. package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
  73. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +1 -2
  74. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -1
  75. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +2 -5
  76. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
  77. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +1 -2
  78. package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -1
  79. package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
  80. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +1 -2
  81. package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
  82. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +1 -2
  83. package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
  84. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -2
  85. package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
  86. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +1 -2
  87. package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
  88. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +2 -3
  89. package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -1
  90. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  91. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  92. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  93. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  94. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  95. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  96. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  97. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  98. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  99. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  100. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  101. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  102. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  103. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  104. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  105. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  106. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  107. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  108. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  109. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  110. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  111. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  112. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +32 -27
  113. package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
  114. package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +1 -1
  115. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +6 -2
  116. package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -1
  117. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  118. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  119. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  120. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  121. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  122. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  123. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  124. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  125. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  126. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -1
  127. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +7 -5
  128. package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -1
  129. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +12 -3
  130. package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -1
  131. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
  132. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +9 -39
  133. package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -1
  134. package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +1 -1
  135. package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
  136. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
  137. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
  138. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -1
  139. package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -1
  140. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  141. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  142. package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +1 -1
  143. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  144. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  145. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  146. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  147. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  148. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  149. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  150. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  151. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  152. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  153. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  154. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  155. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +2 -1
  156. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
  157. package/dist/custom_auth/index.mjs +1 -1
  158. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  159. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  160. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  161. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  162. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  163. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  164. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  165. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  166. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  167. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  168. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  169. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +1 -2
  170. package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
  171. package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +1 -1
  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 -3
  177. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
  178. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -3
  179. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
  180. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -3
  181. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +1 -1
  182. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  183. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  184. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  185. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  186. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  187. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  188. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -2
  189. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
  190. package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +1 -1
  191. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  192. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  193. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  194. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  195. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  196. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  197. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  198. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  199. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  200. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  201. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  202. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  203. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  204. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  205. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -2
  206. package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
  207. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +1 -1
  208. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +1 -1
  209. package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +1 -1
  210. package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +1 -1
  211. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  212. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  213. package/dist/encode/Base64Decode.mjs +1 -1
  214. package/dist/encode/Base64Encode.mjs +1 -1
  215. package/dist/error/BrowserAuthError.mjs +1 -1
  216. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  217. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  218. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  219. package/dist/error/NativeAuthError.mjs +1 -1
  220. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  221. package/dist/error/NestedAppAuthError.mjs +1 -1
  222. package/dist/event/EventHandler.mjs +1 -1
  223. package/dist/event/EventMessage.mjs +1 -1
  224. package/dist/event/EventType.mjs +1 -1
  225. package/dist/index.mjs +1 -1
  226. package/dist/interaction_client/BaseInteractionClient.mjs +4 -2
  227. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  228. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  229. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +18 -5
  230. package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
  231. package/dist/interaction_client/PopupClient.mjs +1 -1
  232. package/dist/interaction_client/RedirectClient.mjs +1 -1
  233. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  234. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  235. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  236. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  237. package/dist/interaction_client/StandardInteractionClient.mjs +2 -1
  238. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  239. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  240. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  241. package/dist/log-strings-mapping.json +695 -695
  242. package/dist/naa/BridgeError.mjs +1 -1
  243. package/dist/naa/BridgeProxy.mjs +1 -1
  244. package/dist/naa/BridgeStatusCode.mjs +1 -1
  245. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  246. package/dist/navigation/NavigationClient.mjs +1 -1
  247. package/dist/network/FetchClient.mjs +1 -1
  248. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  249. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  250. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  251. package/dist/packageMetadata.mjs +2 -2
  252. package/dist/popup_relay/constants.mjs +1 -1
  253. package/dist/popup_relay/index.mjs +1 -1
  254. package/dist/popup_relay/relayClient.mjs +1 -1
  255. package/dist/protocol/Authorize.mjs +2 -1
  256. package/dist/protocol/Authorize.mjs.map +1 -1
  257. package/dist/redirect_bridge/index.mjs +1 -1
  258. package/dist/request/RequestHelpers.mjs +2 -1
  259. package/dist/request/RequestHelpers.mjs.map +1 -1
  260. package/dist/request/SilentRequestHelpers.mjs +6 -4
  261. package/dist/request/SilentRequestHelpers.mjs.map +1 -1
  262. package/dist/response/ResponseHandler.mjs +1 -1
  263. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  264. package/dist/telemetry/BrowserPerformanceEvents.mjs +7 -2
  265. package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
  266. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  267. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  268. package/dist/utils/BrowserConstants.mjs +1 -1
  269. package/dist/utils/BrowserDetection.mjs +1 -1
  270. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  271. package/dist/utils/BrowserUtils.mjs +1 -1
  272. package/dist/utils/Helpers.mjs +1 -1
  273. package/dist/utils/IframeMonitor.mjs +1 -1
  274. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  275. package/dist/utils/PopupMonitor.mjs +1 -1
  276. package/dist/utils/PopupOriginCheck.mjs +1 -1
  277. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  278. package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
  279. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  280. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  281. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
  282. package/dist/webBrokerBridge/index.mjs +1 -1
  283. package/lib/custom-auth-path/log-strings-mapping.json +2 -2
  284. package/lib/custom-auth-path/msal-custom-auth.cjs +386 -252
  285. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  286. package/lib/custom-auth-path/msal-custom-auth.js +386 -252
  287. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  288. package/lib/log-strings-mapping.json +2 -2
  289. package/lib/msal-browser.cjs +411 -153
  290. package/lib/msal-browser.cjs.map +1 -1
  291. package/lib/msal-browser.js +411 -153
  292. package/lib/msal-browser.js.map +1 -1
  293. package/lib/msal-browser.min.js +2 -2
  294. package/lib/popup-relay/msal-popup-relay.cjs +2 -2
  295. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  296. package/lib/popup-relay/msal-popup-relay.js +2 -2
  297. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  298. package/lib/popup-relay/msal-popup-relay.min.js +1 -1
  299. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  300. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  301. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  302. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  303. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  304. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
  305. package/package.json +2 -2
  306. package/src/app/IPublicClientApplication.ts +16 -0
  307. package/src/app/PublicClientApplication.ts +22 -0
  308. package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +11 -44
  309. package/src/broker/nativeBroker/PlatformAuthProvider.ts +1 -2
  310. package/src/broker/nativeBroker/PlatformAuthResponse.ts +2 -6
  311. package/src/cache/BrowserCacheManager.ts +65 -1
  312. package/src/controllers/NestedAppAuthController.ts +35 -2
  313. package/src/controllers/StandardController.ts +76 -12
  314. package/src/controllers/UnknownOperatingContextController.ts +10 -0
  315. package/src/crypto/BrowserCrypto.ts +4 -2
  316. package/src/custom_auth/CustomAuthActionInputs.ts +0 -9
  317. package/src/custom_auth/CustomAuthPublicClientApplication.ts +0 -3
  318. package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +0 -3
  319. package/src/custom_auth/controller/CustomAuthStandardController.ts +15 -2
  320. package/src/custom_auth/core/CustomAuthAuthority.ts +2 -1
  321. package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.ts +0 -3
  322. package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.ts +0 -2
  323. package/src/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.ts +0 -7
  324. package/src/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.ts +0 -2
  325. package/src/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.ts +0 -2
  326. package/src/custom_auth/core/auth_flow/mfa/state/MfaState.ts +0 -6
  327. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +0 -1
  328. package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +0 -1
  329. package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +0 -4
  330. package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +0 -1
  331. package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +0 -1
  332. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +0 -2
  333. package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +0 -2
  334. package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +0 -2
  335. package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +0 -2
  336. package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +0 -2
  337. package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -2
  338. package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +0 -2
  339. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +0 -1
  340. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +0 -3
  341. package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +0 -1
  342. package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +0 -1
  343. package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +0 -1
  344. package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +0 -1
  345. package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +0 -1
  346. package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +8 -6
  347. package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +1 -0
  348. package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +43 -29
  349. package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +21 -2
  350. package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +12 -8
  351. package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +35 -4
  352. package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +10 -47
  353. package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +1 -0
  354. package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +9 -0
  355. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +5 -5
  356. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +2 -5
  357. package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +2 -4
  358. package/src/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.ts +1 -0
  359. package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +0 -2
  360. package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +0 -1
  361. package/src/custom_auth/sign_in/auth_flow/result/SignInResult.ts +0 -2
  362. package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.ts +0 -2
  363. package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.ts +0 -2
  364. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +0 -2
  365. package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +0 -2
  366. package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +0 -1
  367. package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +0 -2
  368. package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +0 -2
  369. package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +0 -1
  370. package/src/interaction_client/BaseInteractionClient.ts +6 -1
  371. package/src/interaction_client/PlatformAuthInteractionClient.ts +28 -8
  372. package/src/interaction_client/StandardInteractionClient.ts +1 -0
  373. package/src/packageMetadata.ts +1 -1
  374. package/src/protocol/Authorize.ts +5 -0
  375. package/src/request/EndSessionPopupRequest.ts +3 -0
  376. package/src/request/RedirectRequest.ts +3 -0
  377. package/src/request/RequestHelpers.ts +5 -0
  378. package/src/request/SilentRequestHelpers.ts +9 -4
  379. package/src/telemetry/BrowserPerformanceEvents.ts +7 -0
  380. package/types/app/IPublicClientApplication.d.ts +8 -0
  381. package/types/app/IPublicClientApplication.d.ts.map +1 -1
  382. package/types/app/PublicClientApplication.d.ts +6 -1
  383. package/types/app/PublicClientApplication.d.ts.map +1 -1
  384. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +0 -1
  385. package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
  386. package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
  387. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +2 -6
  388. package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
  389. package/types/cache/BrowserCacheManager.d.ts +20 -2
  390. package/types/cache/BrowserCacheManager.d.ts.map +1 -1
  391. package/types/controllers/NestedAppAuthController.d.ts +5 -0
  392. package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
  393. package/types/controllers/StandardController.d.ts +4 -0
  394. package/types/controllers/StandardController.d.ts.map +1 -1
  395. package/types/controllers/UnknownOperatingContextController.d.ts +5 -0
  396. package/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  397. package/types/crypto/BrowserCrypto.d.ts.map +1 -1
  398. package/types/custom_auth/CustomAuthActionInputs.d.ts +0 -9
  399. package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
  400. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  401. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +0 -3
  402. package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
  403. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +0 -3
  404. package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
  405. package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
  406. package/types/custom_auth/core/CustomAuthAuthority.d.ts.map +1 -1
  407. package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
  408. package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
  409. package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
  410. package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
  411. package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
  412. package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
  413. package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
  414. package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
  415. package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
  416. package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
  417. package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
  418. package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
  419. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +0 -1
  420. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -1
  421. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +0 -1
  422. package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
  423. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +0 -4
  424. package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
  425. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +0 -1
  426. package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
  427. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +0 -1
  428. package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
  429. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +0 -2
  430. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -1
  431. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +0 -2
  432. package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -1
  433. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +0 -2
  434. package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
  435. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +0 -2
  436. package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
  437. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +0 -2
  438. package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
  439. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -2
  440. package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
  441. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +0 -2
  442. package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
  443. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +0 -1
  444. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -1
  445. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +0 -1
  446. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
  447. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +0 -1
  448. package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -1
  449. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +0 -1
  450. package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
  451. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +0 -1
  452. package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
  453. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +0 -1
  454. package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
  455. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +0 -1
  456. package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
  457. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -1
  458. package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -1
  459. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +1 -0
  460. package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
  461. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +3 -2
  462. package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
  463. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +10 -1
  464. package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
  465. package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts +1 -1
  466. package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -1
  467. package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
  468. package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts.map +1 -1
  469. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +1 -0
  470. package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
  471. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +8 -0
  472. package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
  473. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +4 -5
  474. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
  475. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +3 -6
  476. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
  477. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +2 -5
  478. package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
  479. package/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
  480. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +0 -2
  481. package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
  482. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +0 -1
  483. package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
  484. package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
  485. package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
  486. package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
  487. package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
  488. package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
  489. package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
  490. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +0 -2
  491. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
  492. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +0 -2
  493. package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
  494. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +0 -1
  495. package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
  496. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +0 -2
  497. package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
  498. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +0 -2
  499. package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
  500. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +0 -1
  501. package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
  502. package/types/interaction_client/BaseInteractionClient.d.ts +3 -2
  503. package/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  504. package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
  505. package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  506. package/types/packageMetadata.d.ts +1 -1
  507. package/types/protocol/Authorize.d.ts.map +1 -1
  508. package/types/request/EndSessionPopupRequest.d.ts +3 -0
  509. package/types/request/EndSessionPopupRequest.d.ts.map +1 -1
  510. package/types/request/RedirectRequest.d.ts +3 -0
  511. package/types/request/RedirectRequest.d.ts.map +1 -1
  512. package/types/request/RequestHelpers.d.ts.map +1 -1
  513. package/types/request/SilentRequestHelpers.d.ts +1 -1
  514. package/types/request/SilentRequestHelpers.d.ts.map +1 -1
  515. package/types/telemetry/BrowserPerformanceEvents.d.ts +5 -0
  516. package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v5.30.0 2026-11-18 */
1
+ /*! @azure/msal-browser v5.31.0 2026-12-02 */
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.msalCustomAuth = {}));
7
7
  })(this, (function (exports) { 'use strict';
8
8
 
9
- /*! @azure/msal-common v16.17.0 2026-11-18 */
9
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
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.17.0 2026-11-18 */
69
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
70
70
  /*
71
71
  * Copyright (c) Microsoft Corporation. All rights reserved.
72
72
  * Licensed under the MIT License.
@@ -300,7 +300,7 @@
300
300
  // Token renewal offset default in seconds
301
301
  const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
302
302
 
303
- /*! @azure/msal-common v16.17.0 2026-11-18 */
303
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
304
304
  /*
305
305
  * Copyright (c) Microsoft Corporation. All rights reserved.
306
306
  * Licensed under the MIT License.
@@ -329,7 +329,7 @@
329
329
  return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
330
330
  }
331
331
 
332
- /*! @azure/msal-common v16.17.0 2026-11-18 */
332
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
333
333
 
334
334
  /*
335
335
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -352,7 +352,7 @@
352
352
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
353
353
  }
354
354
 
355
- /*! @azure/msal-common v16.17.0 2026-11-18 */
355
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
356
356
  /*
357
357
  * Copyright (c) Microsoft Corporation. All rights reserved.
358
358
  * Licensed under the MIT License.
@@ -390,7 +390,7 @@
390
390
  const resourceParameterRequired = "resource_parameter_required";
391
391
  const misplacedResourceParam = "misplaced_resource_parameter";
392
392
 
393
- /*! @azure/msal-common v16.17.0 2026-11-18 */
393
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
394
394
 
395
395
  /*
396
396
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -428,7 +428,7 @@
428
428
  };
429
429
  }
430
430
 
431
- /*! @azure/msal-common v16.17.0 2026-11-18 */
431
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
432
432
 
433
433
  /*
434
434
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -494,7 +494,7 @@
494
494
  return matches[2];
495
495
  }
496
496
 
497
- /*! @azure/msal-common v16.17.0 2026-11-18 */
497
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
498
498
 
499
499
  /*
500
500
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -582,7 +582,7 @@
582
582
  return updatedAccountInfo;
583
583
  }
584
584
 
585
- /*! @azure/msal-common v16.17.0 2026-11-18 */
585
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
586
586
  /*
587
587
  * Copyright (c) Microsoft Corporation. All rights reserved.
588
588
  * Licensed under the MIT License.
@@ -596,7 +596,7 @@
596
596
  Ciam: 3,
597
597
  };
598
598
 
599
- /*! @azure/msal-common v16.17.0 2026-11-18 */
599
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
600
600
  /*
601
601
  * Copyright (c) Microsoft Corporation. All rights reserved.
602
602
  * Licensed under the MIT License.
@@ -618,7 +618,7 @@
618
618
  return null;
619
619
  }
620
620
 
621
- /*! @azure/msal-common v16.17.0 2026-11-18 */
621
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
622
622
  /*
623
623
  * Copyright (c) Microsoft Corporation. All rights reserved.
624
624
  * Licensed under the MIT License.
@@ -642,7 +642,7 @@
642
642
  EAR: "EAR",
643
643
  };
644
644
 
645
- /*! @azure/msal-common v16.17.0 2026-11-18 */
645
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
646
646
  /**
647
647
  * Returns the AccountInfo interface for this account.
648
648
  * @internal
@@ -831,7 +831,7 @@
831
831
  entity.hasOwnProperty("authorityType"));
832
832
  }
833
833
 
834
- /*! @azure/msal-common v16.17.0 2026-11-18 */
834
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
835
835
  /*
836
836
  * Copyright (c) Microsoft Corporation. All rights reserved.
837
837
  * Licensed under the MIT License.
@@ -841,7 +841,7 @@
841
841
  */
842
842
  const unexpectedError = "unexpected_error";
843
843
 
844
- /*! @azure/msal-common v16.17.0 2026-11-18 */
844
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
845
845
 
846
846
  /*
847
847
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -861,7 +861,7 @@
861
861
  return new ClientConfigurationError(errorCode, correlationId);
862
862
  }
863
863
 
864
- /*! @azure/msal-common v16.17.0 2026-11-18 */
864
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
865
865
  /*
866
866
  * Copyright (c) Microsoft Corporation. All rights reserved.
867
867
  * Licensed under the MIT License.
@@ -901,7 +901,7 @@
901
901
  return headerName === undefined ? undefined : headers[headerName];
902
902
  }
903
903
 
904
- /*! @azure/msal-common v16.17.0 2026-11-18 */
904
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
905
905
  /*
906
906
  * Copyright (c) Microsoft Corporation. All rights reserved.
907
907
  * Licensed under the MIT License.
@@ -932,7 +932,7 @@
932
932
  const invalidDpopNonce = "invalid_dpop_nonce";
933
933
  const dpopMissingResourceContext = "dpop_missing_resource_context";
934
934
 
935
- /*! @azure/msal-common v16.17.0 2026-11-18 */
935
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
936
936
  /*
937
937
  * Copyright (c) Microsoft Corporation. All rights reserved.
938
938
  * Licensed under the MIT License.
@@ -944,7 +944,7 @@
944
944
  response.hasOwnProperty("jwks_uri"));
945
945
  }
946
946
 
947
- /*! @azure/msal-common v16.17.0 2026-11-18 */
947
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
948
948
  /*
949
949
  * Copyright (c) Microsoft Corporation. All rights reserved.
950
950
  * Licensed under the MIT License.
@@ -1024,7 +1024,7 @@
1024
1024
  }
1025
1025
  }
1026
1026
 
1027
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1027
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1028
1028
 
1029
1029
  /*
1030
1030
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1211,7 +1211,7 @@
1211
1211
  }
1212
1212
  }
1213
1213
 
1214
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1214
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1215
1215
 
1216
1216
  /*
1217
1217
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1365,7 +1365,7 @@
1365
1365
  return null;
1366
1366
  }
1367
1367
 
1368
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1368
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1369
1369
  /*
1370
1370
  * Copyright (c) Microsoft Corporation. All rights reserved.
1371
1371
  * Licensed under the MIT License.
@@ -1374,7 +1374,7 @@
1374
1374
  // AzureCloudInstance is not specified.
1375
1375
  None: "none"};
1376
1376
 
1377
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1377
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1378
1378
  /*
1379
1379
  * Copyright (c) Microsoft Corporation. All rights reserved.
1380
1380
  * Licensed under the MIT License.
@@ -1384,7 +1384,7 @@
1384
1384
  response.hasOwnProperty("metadata"));
1385
1385
  }
1386
1386
 
1387
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1387
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1388
1388
  /*
1389
1389
  * Copyright (c) Microsoft Corporation. All rights reserved.
1390
1390
  * Licensed under the MIT License.
@@ -1394,7 +1394,7 @@
1394
1394
  response.hasOwnProperty("error_description"));
1395
1395
  }
1396
1396
 
1397
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1397
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1398
1398
  /*
1399
1399
  * Copyright (c) Microsoft Corporation. All rights reserved.
1400
1400
  * Licensed under the MIT License.
@@ -1465,7 +1465,7 @@
1465
1465
  const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
1466
1466
  const SetUserData = "setUserData";
1467
1467
 
1468
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1468
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1469
1469
  /*
1470
1470
  * Copyright (c) Microsoft Corporation. All rights reserved.
1471
1471
  * Licensed under the MIT License.
@@ -1559,7 +1559,7 @@
1559
1559
  };
1560
1560
  };
1561
1561
 
1562
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1562
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1563
1563
 
1564
1564
  /*
1565
1565
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1688,7 +1688,7 @@
1688
1688
  },
1689
1689
  };
1690
1690
 
1691
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1691
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1692
1692
  /*
1693
1693
  * Copyright (c) Microsoft Corporation. All rights reserved.
1694
1694
  * Licensed under the MIT License.
@@ -1753,7 +1753,7 @@
1753
1753
  return cachedAtSec > nowSeconds();
1754
1754
  }
1755
1755
 
1756
- /*! @azure/msal-common v16.17.0 2026-11-18 */
1756
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
1757
1757
 
1758
1758
  /*
1759
1759
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2040,7 +2040,7 @@
2040
2040
  return [...attributeTokens].sort().join(" ");
2041
2041
  }
2042
2042
 
2043
- /*! @azure/msal-common v16.17.0 2026-11-18 */
2043
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
2044
2044
 
2045
2045
  /*
2046
2046
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3011,7 +3011,7 @@
3011
3011
  };
3012
3012
  }
3013
3013
 
3014
- /*! @azure/msal-common v16.17.0 2026-11-18 */
3014
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
3015
3015
 
3016
3016
  /*
3017
3017
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3045,7 +3045,7 @@
3045
3045
  }
3046
3046
  }
3047
3047
 
3048
- /*! @azure/msal-common v16.17.0 2026-11-18 */
3048
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
3049
3049
 
3050
3050
  /*
3051
3051
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3241,7 +3241,7 @@
3241
3241
  }
3242
3242
  }
3243
3243
 
3244
- /*! @azure/msal-common v16.17.0 2026-11-18 */
3244
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
3245
3245
 
3246
3246
  /*
3247
3247
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3742,7 +3742,7 @@
3742
3742
  }
3743
3743
  }
3744
3744
 
3745
- /*! @azure/msal-common v16.17.0 2026-11-18 */
3745
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
3746
3746
 
3747
3747
  /*
3748
3748
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3873,7 +3873,7 @@
3873
3873
  }
3874
3874
  }
3875
3875
 
3876
- /*! @azure/msal-common v16.17.0 2026-11-18 */
3876
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
3877
3877
 
3878
3878
  /*
3879
3879
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3921,7 +3921,7 @@
3921
3921
  },
3922
3922
  };
3923
3923
 
3924
- /*! @azure/msal-common v16.17.0 2026-11-18 */
3924
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
3925
3925
 
3926
3926
  /*
3927
3927
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3944,7 +3944,7 @@
3944
3944
  },
3945
3945
  };
3946
3946
 
3947
- /*! @azure/msal-common v16.17.0 2026-11-18 */
3947
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
3948
3948
  /*
3949
3949
  * Copyright (c) Microsoft Corporation. All rights reserved.
3950
3950
  * Licensed under the MIT License.
@@ -4219,12 +4219,12 @@
4219
4219
  }
4220
4220
  }
4221
4221
 
4222
- /*! @azure/msal-common v16.17.0 2026-11-18 */
4222
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
4223
4223
  /* eslint-disable header/header */
4224
4224
  const name$1 = "@azure/msal-common";
4225
- const version$1 = "16.17.0";
4225
+ const version$1 = "16.18.0";
4226
4226
 
4227
- /*! @azure/msal-common v16.17.0 2026-11-18 */
4227
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
4228
4228
  /*
4229
4229
  * Copyright (c) Microsoft Corporation. All rights reserved.
4230
4230
  * Licensed under the MIT License.
@@ -4232,7 +4232,7 @@
4232
4232
  const cacheQuotaExceeded = "cache_quota_exceeded";
4233
4233
  const cacheErrorUnknown = "cache_error_unknown";
4234
4234
 
4235
- /*! @azure/msal-common v16.17.0 2026-11-18 */
4235
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
4236
4236
 
4237
4237
  /*
4238
4238
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4270,7 +4270,7 @@
4270
4270
  }
4271
4271
  }
4272
4272
 
4273
- /*! @azure/msal-common v16.17.0 2026-11-18 */
4273
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
4274
4274
 
4275
4275
  /*
4276
4276
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5497,7 +5497,7 @@
5497
5497
  }
5498
5498
  }
5499
5499
 
5500
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5500
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5501
5501
  /*
5502
5502
  * Copyright (c) Microsoft Corporation. All rights reserved.
5503
5503
  * Licensed under the MIT License.
@@ -5511,7 +5511,7 @@
5511
5511
  const PerformanceEventStatus = {
5512
5512
  InProgress: 1};
5513
5513
 
5514
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5514
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5515
5515
 
5516
5516
  /*
5517
5517
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5569,7 +5569,7 @@
5569
5569
  }
5570
5570
  }
5571
5571
 
5572
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5572
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5573
5573
 
5574
5574
  /*
5575
5575
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5623,7 +5623,7 @@
5623
5623
  * @returns Configuration
5624
5624
  * @internal
5625
5625
  */
5626
- function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, tokenBindingKeyManager: tokenBindingKeyManager, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
5626
+ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, tokenBindingKeyManager: tokenBindingKeyManager, dpopNonceProvider: dpopNonceProvider, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
5627
5627
  const loggerOptions = {
5628
5628
  ...DEFAULT_LOGGER_IMPLEMENTATION,
5629
5629
  ...userLoggerOption,
@@ -5638,6 +5638,7 @@
5638
5638
  networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
5639
5639
  cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
5640
5640
  tokenBindingKeyManager: resolvedTokenBindingKeyManager,
5641
+ dpopNonceProvider,
5641
5642
  clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
5642
5643
  libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
5643
5644
  telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
@@ -5667,7 +5668,7 @@
5667
5668
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
5668
5669
  }
5669
5670
 
5670
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5671
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5671
5672
  /*
5672
5673
  * Copyright (c) Microsoft Corporation. All rights reserved.
5673
5674
  * Licensed under the MIT License.
@@ -5694,7 +5695,7 @@
5694
5695
  }
5695
5696
  }
5696
5697
 
5697
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5698
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5698
5699
 
5699
5700
  /*
5700
5701
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5715,7 +5716,7 @@
5715
5716
  return new JoseHeaderError(code, correlationId);
5716
5717
  }
5717
5718
 
5718
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5719
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5719
5720
  /*
5720
5721
  * Copyright (c) Microsoft Corporation. All rights reserved.
5721
5722
  * Licensed under the MIT License.
@@ -5740,7 +5741,7 @@
5740
5741
  return Object.getPrototypeOf(value) === proto;
5741
5742
  }
5742
5743
 
5743
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5744
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5744
5745
  /*
5745
5746
  * Copyright (c) Microsoft Corporation. All rights reserved.
5746
5747
  * Licensed under the MIT License.
@@ -5750,7 +5751,7 @@
5750
5751
  const missingJwkError = "missing_jwk_error";
5751
5752
  const invalidJwkError = "invalid_jwk_error";
5752
5753
 
5753
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5754
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5754
5755
 
5755
5756
  /*
5756
5757
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5816,7 +5817,7 @@
5816
5817
  }
5817
5818
  }
5818
5819
 
5819
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5820
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5820
5821
 
5821
5822
  /*
5822
5823
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5917,7 +5918,50 @@
5917
5918
  }
5918
5919
  }
5919
5920
 
5920
- /*! @azure/msal-common v16.17.0 2026-11-18 */
5921
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5922
+
5923
+ /*
5924
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5925
+ * Licensed under the MIT License.
5926
+ */
5927
+ /**
5928
+ * Validates that a DPoP nonce is a non-empty string and returns the opaque
5929
+ * value unchanged.
5930
+ * @internal
5931
+ */
5932
+ function validateDpopNonce(nonce, correlationId = "") {
5933
+ if (typeof nonce !== "string" || nonce.length === 0) {
5934
+ throw createClientConfigurationError(invalidDpopNonce, correlationId);
5935
+ }
5936
+ return nonce;
5937
+ }
5938
+ /**
5939
+ * Returns the normalized HTTPS origin used to scope a resource-server nonce.
5940
+ * @internal
5941
+ */
5942
+ function canonicalizeDpopResourceServer(resourceRequestUri, correlationId = "") {
5943
+ if (typeof resourceRequestUri !== "string" ||
5944
+ !/^https:\/\//i.test(resourceRequestUri)) {
5945
+ throw createClientConfigurationError(invalidDpopHtu, correlationId);
5946
+ }
5947
+ let parsedUrl;
5948
+ try {
5949
+ parsedUrl = new URL(resourceRequestUri);
5950
+ }
5951
+ catch {
5952
+ throw createClientConfigurationError(invalidDpopHtu, correlationId);
5953
+ }
5954
+ if (parsedUrl.protocol !== "https:" ||
5955
+ parsedUrl.origin === "null" ||
5956
+ !parsedUrl.hostname ||
5957
+ parsedUrl.username ||
5958
+ parsedUrl.password) {
5959
+ throw createClientConfigurationError(invalidDpopHtu, correlationId);
5960
+ }
5961
+ return parsedUrl.origin;
5962
+ }
5963
+
5964
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
5921
5965
 
5922
5966
  /*
5923
5967
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5962,11 +6006,6 @@
5962
6006
  parsedUrl.hash = "";
5963
6007
  return parsedUrl.href;
5964
6008
  }
5965
- function validateDpopNonce(nonce, correlationId) {
5966
- if (nonce !== undefined && nonce.trim().length === 0) {
5967
- throw createClientConfigurationError(invalidDpopNonce, correlationId);
5968
- }
5969
- }
5970
6009
  /**
5971
6010
  * Validates and normalizes the HTTP resource context for a DPoP-bound request.
5972
6011
  * @internal
@@ -6010,7 +6049,6 @@
6010
6049
  * - jti is a fresh CSPRNG-backed unique identifier for every proof.
6011
6050
  */
6012
6051
  buildTokenProofClaims(params, correlationId = "") {
6013
- validateDpopNonce(params.nonce, correlationId);
6014
6052
  const claims = {
6015
6053
  jti: this.cryptoUtils.createNewGuid(),
6016
6054
  htm: "POST",
@@ -6018,7 +6056,7 @@
6018
6056
  iat: nowSeconds(),
6019
6057
  };
6020
6058
  if (params.nonce !== undefined) {
6021
- claims.nonce = params.nonce;
6059
+ claims.nonce = validateDpopNonce(params.nonce, correlationId);
6022
6060
  }
6023
6061
  return claims;
6024
6062
  }
@@ -6036,7 +6074,6 @@
6036
6074
  * - jti is a fresh CSPRNG-backed unique identifier for every proof.
6037
6075
  */
6038
6076
  buildResourceProofClaims(params, correlationId = "") {
6039
- validateDpopNonce(params.nonce, correlationId);
6040
6077
  const resourceContext = normalizeDpopResourceRequestContext(params, correlationId);
6041
6078
  const claims = {
6042
6079
  jti: this.cryptoUtils.createNewGuid(),
@@ -6046,7 +6083,7 @@
6046
6083
  iat: nowSeconds(),
6047
6084
  };
6048
6085
  if (params.nonce !== undefined) {
6049
- claims.nonce = params.nonce;
6086
+ claims.nonce = validateDpopNonce(params.nonce, correlationId);
6050
6087
  }
6051
6088
  return claims;
6052
6089
  }
@@ -6072,7 +6109,7 @@
6072
6109
  }
6073
6110
  }
6074
6111
 
6075
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6112
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6076
6113
  /*
6077
6114
  * Copyright (c) Microsoft Corporation. All rights reserved.
6078
6115
  * Licensed under the MIT License.
@@ -6123,7 +6160,7 @@
6123
6160
  */
6124
6161
  const interruptedUser = "interrupted_user";
6125
6162
 
6126
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6163
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6127
6164
 
6128
6165
  /*
6129
6166
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6190,7 +6227,7 @@
6190
6227
  return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
6191
6228
  }
6192
6229
 
6193
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6230
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6194
6231
 
6195
6232
  /*
6196
6233
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6209,7 +6246,7 @@
6209
6246
  }
6210
6247
  }
6211
6248
 
6212
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6249
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6213
6250
 
6214
6251
  /*
6215
6252
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6280,18 +6317,29 @@
6280
6317
  }
6281
6318
  }
6282
6319
 
6283
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6320
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6284
6321
 
6285
6322
  /*
6286
6323
  * Copyright (c) Microsoft Corporation. All rights reserved.
6287
6324
  * Licensed under the MIT License.
6288
6325
  */
6326
+ /*
6327
+ * Retains the signing key for fresh proofs on deduplicated calls without
6328
+ * exposing it on the public AuthenticationResult.
6329
+ */
6330
+ const dpopKeyIdByAuthenticationResult = new WeakMap();
6331
+ function getDpopNonceForRequest(dpopNonceProvider, request) {
6332
+ if (!request.resourceRequestUri || !dpopNonceProvider) {
6333
+ return undefined;
6334
+ }
6335
+ return dpopNonceProvider.getDpopNonce(request.resourceRequestUri, request.correlationId);
6336
+ }
6289
6337
  /**
6290
6338
  * Class that handles response parsing.
6291
6339
  * @internal
6292
6340
  */
6293
6341
  class ResponseHandler {
6294
- constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
6342
+ constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, dpopNonceProvider) {
6295
6343
  this.clientId = clientId;
6296
6344
  this.cacheStorage = cacheStorage;
6297
6345
  this.cryptoObj = cryptoObj;
@@ -6300,6 +6348,7 @@
6300
6348
  this.performanceClient = performanceClient;
6301
6349
  this.serializableCache = serializableCache;
6302
6350
  this.persistencePlugin = persistencePlugin;
6351
+ this.dpopNonceProvider = dpopNonceProvider;
6303
6352
  }
6304
6353
  /**
6305
6354
  * Function which validates server authorization token response.
@@ -6438,6 +6487,7 @@
6438
6487
  requestState: requestStateObj,
6439
6488
  requestId: serverRequestId,
6440
6489
  tokenBindingKeyManager: this.tokenBindingKeyManager,
6490
+ dpopNonceProvider: this.dpopNonceProvider,
6441
6491
  });
6442
6492
  }
6443
6493
  }
@@ -6457,6 +6507,7 @@
6457
6507
  serverTokenResponse,
6458
6508
  requestId: serverRequestId,
6459
6509
  tokenBindingKeyManager: this.tokenBindingKeyManager,
6510
+ dpopNonceProvider: this.dpopNonceProvider,
6460
6511
  });
6461
6512
  }
6462
6513
  /**
@@ -6554,7 +6605,7 @@
6554
6605
  * @param stateString
6555
6606
  */
6556
6607
  static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, performanceClient, options = {}) {
6557
- const { idTokenClaims, requestState, serverTokenResponse, requestId, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, } = options;
6608
+ const { idTokenClaims, requestState, serverTokenResponse, requestId, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, dpopNonceProvider, } = options;
6558
6609
  let accessToken = "";
6559
6610
  let responseScopes = [];
6560
6611
  let expiresOn = null;
@@ -6562,8 +6613,13 @@
6562
6613
  let refreshOn;
6563
6614
  let familyId = "";
6564
6615
  let dpopProof;
6616
+ const cachedAccessTokenType = cacheRecord.accessToken?.tokenType || "";
6617
+ const isDpopAccessToken = cachedAccessTokenType.toLowerCase() ===
6618
+ AuthenticationScheme.DPOP.toLowerCase();
6619
+ const resultTokenType = isDpopAccessToken
6620
+ ? AuthenticationScheme.DPOP
6621
+ : cachedAccessTokenType;
6565
6622
  if (cacheRecord.accessToken) {
6566
- const accessTokenType = cacheRecord.accessToken.tokenType?.toLowerCase();
6567
6623
  /*
6568
6624
  * if the request object has `popKid` property, `signPopToken` will be set to false and
6569
6625
  * the token will be returned unsigned
@@ -6581,15 +6637,17 @@
6581
6637
  else {
6582
6638
  accessToken = cacheRecord.accessToken.secret;
6583
6639
  }
6584
- if (accessTokenType ===
6585
- AuthenticationScheme.DPOP.toLowerCase()) {
6640
+ if (isDpopAccessToken) {
6586
6641
  if (!cacheRecord.accessToken.keyId) {
6587
6642
  throw createClientAuthError(keyIdMissing, request.correlationId);
6588
6643
  }
6589
6644
  const dpopProofGenerator = new DpopProofGenerator(cryptoObj, tokenBindingKeyManager);
6645
+ const dpopNonce = getDpopNonceForRequest(dpopNonceProvider, request);
6646
+ performanceClient?.addFields({ dpopNonceAppliedToProof: Boolean(dpopNonce) }, request.correlationId);
6590
6647
  dpopProof = await dpopProofGenerator.generateResourceProof({
6591
6648
  htu: request.resourceRequestUri,
6592
6649
  htm: request.resourceRequestMethod,
6650
+ nonce: dpopNonce,
6593
6651
  accessToken: cacheRecord.accessToken.secret,
6594
6652
  }, cacheRecord.accessToken.keyId, request.correlationId);
6595
6653
  }
@@ -6637,7 +6695,7 @@
6637
6695
  ? updateAccountTenantProfileData(getAccountInfo(cacheRecord.account), undefined, // tenantProfile optional
6638
6696
  idTokenClaims, cacheRecord.idToken?.secret)
6639
6697
  : null;
6640
- return {
6698
+ const authenticationResult = {
6641
6699
  authority: authority.canonicalAuthority,
6642
6700
  uniqueId: uid,
6643
6701
  tenantId: tid,
@@ -6654,16 +6712,49 @@
6654
6712
  correlationId: request.correlationId,
6655
6713
  requestId: requestId || "",
6656
6714
  familyId: familyId,
6657
- tokenType: cacheRecord.accessToken?.tokenType?.toLowerCase() ===
6658
- AuthenticationScheme.DPOP.toLowerCase()
6659
- ? AuthenticationScheme.DPOP
6660
- : cacheRecord.accessToken?.tokenType || "",
6715
+ tokenType: resultTokenType,
6661
6716
  state: requestState ? requestState.userRequestState : "",
6662
6717
  cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || "",
6663
6718
  msGraphHost: cacheRecord.account?.msGraphHost || "",
6664
6719
  code: serverTokenResponse?.spa_code,
6665
6720
  fromPlatformBroker: false,
6666
6721
  };
6722
+ if (isDpopAccessToken && cacheRecord.accessToken?.keyId) {
6723
+ ResponseHandler.setDpopKeyId(authenticationResult, cacheRecord.accessToken.keyId);
6724
+ }
6725
+ return authenticationResult;
6726
+ }
6727
+ /**
6728
+ * Retains an MSAL-owned DPoP key for fresh proofs on deduplicated calls.
6729
+ * @internal
6730
+ */
6731
+ static setDpopKeyId(authenticationResult, keyId) {
6732
+ dpopKeyIdByAuthenticationResult.set(authenticationResult, keyId);
6733
+ }
6734
+ /**
6735
+ * Returns whether MSAL can generate another proof for this result.
6736
+ * @internal
6737
+ */
6738
+ static hasDpopKeyId(authenticationResult) {
6739
+ return dpopKeyIdByAuthenticationResult.has(authenticationResult);
6740
+ }
6741
+ /**
6742
+ * Generates a fresh resource proof for a previously constructed DPoP result.
6743
+ * @internal
6744
+ */
6745
+ static async generateDpopResourceProof(cryptoObj, authenticationResult, request, performanceClient, options = {}) {
6746
+ const keyId = dpopKeyIdByAuthenticationResult.get(authenticationResult);
6747
+ if (!keyId) {
6748
+ throw createClientAuthError(keyIdMissing, request.correlationId);
6749
+ }
6750
+ const dpopNonce = getDpopNonceForRequest(options.dpopNonceProvider, request);
6751
+ performanceClient.addFields({ dpopNonceAppliedToProof: Boolean(dpopNonce) }, request.correlationId);
6752
+ return new DpopProofGenerator(cryptoObj, options.tokenBindingKeyManager ?? DEFAULT_TOKEN_BINDING_KEY_MANAGER).generateResourceProof({
6753
+ htu: request.resourceRequestUri,
6754
+ htm: request.resourceRequestMethod,
6755
+ nonce: dpopNonce,
6756
+ accessToken: authenticationResult.accessToken,
6757
+ }, keyId, request.correlationId);
6667
6758
  }
6668
6759
  }
6669
6760
  /** @internal */
@@ -6708,7 +6799,7 @@
6708
6799
  return baseAccount;
6709
6800
  }
6710
6801
 
6711
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6802
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6712
6803
  /*
6713
6804
  * Copyright (c) Microsoft Corporation. All rights reserved.
6714
6805
  * Licensed under the MIT License.
@@ -6718,7 +6809,7 @@
6718
6809
  UPN: "UPN",
6719
6810
  };
6720
6811
 
6721
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6812
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6722
6813
  /*
6723
6814
  * Copyright (c) Microsoft Corporation. All rights reserved.
6724
6815
  * Licensed under the MIT License.
@@ -6737,7 +6828,7 @@
6737
6828
  }
6738
6829
  }
6739
6830
 
6740
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6831
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6741
6832
 
6742
6833
  /*
6743
6834
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6761,7 +6852,7 @@
6761
6852
  };
6762
6853
  }
6763
6854
 
6764
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6855
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6765
6856
 
6766
6857
  /*
6767
6858
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6851,7 +6942,7 @@
6851
6942
  return undefined;
6852
6943
  }
6853
6944
 
6854
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6945
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6855
6946
 
6856
6947
  /*
6857
6948
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6882,7 +6973,7 @@
6882
6973
  return new NetworkError(error, httpStatus, responseHeaders);
6883
6974
  }
6884
6975
 
6885
- /*! @azure/msal-common v16.17.0 2026-11-18 */
6976
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
6886
6977
 
6887
6978
  /*
6888
6979
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7016,7 +7107,7 @@
7016
7107
  return response;
7017
7108
  }
7018
7109
 
7019
- /*! @azure/msal-common v16.17.0 2026-11-18 */
7110
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
7020
7111
 
7021
7112
  /*
7022
7113
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7067,7 +7158,7 @@
7067
7158
  const response = await invokeAsync(this.executeTokenRequest.bind(this), AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request, this.serverTelemetryManager);
7068
7159
  // Retrieve requestId from response headers
7069
7160
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
7070
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
7161
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager, this.config.dpopNonceProvider);
7071
7162
  // Validate response. This function throws a server error if an error is returned by the server.
7072
7163
  responseHandler.validateTokenResponse(response.body, request.correlationId);
7073
7164
  return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
@@ -7284,7 +7375,7 @@
7284
7375
  }
7285
7376
  }
7286
7377
 
7287
- /*! @azure/msal-common v16.17.0 2026-11-18 */
7378
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
7288
7379
 
7289
7380
  /*
7290
7381
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7514,7 +7605,7 @@
7514
7605
  return account.loginHint || account.idTokenClaims?.login_hint || null;
7515
7606
  }
7516
7607
 
7517
- /*! @azure/msal-common v16.17.0 2026-11-18 */
7608
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
7518
7609
 
7519
7610
  /*
7520
7611
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7549,7 +7640,7 @@
7549
7640
  const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
7550
7641
  // Retrieve requestId from response headers
7551
7642
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
7552
- const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
7643
+ const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager, this.config.dpopNonceProvider);
7553
7644
  responseHandler.validateTokenResponse(response.body, request.correlationId);
7554
7645
  return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
7555
7646
  }
@@ -7749,7 +7840,7 @@
7749
7840
  }
7750
7841
  }
7751
7842
 
7752
- /*! @azure/msal-common v16.17.0 2026-11-18 */
7843
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
7753
7844
 
7754
7845
  /*
7755
7846
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8042,7 +8133,7 @@
8042
8133
  clearNativeBrokerErrorCode() { }
8043
8134
  }
8044
8135
 
8045
- /*! @azure/msal-common v16.17.0 2026-11-18 */
8136
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
8046
8137
 
8047
8138
  /*
8048
8139
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8165,11 +8256,12 @@
8165
8256
  return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, this.performanceClient, {
8166
8257
  idTokenClaims,
8167
8258
  tokenBindingKeyManager: this.config.tokenBindingKeyManager,
8259
+ dpopNonceProvider: this.config.dpopNonceProvider,
8168
8260
  });
8169
8261
  }
8170
8262
  }
8171
8263
 
8172
- /*! @azure/msal-common v16.17.0 2026-11-18 */
8264
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
8173
8265
 
8174
8266
  /*
8175
8267
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8185,7 +8277,7 @@
8185
8277
  },
8186
8278
  };
8187
8279
 
8188
- /*! @azure/msal-common v16.17.0 2026-11-18 */
8280
+ /*! @azure/msal-common v16.18.0 2026-12-02 */
8189
8281
 
8190
8282
  /*
8191
8283
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8637,7 +8729,7 @@
8637
8729
 
8638
8730
  /* eslint-disable header/header */
8639
8731
  const name = "@azure/msal-browser";
8640
- const version = "5.30.0";
8732
+ const version = "5.31.0";
8641
8733
 
8642
8734
  /*
8643
8735
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8967,7 +9059,6 @@
8967
9059
  }
8968
9060
  /**
8969
9061
  * Checks if the result requires authentication method registration.
8970
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
8971
9062
  */
8972
9063
  isAuthMethodRegistrationRequired() {
8973
9064
  return (this.state.stateType ===
@@ -8975,7 +9066,6 @@
8975
9066
  }
8976
9067
  /**
8977
9068
  * Checks if the result requires MFA.
8978
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
8979
9069
  */
8980
9070
  isMfaRequired() {
8981
9071
  return this.state.stateType === MFA_AWAITING_STATE_TYPE;
@@ -9166,6 +9256,11 @@
9166
9256
  * Internal API for acquireTokenSilent.
9167
9257
  */
9168
9258
  const AcquireTokenSilentAsync = "acquireTokenSilentAsync";
9259
+ /**
9260
+ * loadDpopNonce API in StandardController (msal-browser).
9261
+ * Stores a resource-server DPoP nonce in controller-owned memory.
9262
+ */
9263
+ const StandardControllerLoadDpopNonce = "standardControllerLoadDpopNonce";
9169
9264
  /**
9170
9265
  * provisionTokenBindingKey API in TokenBindingKeyManager class (msal-browser).
9171
9266
  * Used to provision token-binding key material and return a key identifier.
@@ -10029,7 +10124,9 @@
10029
10124
  const iv = base64DecToArr(earJweParts[2]);
10030
10125
  const ciphertext = base64DecToArr(earJweParts[3]);
10031
10126
  const tag = base64DecToArr(earJweParts[4]);
10032
- const tagLengthBits = tag.byteLength * 8;
10127
+ if (tag.byteLength !== 16) {
10128
+ throw new Error("Invalid AES-GCM authentication tag length");
10129
+ }
10033
10130
  // Concat ciphertext and tag
10034
10131
  const encryptedData = new Uint8Array(ciphertext.length + tag.length);
10035
10132
  encryptedData.set(ciphertext);
@@ -10037,7 +10134,7 @@
10037
10134
  const decryptedData = await window.crypto.subtle.decrypt({
10038
10135
  name: AES_GCM,
10039
10136
  iv: iv,
10040
- tagLength: tagLengthBits,
10137
+ tagLength: 128,
10041
10138
  additionalData: header,
10042
10139
  }, key, encryptedData);
10043
10140
  return new TextDecoder().decode(decryptedData);
@@ -11101,7 +11198,7 @@
11101
11198
  * Licensed under the MIT License.
11102
11199
  */
11103
11200
  class BaseInteractionClient {
11104
- constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, platformAuthProvider, tokenBindingKeyManager) {
11201
+ constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, platformAuthProvider, tokenBindingKeyManager, dpopNonceProvider) {
11105
11202
  this.config = config;
11106
11203
  this.browserStorage = storageImpl;
11107
11204
  this.browserCrypto = browserCrypto;
@@ -11115,6 +11212,7 @@
11115
11212
  this.tokenBindingKeyManager =
11116
11213
  tokenBindingKeyManager ||
11117
11214
  new TokenBindingKeyManager(this.logger, this.performanceClient);
11215
+ this.dpopNonceProvider = dpopNonceProvider ?? storageImpl;
11118
11216
  }
11119
11217
  }
11120
11218
  /**
@@ -11213,6 +11311,7 @@
11213
11311
  * @returns A promise that resolves when the cache has been cleared.
11214
11312
  */
11215
11313
  async function clearCacheOnLogout(browserStorage, browserCrypto, logger, correlationId, account) {
11314
+ browserStorage.clearDpopNonces();
11216
11315
  if (account) {
11217
11316
  // Clear given account.
11218
11317
  try {
@@ -11494,6 +11593,7 @@
11494
11593
  }
11495
11594
  logger.verbose(`Authentication Scheme set to "'${validatedRequest.authenticationScheme}'" as configured in Auth request`, correlationId);
11496
11595
  }
11596
+ performanceClient.addFields({ authenticationScheme: validatedRequest.authenticationScheme }, correlationId);
11497
11597
  return validatedRequest;
11498
11598
  }
11499
11599
  async function initializeSilentRequest(request, account, config, performanceClient, logger) {
@@ -11768,6 +11868,7 @@
11768
11868
  },
11769
11869
  cryptoInterface: this.browserCrypto,
11770
11870
  tokenBindingKeyManager: this.tokenBindingKeyManager,
11871
+ dpopNonceProvider: this.dpopNonceProvider,
11771
11872
  networkInterface: this.networkClient,
11772
11873
  storageInterface: this.browserStorage,
11773
11874
  serverTelemetryManager: serverTelemetryManager,
@@ -12875,27 +12976,21 @@
12875
12976
  * Copyright (c) Microsoft Corporation. All rights reserved.
12876
12977
  * Licensed under the MIT License.
12877
12978
  */
12878
- const API_MARKERS = ["/api/", "/oauth2/"];
12879
- /*
12880
- * Resolves a HAL href against the configured authority. Absolute HTTP(S) URLs
12881
- * pass through; relative URLs retain their API path and query while using the
12882
- * configured tenant path.
12883
- *
12884
- * TODO: Remove tenant-path rewriting once the service consistently returns links that can be
12885
- * resolved directly against the configured authority.
12886
- */
12887
12979
  function resolveHrefV2(base, href) {
12888
12980
  const trimmed = href.trim();
12889
12981
  if (!trimmed) {
12890
12982
  throw new ParsedUrlError(InvalidUrl, "The HAL href cannot be empty");
12891
12983
  }
12892
- const absolute = tryParseAbsolute(trimmed);
12893
- if (absolute) {
12894
- return absolute;
12895
- }
12896
12984
  let resolved;
12897
12985
  try {
12898
- resolved = new URL(trimmed, base.origin);
12986
+ let path = trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
12987
+ const lowerHref = trimmed.toLowerCase();
12988
+ if (lowerHref.startsWith("https://") ||
12989
+ lowerHref.startsWith("http://")) {
12990
+ const absoluteHref = new URL(trimmed);
12991
+ path = `${absoluteHref.pathname}${absoluteHref.search}${absoluteHref.hash}`;
12992
+ }
12993
+ resolved = new URL(`${base.origin}${path}`);
12899
12994
  }
12900
12995
  catch (e) {
12901
12996
  throw new ParsedUrlError(InvalidUrl, `The HAL href "${href}" could not be resolved: ${e}`);
@@ -12903,31 +12998,7 @@
12903
12998
  if (resolved.protocol !== "http:" && resolved.protocol !== "https:") {
12904
12999
  throw new ParsedUrlError(InvalidUrl, `The HAL href "${href}" must use the HTTP or HTTPS protocol`);
12905
13000
  }
12906
- const tenantPath = base.pathname.endsWith("/")
12907
- ? base.pathname.slice(0, -1)
12908
- : base.pathname;
12909
- resolved.pathname = tenantPath + apiPath(resolved.pathname);
12910
13001
  return resolved;
12911
- }
12912
- function tryParseAbsolute(href) {
12913
- try {
12914
- const url = new URL(href);
12915
- return url.protocol === "http:" || url.protocol === "https:"
12916
- ? url
12917
- : undefined;
12918
- }
12919
- catch {
12920
- return undefined;
12921
- }
12922
- }
12923
- function apiPath(path) {
12924
- for (const marker of API_MARKERS) {
12925
- const index = path.indexOf(marker);
12926
- if (index >= 0) {
12927
- return path.slice(index);
12928
- }
12929
- }
12930
- return path.startsWith("/") ? path : `/${path}`;
12931
13002
  }
12932
13003
 
12933
13004
  /*
@@ -13034,17 +13105,17 @@
13034
13105
  * Redeems a continuation token for an authorization code and then tokens.
13035
13106
  */
13036
13107
  async completeWithTokens(request, context) {
13037
- const code = await this.authorizeChallengeContinue(request.continuationToken, context);
13108
+ const code = await this.authorizeChallengeContinue(request.continueHref, request.continuationToken, context);
13038
13109
  return this.token(code, context);
13039
13110
  }
13040
13111
  /*
13041
13112
  * Redeems a continuation token for an authorization code.
13042
13113
  */
13043
- async authorizeChallengeContinue(continuationToken, context) {
13114
+ async authorizeChallengeContinue(continueHref, continuationToken, context) {
13044
13115
  const request = {
13045
13116
  continuation_token: continuationToken,
13046
13117
  };
13047
- const parsedResponse = await this.postOAuthForm(AUTHORIZE_CHALLENGE, request, context);
13118
+ const parsedResponse = await this.postOAuthForm(resolveHrefV2(this.baseRequestUrl, continueHref), request, context);
13048
13119
  this.throwOnApiError(parsedResponse);
13049
13120
  const code = parsedResponse.body.code;
13050
13121
  if (!code) {
@@ -13093,7 +13164,9 @@
13093
13164
  }
13094
13165
  async postOAuthForm(endpoint, data, context) {
13095
13166
  const formData = new URLSearchParams(Object.entries(data));
13096
- const url = buildUrl(this.baseRequestUrl.href, endpoint, this.customAuthApiQueryParams);
13167
+ const url = typeof endpoint === "string"
13168
+ ? buildUrl(this.baseRequestUrl.href, endpoint, this.customAuthApiQueryParams)
13169
+ : endpoint;
13097
13170
  const response = await this.sendRequest(url, HttpMethod.POST, formData, URL_FORM_CONTENT_TYPE, context);
13098
13171
  const parsedResponse = await this.handler.parseResponse(response, context.correlationId);
13099
13172
  this.throwOnWebFallback(parsedResponse);
@@ -13235,6 +13308,7 @@
13235
13308
  return {
13236
13309
  nextAction: SignUpSubmitAttributesNextActionV2.CONTINUE,
13237
13310
  continuationToken,
13311
+ continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, correlationId),
13238
13312
  };
13239
13313
  }
13240
13314
  if (parsedResponse.body.action === COLLECT_ATTRIBUTES_RELATION) {
@@ -13312,6 +13386,7 @@
13312
13386
  return {
13313
13387
  nextAction: ResponseStateV2.CONTINUE,
13314
13388
  continuationToken: this.handler.requireContinuationToken(parsedResponse.continuationToken, parsedResponse.correlationId),
13389
+ continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, parsedResponse.correlationId),
13315
13390
  };
13316
13391
  }
13317
13392
  /*
@@ -13359,6 +13434,7 @@
13359
13434
  return {
13360
13435
  nextAction,
13361
13436
  continuationToken,
13437
+ continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, correlationId),
13362
13438
  };
13363
13439
  }
13364
13440
  const message = `Password reset poll next action '${nextAction}' is not supported.`;
@@ -13382,6 +13458,7 @@
13382
13458
  return {
13383
13459
  nextAction: ResponseStateV2.CONTINUE,
13384
13460
  continuationToken,
13461
+ continueHref: this.handler.requireHref(parsedResponse.body._links?.continue?.href, ResponseStateV2.CONTINUE, correlationId),
13385
13462
  };
13386
13463
  }
13387
13464
  if (parsedResponse.body.action === COLLECT_ATTRIBUTES_RELATION) {
@@ -13490,11 +13567,16 @@
13490
13567
  }
13491
13568
  resolveMethods(methods, correlationId) {
13492
13569
  const resolved = [];
13493
- methods.forEach((method, index) => {
13570
+ methods.forEach((method) => {
13494
13571
  const href = method._links?.challenge?.href;
13495
13572
  if (href) {
13573
+ if (typeof method.id !== "string" || !method.id.trim()) {
13574
+ const message = "Invalid HAL response: authentication method ID is missing or malformed";
13575
+ this.logger?.error(message, correlationId);
13576
+ throw new CustomAuthApiError(INVALID_HAL_RESPONSE, message, correlationId);
13577
+ }
13496
13578
  resolved.push({
13497
- id: method.id ?? method.type ?? `method-${index}`,
13579
+ id: method.id,
13498
13580
  type: method.type,
13499
13581
  hint: method.hint,
13500
13582
  challengeHref: href,
@@ -13574,6 +13656,7 @@
13574
13656
  const FLOW_CODE_REQUIRED_V2 = "FlowCodeRequiredResultV2";
13575
13657
  const FLOW_EXISTING_ACCOUNT_CODE_REQUIRED_V2 = "FlowExistingAccountCodeRequiredResultV2";
13576
13658
  const FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2 = "FlowExistingAccountPasswordRequiredResultV2";
13659
+ const FLOW_EXISTING_ACCOUNT_START_V2 = "FlowExistingAccountStartResultV2";
13577
13660
  const FLOW_PASSWORD_REQUIRED_V2 = "FlowPasswordRequiredResultV2";
13578
13661
  const FLOW_SIGN_UP_PASSWORD_REQUIRED_V2 = "FlowSignUpPasswordRequiredResultV2";
13579
13662
  const FLOW_MFA_REQUIRED_V2 = "FlowMFARequiredResultV2";
@@ -13595,6 +13678,9 @@
13595
13678
  function createFlowExistingAccountPasswordRequiredResultV2(input) {
13596
13679
  return { type: FLOW_EXISTING_ACCOUNT_PASSWORD_REQUIRED_V2, ...input };
13597
13680
  }
13681
+ function createFlowExistingAccountStartResultV2(input) {
13682
+ return { type: FLOW_EXISTING_ACCOUNT_START_V2, ...input };
13683
+ }
13598
13684
  function createFlowPasswordRequiredResultV2(input) {
13599
13685
  return { type: FLOW_PASSWORD_REQUIRED_V2, ...input };
13600
13686
  }
@@ -13629,7 +13715,6 @@
13629
13715
  */
13630
13716
  /**
13631
13717
  * The native auth V2 flow that a result or error originates from.
13632
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
13633
13718
  */
13634
13719
  const CustomAuthFlowScenarioV2 = {
13635
13720
  SignIn: "signIn",
@@ -13797,17 +13882,25 @@
13797
13882
  codeLength: startResult.codeLength,
13798
13883
  });
13799
13884
  }
13800
- const continuationState = {
13801
- continuationToken: startResult.continuationToken,
13802
- scenario: CustomAuthFlowScenarioV2.SignUp,
13803
- scopes,
13804
- links: {},
13805
- signUp: {
13806
- purpose: "existingAccount",
13885
+ return createFlowExistingAccountStartResultV2({
13886
+ correlationId,
13887
+ continuationState: {
13888
+ continuationToken: startResult.continuationToken,
13889
+ scenario: CustomAuthFlowScenarioV2.SignIn,
13890
+ scopes,
13891
+ links: {},
13892
+ signUp: {
13893
+ purpose: "existingAccount",
13894
+ },
13807
13895
  },
13808
- };
13809
- this.ensureAuthenticationFactor(startResult.authenticationFactor, AuthenticationFactorV2.SINGLE_FACTOR, "existing-account sign-up", correlationId);
13810
- const supportedMethods = startResult.methods
13896
+ authenticationFactor: startResult.authenticationFactor,
13897
+ methods: startResult.methods,
13898
+ });
13899
+ }
13900
+ async challengeExistingAccount(parameters) {
13901
+ const { continuationState, correlationId } = parameters;
13902
+ this.ensureAuthenticationFactor(parameters.authenticationFactor, AuthenticationFactorV2.SINGLE_FACTOR, "existing-account sign-up", correlationId);
13903
+ const supportedMethods = parameters.methods
13811
13904
  .map((method) => ({
13812
13905
  id: method.id,
13813
13906
  type: method.type ?? "",
@@ -13973,11 +14066,11 @@
13973
14066
  continuationState: {
13974
14067
  ...continuationState,
13975
14068
  continuationToken: result.continuationToken,
13976
- links: {},
14069
+ links: { continue: result.continueHref },
13977
14070
  },
13978
14071
  });
13979
14072
  }
13980
- return this.completeSignInAfterVerification(continuationState, result.continuationToken, correlationId);
14073
+ return this.completeSignInAfterVerification(continuationState, result.continuationToken, result.continueHref, correlationId);
13981
14074
  }
13982
14075
  /*
13983
14076
  * Requests a replacement authentication-method activation challenge.
@@ -14015,7 +14108,7 @@
14015
14108
  continuationState: {
14016
14109
  ...continuationState,
14017
14110
  continuationToken: verifyResult.continuationToken,
14018
- links: {},
14111
+ links: { continue: verifyResult.continueHref },
14019
14112
  },
14020
14113
  });
14021
14114
  }
@@ -14037,10 +14130,6 @@
14037
14130
  if (continuationState.scenario === CustomAuthFlowScenarioV2.SignIn) {
14038
14131
  return this.handleSignInVerification(continuationState, verifyResult, correlationId);
14039
14132
  }
14040
- if (continuationState.scenario === CustomAuthFlowScenarioV2.SignUp &&
14041
- continuationState.signUp?.purpose === "existingAccount") {
14042
- return this.handleSignInVerification(continuationState, verifyResult, correlationId);
14043
- }
14044
14133
  if (continuationState.scenario === CustomAuthFlowScenarioV2.SignUp) {
14045
14134
  return this.handleSignUpVerification(continuationState, verifyResult, correlationId);
14046
14135
  }
@@ -14068,9 +14157,9 @@
14068
14157
  codeLength: challengeResult.codeLength,
14069
14158
  });
14070
14159
  }
14071
- async submitSignUpAttributes(parameters) {
14160
+ async submitSignUpAttributes(parameters, step = "submitAttributes") {
14072
14161
  const { continuationState, correlationId, attributes: submittedAttributes, } = parameters;
14073
- const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, "submitAttributes", correlationId), correlationId);
14162
+ const context = this.createRequestContext(this.resolveStepApiId(continuationState.scenario, step, correlationId), correlationId);
14074
14163
  this.logger.verbose("Submitting additional V2 sign-up attributes.", correlationId);
14075
14164
  const submittedAttributeIds = Object.keys(submittedAttributes);
14076
14165
  const submitResult = await this.apiClient.submitSignUpAttributes(this.requireLink(correlationId, continuationState.links.submitAttributes), {
@@ -14167,7 +14256,7 @@
14167
14256
  continuationToken: pollResult.continuationToken,
14168
14257
  scenario: continuationState.scenario,
14169
14258
  scopes: continuationState.scopes,
14170
- links: {},
14259
+ links: { continue: pollResult.continueHref },
14171
14260
  },
14172
14261
  });
14173
14262
  }
@@ -14193,6 +14282,7 @@
14193
14282
  this.logger.verbose("Signing in with a V2 continuation.", correlationId);
14194
14283
  const tokenResponse = await this.apiClient.completeWithTokens({
14195
14284
  continuationToken: continuationState.continuationToken,
14285
+ continueHref: this.requireLink(correlationId, continuationState.links.continue),
14196
14286
  }, context);
14197
14287
  const authenticationResult = await this.handleTokenResponse(tokenResponse, continuationState.scopes, correlationId, apiId);
14198
14288
  this.logger.verbose("V2 continuation sign-in completed.", correlationId);
@@ -14231,7 +14321,7 @@
14231
14321
  });
14232
14322
  }
14233
14323
  if (verifyResult.nextAction === ResponseStateV2.CONTINUE) {
14234
- return this.completeSignInAfterVerification(continuationState, verifyResult.continuationToken, correlationId);
14324
+ return this.completeSignInAfterVerification(continuationState, verifyResult.continuationToken, verifyResult.continueHref, correlationId);
14235
14325
  }
14236
14326
  const message = `Verification next action '${verifyResult.nextAction}' is not supported for authentication.`;
14237
14327
  this.logger.error(message, correlationId);
@@ -14287,7 +14377,7 @@
14287
14377
  continuationState: {
14288
14378
  ...continuationState,
14289
14379
  continuationToken: verifyResult.continuationToken,
14290
- links: {},
14380
+ links: { continue: verifyResult.continueHref },
14291
14381
  },
14292
14382
  });
14293
14383
  }
@@ -14426,7 +14516,7 @@
14426
14516
  continuationState: {
14427
14517
  ...continuationState,
14428
14518
  continuationToken: result.continuationToken,
14429
- links: {},
14519
+ links: { continue: result.continueHref },
14430
14520
  },
14431
14521
  });
14432
14522
  }
@@ -14488,13 +14578,13 @@
14488
14578
  password: parameters.password,
14489
14579
  }, context);
14490
14580
  }
14491
- completeSignInAfterVerification(continuationState, continuationToken, correlationId) {
14581
+ completeSignInAfterVerification(continuationState, continuationToken, continueHref, correlationId) {
14492
14582
  return this.signInWithContinuation({
14493
14583
  correlationId,
14494
14584
  continuationState: {
14495
14585
  ...continuationState,
14496
14586
  continuationToken,
14497
- links: {},
14587
+ links: { continue: continueHref },
14498
14588
  },
14499
14589
  });
14500
14590
  }
@@ -14559,7 +14649,6 @@
14559
14649
  */
14560
14650
  /**
14561
14651
  * Terminal state indicating the operation failed.
14562
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
14563
14652
  */
14564
14653
  class FailedStateV2 extends AuthFlowStateBase {
14565
14654
  constructor() {
@@ -14589,7 +14678,6 @@
14589
14678
  */
14590
14679
  /**
14591
14680
  * Error returned by a native authentication V2 operation.
14592
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
14593
14681
  */
14594
14682
  class AuthFlowErrorV2 {
14595
14683
  constructor(errorData, scenario = CustomAuthFlowScenarioV2.Unknown, errorContext = "default") {
@@ -14742,7 +14830,6 @@
14742
14830
  */
14743
14831
  /**
14744
14832
  * Result of a native auth V2 operation.
14745
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
14746
14833
  */
14747
14834
  class CustomAuthResultV2 {
14748
14835
  constructor(state, data, scenario = CustomAuthFlowScenarioV2.Unknown) {
@@ -14817,7 +14904,6 @@
14817
14904
  */
14818
14905
  /**
14819
14906
  * Terminal state indicating the operation completed successfully.
14820
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
14821
14907
  */
14822
14908
  class CompletedStateV2 extends AuthFlowStateBase {
14823
14909
  constructor() {
@@ -14832,7 +14918,6 @@
14832
14918
  */
14833
14919
  /**
14834
14920
  * State returned when a completed V2 flow can sign the user in.
14835
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
14836
14921
  */
14837
14922
  class SignInContinuationStateV2 extends AuthFlowActionRequiredStateBase {
14838
14923
  constructor() {
@@ -14901,7 +14986,6 @@
14901
14986
  /**
14902
14987
  * State returned when a newly registered authentication method must be
14903
14988
  * activated with the challenge sent by the service.
14904
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
14905
14989
  */
14906
14990
  class AuthMethodVerificationRequiredStateV2 extends AuthFlowActionRequiredStateBase {
14907
14991
  constructor(stateParameters) {
@@ -14988,7 +15072,6 @@
14988
15072
  */
14989
15073
  /**
14990
15074
  * State returned when an authentication method must be registered.
14991
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
14992
15075
  */
14993
15076
  class AuthMethodRegistrationRequiredStateV2 extends AuthFlowActionRequiredStateBase {
14994
15077
  constructor(stateParameters) {
@@ -15046,7 +15129,6 @@
15046
15129
  */
15047
15130
  /**
15048
15131
  * State returned when first-factor authentication requires a one-time code.
15049
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
15050
15132
  */
15051
15133
  class CodeRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
15052
15134
  constructor() {
@@ -15167,7 +15249,6 @@
15167
15249
  /**
15168
15250
  * State returned when authentication requires verification of an email or SMS MFA
15169
15251
  * challenge. It allows the app to submit the challenge or request a replacement.
15170
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
15171
15252
  */
15172
15253
  class MFAVerificationRequiredStateV2 extends ChallengeVerificationStateBaseV2 {
15173
15254
  constructor() {
@@ -15391,7 +15472,6 @@
15391
15472
  */
15392
15473
  /**
15393
15474
  * State returned when the user must select an authentication method.
15394
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
15395
15475
  */
15396
15476
  class AuthMethodSelectionRequiredStateV2 extends AuthFlowActionRequiredStateBase {
15397
15477
  constructor(stateParameters) {
@@ -15418,9 +15498,7 @@
15418
15498
  cacheClient: this.stateParameters.cacheClient,
15419
15499
  signInStateTransitionHandler,
15420
15500
  };
15421
- const isExistingAccountSignUp = continuationState.scenario ===
15422
- CustomAuthFlowScenarioV2.SignUp &&
15423
- continuationState.signUp?.purpose === "existingAccount";
15501
+ const isExistingAccountSignUp = continuationState.signUp?.purpose === "existingAccount";
15424
15502
  const channel = result.type === FLOW_CODE_REQUIRED_V2
15425
15503
  ? result.channel?.toLowerCase()
15426
15504
  : undefined;
@@ -15527,7 +15605,6 @@
15527
15605
  */
15528
15606
  /**
15529
15607
  * State returned when sign-in or sign-up requires a password.
15530
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
15531
15608
  */
15532
15609
  class PasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
15533
15610
  constructor(stateParameters) {
@@ -15572,7 +15649,7 @@
15572
15649
  correlationId,
15573
15650
  continuationState,
15574
15651
  attributes: { password },
15575
- });
15652
+ }, "submitPassword");
15576
15653
  return signUpStateTransitionHandler.handleAttributeSubmission(result, { ...this.stateParameters, signUpStateTransitionHandler }, "password");
15577
15654
  }
15578
15655
  async submitSignInPassword(password) {
@@ -15648,7 +15725,6 @@
15648
15725
  * State returned when the user must supply a new password. Submission can
15649
15726
  * require method registration or MFA, and the flow is not complete until any
15650
15727
  * subsequent required actions finish.
15651
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
15652
15728
  */
15653
15729
  class NewPasswordRequiredStateV2 extends AuthFlowActionRequiredStateBase {
15654
15730
  constructor() {
@@ -15741,7 +15817,6 @@
15741
15817
  */
15742
15818
  /**
15743
15819
  * State returned when sign-up requires profile or custom attributes.
15744
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
15745
15820
  */
15746
15821
  class AttributesRequiredStateV2 extends AuthFlowActionRequiredStateBase {
15747
15822
  constructor(stateParameters) {
@@ -15839,7 +15914,7 @@
15839
15914
  * @param customAuthProxyDomain - The custom auth proxy domain.
15840
15915
  */
15841
15916
  constructor(authority, config, networkInterface, cacheManager, logger, performanceClient, customAuthProxyDomain) {
15842
- const ciamAuthorityUrl = CustomAuthAuthority.transformCIAMAuthority(authority, "");
15917
+ const ciamAuthorityUrl = CustomAuthAuthority.transformCIAMAuthority(formatAuthorityUri(authority), "");
15843
15918
  const authorityOptions = {
15844
15919
  protocolMode: config.system.protocolMode,
15845
15920
  OIDCOptions: config.auth.OIDCOptions,
@@ -17144,6 +17219,7 @@
17144
17219
  },
17145
17220
  cryptoInterface: this.browserCrypto,
17146
17221
  tokenBindingKeyManager: this.tokenBindingKeyManager,
17222
+ dpopNonceProvider: this.browserStorage,
17147
17223
  networkInterface: this.networkClient,
17148
17224
  storageInterface: this.browserStorage,
17149
17225
  serverTelemetryManager: serverTelemetryManager,
@@ -17241,7 +17317,6 @@
17241
17317
  }
17242
17318
  /**
17243
17319
  * Checks if the result requires authentication method registration.
17244
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17245
17320
  */
17246
17321
  isAuthMethodRegistrationRequired() {
17247
17322
  return (this.state.stateType ===
@@ -17249,7 +17324,6 @@
17249
17324
  }
17250
17325
  /**
17251
17326
  * Checks if the result requires MFA.
17252
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17253
17327
  */
17254
17328
  isMfaRequired() {
17255
17329
  return this.state.stateType === MFA_AWAITING_STATE_TYPE;
@@ -17331,7 +17405,6 @@
17331
17405
  /**
17332
17406
  * Checks if the result indicates that verification is required.
17333
17407
  * @returns true if verification is required, false otherwise.
17334
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17335
17408
  */
17336
17409
  isVerificationRequired() {
17337
17410
  return (this.state.stateType ===
@@ -17340,7 +17413,6 @@
17340
17413
  /**
17341
17414
  * Checks if the result indicates that registration is completed (fast-pass scenario).
17342
17415
  * @returns true if registration is completed, false otherwise.
17343
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17344
17416
  */
17345
17417
  isCompleted() {
17346
17418
  return (this.state.stateType ===
@@ -17349,7 +17421,6 @@
17349
17421
  /**
17350
17422
  * Checks if the result is in a failed state.
17351
17423
  * @returns true if the result is failed, false otherwise.
17352
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17353
17424
  */
17354
17425
  isFailed() {
17355
17426
  return (this.state.stateType === AUTH_METHOD_REGISTRATION_FAILED_STATE_TYPE);
@@ -17377,7 +17448,6 @@
17377
17448
  /**
17378
17449
  * Checks if the result indicates that registration is completed.
17379
17450
  * @returns true if registration is completed, false otherwise.
17380
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17381
17451
  */
17382
17452
  isCompleted() {
17383
17453
  return (this.state.stateType ===
@@ -17386,7 +17456,6 @@
17386
17456
  /**
17387
17457
  * Checks if the result is in a failed state.
17388
17458
  * @returns true if the result is failed, false otherwise.
17389
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17390
17459
  */
17391
17460
  isFailed() {
17392
17461
  return (this.state.stateType === AUTH_METHOD_REGISTRATION_FAILED_STATE_TYPE);
@@ -17487,7 +17556,6 @@
17487
17556
  /**
17488
17557
  * Gets the available authentication methods for registration.
17489
17558
  * @returns Array of available authentication methods.
17490
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17491
17559
  */
17492
17560
  getAuthMethods() {
17493
17561
  return this.stateParameters.authMethods;
@@ -17496,7 +17564,6 @@
17496
17564
  * Challenges an authentication method for registration.
17497
17565
  * @param authMethodDetails The authentication method details to challenge.
17498
17566
  * @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
17499
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17500
17567
  */
17501
17568
  async challengeAuthMethod(authMethodDetails) {
17502
17569
  return this.challengeAuthMethodInternal(authMethodDetails);
@@ -17516,7 +17583,6 @@
17516
17583
  /**
17517
17584
  * Gets the length of the expected verification code.
17518
17585
  * @returns The code length.
17519
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17520
17586
  */
17521
17587
  getCodeLength() {
17522
17588
  return this.stateParameters.codeLength;
@@ -17524,7 +17590,6 @@
17524
17590
  /**
17525
17591
  * Gets the channel through which the challenge was sent.
17526
17592
  * @returns The challenge channel (e.g., "email").
17527
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17528
17593
  */
17529
17594
  getChannel() {
17530
17595
  return this.stateParameters.challengeChannel;
@@ -17532,7 +17597,6 @@
17532
17597
  /**
17533
17598
  * Gets the target label indicating where the challenge was sent.
17534
17599
  * @returns The challenge target label (e.g., masked email address).
17535
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17536
17600
  */
17537
17601
  getSentTo() {
17538
17602
  return this.stateParameters.challengeTargetLabel;
@@ -17541,7 +17605,6 @@
17541
17605
  * Submits the verification challenge to complete the authentication method registration.
17542
17606
  * @param code The verification code entered by the user.
17543
17607
  * @returns Promise that resolves to AuthMethodRegistrationSubmitChallengeResult.
17544
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17545
17608
  */
17546
17609
  async submitChallenge(code) {
17547
17610
  try {
@@ -17570,7 +17633,6 @@
17570
17633
  * Challenges a different authentication method for registration.
17571
17634
  * @param authMethodDetails The authentication method details to challenge.
17572
17635
  * @returns Promise that resolves to AuthMethodRegistrationChallengeMethodResult.
17573
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17574
17636
  */
17575
17637
  async challengeAuthMethod(authMethodDetails) {
17576
17638
  return this.challengeAuthMethodInternal(authMethodDetails);
@@ -17651,7 +17713,6 @@
17651
17713
  /**
17652
17714
  * Checks if the MFA flow is completed successfully.
17653
17715
  * @returns true if completed, false otherwise.
17654
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17655
17716
  */
17656
17717
  isCompleted() {
17657
17718
  return this.state.stateType === MFA_COMPLETED_STATE_TYPE;
@@ -17659,7 +17720,6 @@
17659
17720
  /**
17660
17721
  * Checks if the result is in a failed state.
17661
17722
  * @returns true if the result is failed, false otherwise.
17662
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17663
17723
  */
17664
17724
  isFailed() {
17665
17725
  return this.state.stateType === MFA_FAILED_STATE_TYPE;
@@ -17688,7 +17748,6 @@
17688
17748
  /**
17689
17749
  * Checks if the result indicates that verification is required.
17690
17750
  * @returns true if verification is required, false otherwise.
17691
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17692
17751
  */
17693
17752
  isVerificationRequired() {
17694
17753
  return this.state.stateType === MFA_VERIFICATION_REQUIRED_STATE_TYPE;
@@ -17696,7 +17755,6 @@
17696
17755
  /**
17697
17756
  * Checks if the result is in a failed state.
17698
17757
  * @returns true if the result is failed, false otherwise.
17699
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17700
17758
  */
17701
17759
  isFailed() {
17702
17760
  return this.state.stateType === MFA_FAILED_STATE_TYPE;
@@ -17729,7 +17787,6 @@
17729
17787
  * Requests an MFA challenge for a specific authentication method.
17730
17788
  * @param authMethodId The authentication method ID to use for the challenge.
17731
17789
  * @returns Promise that resolves to MfaRequestChallengeResult.
17732
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17733
17790
  */
17734
17791
  async requestChallenge(authMethodId) {
17735
17792
  try {
@@ -17778,7 +17835,6 @@
17778
17835
  /**
17779
17836
  * Gets the available authentication methods for MFA.
17780
17837
  * @returns Array of available authentication methods.
17781
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17782
17838
  */
17783
17839
  getAuthMethods() {
17784
17840
  return this.stateParameters.authMethods;
@@ -17799,7 +17855,6 @@
17799
17855
  /**
17800
17856
  * Gets the length of the code that the user needs to provide.
17801
17857
  * @returns The expected code length.
17802
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17803
17858
  */
17804
17859
  getCodeLength() {
17805
17860
  return this.stateParameters.codeLength;
@@ -17807,7 +17862,6 @@
17807
17862
  /**
17808
17863
  * Gets the channel through which the challenge was sent.
17809
17864
  * @returns The challenge channel (e.g., "email").
17810
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17811
17865
  */
17812
17866
  getChannel() {
17813
17867
  return this.stateParameters.challengeChannel;
@@ -17815,7 +17869,6 @@
17815
17869
  /**
17816
17870
  * Gets the target label indicating where the challenge was sent.
17817
17871
  * @returns The challenge target label (e.g., masked email address).
17818
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17819
17872
  */
17820
17873
  getSentTo() {
17821
17874
  return this.stateParameters.challengeTargetLabel;
@@ -17824,7 +17877,6 @@
17824
17877
  * Submits the MFA challenge (e.g., OTP code) to complete the authentication.
17825
17878
  * @param challenge The challenge code (e.g., OTP code) entered by the user.
17826
17879
  * @returns Promise that resolves to MfaSubmitChallengeResult.
17827
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
17828
17880
  */
17829
17881
  async submitChallenge(challenge) {
17830
17882
  try {
@@ -18071,7 +18123,6 @@
18071
18123
  }
18072
18124
  /**
18073
18125
  * Checks if the result requires authentication method registration.
18074
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
18075
18126
  */
18076
18127
  isAuthMethodRegistrationRequired() {
18077
18128
  return (this.state.stateType ===
@@ -18079,7 +18130,6 @@
18079
18130
  }
18080
18131
  /**
18081
18132
  * Checks if the result requires MFA.
18082
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
18083
18133
  */
18084
18134
  isMfaRequired() {
18085
18135
  return this.state.stateType === MFA_AWAITING_STATE_TYPE;
@@ -19655,6 +19705,7 @@
19655
19705
  * Copyright (c) Microsoft Corporation. All rights reserved.
19656
19706
  * Licensed under the MIT License.
19657
19707
  */
19708
+ const MAX_RESOURCE_SERVER_NONCES = 50;
19658
19709
  /**
19659
19710
  * Reason an old-schema cache entry was removed during migration.
19660
19711
  */
@@ -19670,6 +19721,7 @@
19670
19721
  class BrowserCacheManager extends CacheManager {
19671
19722
  constructor(clientId, cacheConfig, cryptoImpl, logger, performanceClient, eventHandler, staticAuthorityOptions, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
19672
19723
  super(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager);
19724
+ this.dpopNonces = new Map();
19673
19725
  this.cacheConfig = cacheConfig;
19674
19726
  this.logger = logger;
19675
19727
  this.internalStorage = new MemoryStorage();
@@ -20690,6 +20742,40 @@
20690
20742
  const version = this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_VER) || "";
20691
20743
  return [sku, version];
20692
20744
  }
20745
+ /**
20746
+ * Stores a validated resource-server DPoP nonce in PCA-local memory.
20747
+ * @internal
20748
+ */
20749
+ setDpopNonce(resourceRequestUri, dpopNonce, correlationId = "") {
20750
+ const resourceServer = canonicalizeDpopResourceServer(resourceRequestUri, correlationId);
20751
+ const validatedNonce = validateDpopNonce(dpopNonce, correlationId);
20752
+ // Reinsert replacements so eviction remains oldest-write ordered.
20753
+ this.dpopNonces.delete(resourceServer);
20754
+ this.dpopNonces.set(resourceServer, validatedNonce);
20755
+ if (this.dpopNonces.size > MAX_RESOURCE_SERVER_NONCES) {
20756
+ const oldestResourceServer = this.dpopNonces.keys().next().value;
20757
+ if (oldestResourceServer) {
20758
+ this.dpopNonces.delete(oldestResourceServer);
20759
+ }
20760
+ this.performanceClient.incrementFields({ "ext.dpopNonceCacheEvictionCount": 1 }, correlationId);
20761
+ }
20762
+ }
20763
+ /**
20764
+ * Reads the current resource-server DPoP nonce from PCA-local memory.
20765
+ * This optional structural capability is consumed by msal-common without
20766
+ * adding methods to the CacheManager abstraction.
20767
+ * @internal
20768
+ */
20769
+ getDpopNonce(resourceRequestUri, correlationId = "") {
20770
+ return this.dpopNonces.get(canonicalizeDpopResourceServer(resourceRequestUri, correlationId));
20771
+ }
20772
+ /**
20773
+ * Clears all PCA-local DPoP nonce state.
20774
+ * @internal
20775
+ */
20776
+ clearDpopNonces() {
20777
+ this.dpopNonces.clear();
20778
+ }
20693
20779
  /**
20694
20780
  *
20695
20781
  * @param key
@@ -20834,6 +20920,7 @@
20834
20920
  }
20835
20921
  });
20836
20922
  this.internalStorage.clear();
20923
+ this.dpopNonces.clear();
20837
20924
  }
20838
20925
  /**
20839
20926
  * Prepend msal.<client-id> to each key
@@ -21937,7 +22024,7 @@
21937
22024
  this.accountId = accountId;
21938
22025
  this.platformAuthProvider = provider;
21939
22026
  this.nativeStorageManager = nativeStorageImpl;
21940
- this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, provider, this.tokenBindingKeyManager);
22027
+ this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, provider, this.tokenBindingKeyManager, browserStorage);
21941
22028
  const extensionName = this.platformAuthProvider.getExtensionName();
21942
22029
  this.skus = ServerTelemetryManager.makeExtraSkuString({
21943
22030
  libraryName: BrowserConstants.MSAL_SKU,
@@ -22322,6 +22409,11 @@
22322
22409
  const shouldRemoveGeneratedDpopKey = isL3DpopResponse ||
22323
22410
  (this.isDpopBrokerRequest(request) &&
22324
22411
  storeInCache?.accessToken === false);
22412
+ if (dpopBrokerOutcome === "L1" &&
22413
+ !shouldRemoveGeneratedDpopKey &&
22414
+ request.keyId) {
22415
+ ResponseHandler.setDpopKeyId(result, request.keyId);
22416
+ }
22325
22417
  if (shouldRemoveGeneratedDpopKey) {
22326
22418
  await this.resetGeneratedDpopRequestKey(request);
22327
22419
  }
@@ -22590,7 +22682,12 @@
22590
22682
  const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
22591
22683
  ? undefined
22592
22684
  : this.config.auth.clientCapabilities;
22593
- const { scopes, claims, dpopNonce } = request;
22685
+ const { scopes, claims } = request;
22686
+ const dpopNonce = request.authenticationScheme ===
22687
+ AuthenticationScheme.DPOP &&
22688
+ request.resourceRequestUri
22689
+ ? this.browserStorage.getDpopNonce(request.resourceRequestUri, this.correlationId)
22690
+ : undefined;
22594
22691
  const scopeSet = new ScopeSet([...(scopes || []), ...OIDC_DEFAULT_SCOPES], this.correlationId);
22595
22692
  const mergedClaims = buildMergedClaims(claims, configClaims?.length ? configClaims : undefined);
22596
22693
  const hasAttributeTokens = !!request.attributeTokens?.length;
@@ -22900,11 +22997,14 @@
22900
22997
  return brokerProof;
22901
22998
  }
22902
22999
  const dpopProofGenerator = new DpopProofGenerator(this.browserCrypto, this.tokenBindingKeyManager);
23000
+ const currentNonce = request.resourceRequestUri
23001
+ ? this.browserStorage.getDpopNonce(request.resourceRequestUri, this.correlationId)
23002
+ : undefined;
22903
23003
  return dpopProofGenerator.generateResourceProof({
22904
23004
  htu: request.resourceRequestUri,
22905
23005
  htm: request.resourceRequestMethod,
22906
23006
  accessToken: response.access_token,
22907
- nonce: request.extraParametersNoCache?.pop_nonce,
23007
+ nonce: currentNonce ?? request.extraParametersNoCache?.pop_nonce,
22908
23008
  }, request.keyId, this.correlationId);
22909
23009
  }
22910
23010
  /**
@@ -23392,6 +23492,7 @@
23392
23492
  // Instrument clientdata telemetry fields from the authorize response
23393
23493
  instrumentClientData(response, request.correlationId, performanceClient);
23394
23494
  if (response.accountId) {
23495
+ validateAuthorizationResponse(response, request.state, request.correlationId);
23395
23496
  return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, response.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
23396
23497
  }
23397
23498
  const authCodeRequest = {
@@ -24249,7 +24350,6 @@
24249
24350
  * Copyright (c) Microsoft Corporation. All rights reserved.
24250
24351
  * Licensed under the MIT License.
24251
24352
  */
24252
- const PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED = "platform_auth_dom_dpop_not_supported";
24253
24353
  class PlatformAuthDOMHandler {
24254
24354
  constructor(logger, performanceClient, correlationId) {
24255
24355
  this.logger = logger;
@@ -24329,11 +24429,9 @@
24329
24429
  });
24330
24430
  this.logger.trace(`'${this.platformAuthType}' - Sending request to browser DOM API`, correlationId);
24331
24431
  try {
24332
- if (request.tokenType?.trim().toLowerCase() ===
24333
- PlatformAuthTokenType.DPOP_WITH_PROOF) {
24334
- throw createBrowserAuthError(PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED, correlationId);
24335
- }
24336
24432
  const platformDOMRequest = invoke(this.initializePlatformDOMRequest.bind(this), PlatformAuthDOMInitializeRequest, this.logger, this.performanceClient, correlationId)(request);
24433
+ request.bindingPreferenceSent =
24434
+ platformDOMRequest.preferBinding !== undefined;
24337
24435
  const response =
24338
24436
  // @ts-ignore
24339
24437
  await window.navigator.platformAuthentication.executeGetToken(platformDOMRequest);
@@ -24378,8 +24476,12 @@
24378
24476
  preferBinding: preferBinding,
24379
24477
  enclave: enclave,
24380
24478
  requestConfirmation: reqCnf,
24381
- extraParametersNoCache,
24479
+ extraParametersNoCache: extraParametersNoCache && {
24480
+ ...extraParametersNoCache,
24481
+ },
24382
24482
  };
24483
+ delete platformDOMRequest.extraParameters?.bindingPreferenceSent;
24484
+ delete platformDOMRequest.extraParametersNoCache?.bindingPreferenceSent;
24383
24485
  return platformDOMRequest;
24384
24486
  }
24385
24487
  validatePlatformBrokerResponse(response, correlationId) {
@@ -24396,7 +24498,8 @@
24396
24498
  requiredKeys.every((key) => Object.prototype.hasOwnProperty.call(response, key));
24397
24499
  if (response &&
24398
24500
  Object.prototype.hasOwnProperty.call(response, "isSuccess")) {
24399
- if (isValid) {
24501
+ if (isValid &&
24502
+ response.isSuccess === true) {
24400
24503
  this.logger.trace(`'${this.platformAuthType}' - platform broker returned successful and valid response`, correlationId);
24401
24504
  try {
24402
24505
  const validatedResponse = this.convertToPlatformBrokerResponse(response, correlationId);
@@ -24449,7 +24552,6 @@
24449
24552
  convertToPlatformBrokerResponse(response, correlationId) {
24450
24553
  this.logger.trace(`'${this.platformAuthType}' - convertToNativeResponse called`, correlationId);
24451
24554
  const responseProperties = response.properties || {};
24452
- const bindingAttested = this.parseDOMBoolean(responseProperties.binding_attested, "binding_attested", correlationId);
24453
24555
  const nativeResponse = {
24454
24556
  access_token: response.accessToken,
24455
24557
  id_token: response.idToken,
@@ -24461,21 +24563,9 @@
24461
24563
  properties: responseProperties,
24462
24564
  extendedLifetimeToken: response.extendedLifetimeToken ?? false,
24463
24565
  shr: response.proofOfPossessionPayload,
24464
- token_type: responseProperties.token_type,
24465
- DPoP: responseProperties.dpop_proof,
24466
- binding_attested: bindingAttested,
24467
24566
  };
24468
24567
  return nativeResponse;
24469
24568
  }
24470
- parseDOMBoolean(value, propertyName, correlationId) {
24471
- if (value === undefined) {
24472
- return undefined;
24473
- }
24474
- if (value === "true" || value === "false") {
24475
- return value === "true";
24476
- }
24477
- throw createAuthError(unexpectedError, correlationId, `Platform broker returned invalid ${propertyName} value.`);
24478
- }
24479
24569
  getDOMExtraParams(extraParameters, correlationId) {
24480
24570
  try {
24481
24571
  const stringifiedProperties = {};
@@ -24571,8 +24661,7 @@
24571
24661
  const schemeSupported = !authenticationScheme ||
24572
24662
  authenticationScheme === AuthenticationScheme.BEARER ||
24573
24663
  authenticationScheme === AuthenticationScheme.POP ||
24574
- (authenticationScheme === AuthenticationScheme.DPOP &&
24575
- !(platformAuthProvider instanceof PlatformAuthDOMHandler));
24664
+ authenticationScheme === AuthenticationScheme.DPOP;
24576
24665
  const fields = {
24577
24666
  allowPlatformBroker: config.system.allowPlatformBroker,
24578
24667
  ...(config.system.allowPlatformBroker && {
@@ -26143,7 +26232,10 @@
26143
26232
  account,
26144
26233
  });
26145
26234
  return {
26146
- key: `platform:${getPlatformSilentRequestKey(platformRequest, config)}`,
26235
+ key: platformRequest.authenticationScheme ===
26236
+ AuthenticationScheme.DPOP
26237
+ ? undefined
26238
+ : `platform:${getPlatformSilentRequestKey(platformRequest, config)}`,
26147
26239
  request: platformRequest,
26148
26240
  account: platformRequest.account,
26149
26241
  };
@@ -26175,7 +26267,6 @@
26175
26267
  loginHint: request.loginHint,
26176
26268
  popKid: request.popKid,
26177
26269
  shrNonce: request.shrNonce,
26178
- dpopNonce: request.dpopNonce,
26179
26270
  skipBrokerClaims: request.embeddedClientId
26180
26271
  ? !!request.skipBrokerClaims
26181
26272
  : undefined,
@@ -27424,6 +27515,16 @@
27424
27515
  getLogger() {
27425
27516
  return this.logger;
27426
27517
  }
27518
+ /**
27519
+ * Stores a resource-server DPoP nonce for the matching HTTPS origin.
27520
+ */
27521
+ async loadDpopNonce(resourceRequestUri, dpopNonce) {
27522
+ blockNonBrowserEnvironment();
27523
+ const correlationId = createNewGuid();
27524
+ return invokeAsync(async () => {
27525
+ this.browserStorage.setDpopNonce(resourceRequestUri, dpopNonce, correlationId);
27526
+ }, StandardControllerLoadDpopNonce, this.logger, this.performanceClient, correlationId)();
27527
+ }
27427
27528
  /**
27428
27529
  * Replaces the default logger set in configurations with new Logger with new configurations
27429
27530
  * @param logger Logger instance
@@ -27578,32 +27679,55 @@
27578
27679
  correlationId,
27579
27680
  config: this.config,
27580
27681
  }, this.platformAuthProvider, this.logger, this.performanceClient);
27581
- const shouldDeduplicate = preparedRequest.request.authenticationScheme !==
27582
- AuthenticationScheme.DPOP;
27682
+ const requestKey = preparedRequest.key;
27683
+ const shouldDeduplicate = requestKey !== undefined;
27583
27684
  const inProgressRequest = shouldDeduplicate
27584
- ? this.activeSilentTokenRequests.get(preparedRequest.key)
27685
+ ? this.activeSilentTokenRequests.get(requestKey)
27585
27686
  : undefined;
27586
27687
  if (typeof inProgressRequest === "undefined") {
27587
27688
  this.logger.verbose(shouldDeduplicate
27588
27689
  ? "acquireTokenSilent called for the first time, storing active request"
27589
- : "acquireTokenSilent called for DPoP request, starting an independent operation", correlationId);
27690
+ : "acquireTokenSilent called for platform DPoP request, starting an independent operation", correlationId);
27590
27691
  this.performanceClient.addFields({ deduped: false }, correlationId);
27591
27692
  const activeRequest = invokeAsync(this.acquireTokenSilentAsync.bind(this), AcquireTokenSilentAsync, this.logger, this.performanceClient, correlationId)({
27592
27693
  ...preparedRequest.request,
27593
27694
  correlationId,
27594
27695
  }, preparedRequest.account);
27595
- if (!shouldDeduplicate) {
27696
+ if (requestKey === undefined) {
27596
27697
  return activeRequest;
27597
27698
  }
27598
- this.activeSilentTokenRequests.set(preparedRequest.key, activeRequest);
27699
+ this.activeSilentTokenRequests.set(requestKey, activeRequest);
27599
27700
  return activeRequest.finally(() => {
27600
- this.activeSilentTokenRequests.delete(preparedRequest.key);
27701
+ this.activeSilentTokenRequests.delete(requestKey);
27601
27702
  });
27602
27703
  }
27603
27704
  else {
27604
27705
  this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call", correlationId);
27605
27706
  this.performanceClient.addFields({ deduped: true }, correlationId);
27606
- return inProgressRequest;
27707
+ const joiningRequest = {
27708
+ ...preparedRequest.request,
27709
+ correlationId,
27710
+ };
27711
+ const result = await inProgressRequest;
27712
+ if (joiningRequest.authenticationScheme !==
27713
+ AuthenticationScheme.DPOP) {
27714
+ return result;
27715
+ }
27716
+ if (result.fromPlatformBroker &&
27717
+ !ResponseHandler.hasDpopKeyId(result)) {
27718
+ return invokeAsync(this.acquireTokenSilentAsync.bind(this), AcquireTokenSilentAsync, this.logger, this.performanceClient, correlationId)(joiningRequest, result.account || preparedRequest.account);
27719
+ }
27720
+ const dpopProof = await ResponseHandler.generateDpopResourceProof(this.browserCrypto, result, {
27721
+ ...joiningRequest,
27722
+ authority: joiningRequest.authority || this.config.auth.authority,
27723
+ }, this.performanceClient, {
27724
+ tokenBindingKeyManager: this.tokenBindingKeyManager,
27725
+ dpopNonceProvider: this.browserStorage,
27726
+ });
27727
+ return {
27728
+ ...result,
27729
+ dpopProof,
27730
+ };
27607
27731
  }
27608
27732
  }
27609
27733
  /**
@@ -28226,6 +28350,7 @@
28226
28350
  }
28227
28351
  async signUpV2(inputs) {
28228
28352
  const correlationId = this.getCorrelationId(inputs);
28353
+ let scenario = CustomAuthFlowScenarioV2.SignUp;
28229
28354
  try {
28230
28355
  ensureArgumentIsNotNullOrUndefined("inputs", inputs, correlationId);
28231
28356
  this.ensureUsernameIsValidV2(inputs.username, correlationId);
@@ -28237,13 +28362,19 @@
28237
28362
  }
28238
28363
  this.ensureUserNotSignedIn(correlationId);
28239
28364
  this.logger.verbose("Starting native auth V2 sign-up.", correlationId);
28240
- const result = await this.flowClientV2.signUp({
28365
+ const startResult = await this.flowClientV2.signUp({
28241
28366
  correlationId,
28242
28367
  username: inputs.username,
28243
28368
  scopes: inputs.scopes,
28244
28369
  claims: inputs.claims,
28245
28370
  attributes: inputs.attributes,
28246
28371
  });
28372
+ if (startResult.type === FLOW_EXISTING_ACCOUNT_START_V2) {
28373
+ scenario = startResult.continuationState.scenario;
28374
+ }
28375
+ const result = startResult.type === FLOW_EXISTING_ACCOUNT_START_V2
28376
+ ? await this.flowClientV2.challengeExistingAccount(startResult)
28377
+ : startResult;
28247
28378
  if (result.type === FLOW_CODE_REQUIRED_V2) {
28248
28379
  return new CustomAuthResultV2(new CodeRequiredStateV2({
28249
28380
  correlationId: result.correlationId,
@@ -28302,7 +28433,7 @@
28302
28433
  catch (error) {
28303
28434
  this.logger.errorPii(`An error occurred during native auth V2 sign-up: '${error}'`, correlationId);
28304
28435
  return CustomAuthResultV2.createWithError(error, {
28305
- scenario: CustomAuthFlowScenarioV2.SignUp,
28436
+ scenario,
28306
28437
  correlationId,
28307
28438
  });
28308
28439
  }
@@ -29141,6 +29272,12 @@
29141
29272
  getActiveAccount() {
29142
29273
  return this.controller.getActiveAccount();
29143
29274
  }
29275
+ /**
29276
+ * Stores an opaque resource-server DPoP nonce for the matching HTTPS origin.
29277
+ */
29278
+ loadDpopNonce(resourceRequestUri, dpopNonce) {
29279
+ return this.controller.loadDpopNonce(resourceRequestUri, dpopNonce);
29280
+ }
29144
29281
  /**
29145
29282
  * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
29146
29283
  * @param sku
@@ -29284,7 +29421,6 @@
29284
29421
  }
29285
29422
  /**
29286
29423
  * Starts native auth V2 sign-in.
29287
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
29288
29424
  * @param inputs - Inputs for the sign-in V2 flow.
29289
29425
  * @returns A promise that resolves to the sign-in start result.
29290
29426
  */
@@ -29293,7 +29429,6 @@
29293
29429
  }
29294
29430
  /**
29295
29431
  * Starts native auth V2 sign-up.
29296
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
29297
29432
  * @param inputs - Inputs for the sign-up V2 flow.
29298
29433
  * @returns A promise that resolves to the sign-up start result.
29299
29434
  */
@@ -29302,7 +29437,6 @@
29302
29437
  }
29303
29438
  /**
29304
29439
  * Starts native auth V2 self-service password reset.
29305
- * @warning This API is experimental. It may be changed in the future without notice. Do not use in production applications.
29306
29440
  * @param {ResetPasswordInputsV2} inputs - Inputs for the reset-password V2 flow
29307
29441
  * @returns {Promise<ResetPasswordStartResultV2>} - A promise that resolves to ResetPasswordStartResultV2
29308
29442
  */