@azure/msal-browser 3.22.1 → 3.24.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 (519) hide show
  1. package/dist/app/IPublicClientApplication.d.ts +16 -16
  2. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  3. package/dist/app/IPublicClientApplication.mjs +1 -1
  4. package/dist/app/PublicClientApplication.d.ts +18 -18
  5. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  6. package/dist/app/PublicClientApplication.mjs +1 -1
  7. package/dist/app/PublicClientApplication.mjs.map +1 -1
  8. package/dist/app/PublicClientNext.d.ts +16 -16
  9. package/dist/app/PublicClientNext.d.ts.map +1 -1
  10. package/dist/app/PublicClientNext.mjs +1 -1
  11. package/dist/app/PublicClientNext.mjs.map +1 -1
  12. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +3 -3
  13. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
  14. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +2 -2
  15. package/dist/broker/nativeBroker/NativeRequest.d.ts +2 -2
  16. package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -1
  17. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  18. package/dist/cache/AccountManager.d.ts +2 -2
  19. package/dist/cache/AccountManager.d.ts.map +1 -1
  20. package/dist/cache/AccountManager.mjs +1 -1
  21. package/dist/cache/AsyncMemoryStorage.d.ts +2 -2
  22. package/dist/cache/AsyncMemoryStorage.d.ts.map +1 -1
  23. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  24. package/dist/cache/BrowserCacheManager.d.ts +11 -11
  25. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  26. package/dist/cache/BrowserCacheManager.mjs +2 -2
  27. package/dist/cache/BrowserStorage.d.ts +1 -1
  28. package/dist/cache/BrowserStorage.d.ts.map +1 -1
  29. package/dist/cache/BrowserStorage.mjs +1 -1
  30. package/dist/cache/DatabaseStorage.d.ts +1 -1
  31. package/dist/cache/DatabaseStorage.d.ts.map +1 -1
  32. package/dist/cache/DatabaseStorage.mjs +1 -1
  33. package/dist/cache/DatabaseStorage.mjs.map +1 -1
  34. package/dist/cache/ITokenCache.d.ts +4 -4
  35. package/dist/cache/ITokenCache.d.ts.map +1 -1
  36. package/dist/cache/MemoryStorage.d.ts +1 -1
  37. package/dist/cache/MemoryStorage.d.ts.map +1 -1
  38. package/dist/cache/MemoryStorage.mjs +1 -1
  39. package/dist/cache/TokenCache.d.ts +6 -6
  40. package/dist/cache/TokenCache.d.ts.map +1 -1
  41. package/dist/cache/TokenCache.mjs +2 -2
  42. package/dist/config/Configuration.d.ts +7 -3
  43. package/dist/config/Configuration.d.ts.map +1 -1
  44. package/dist/config/Configuration.mjs +3 -2
  45. package/dist/config/Configuration.mjs.map +1 -1
  46. package/dist/controllers/ControllerFactory.d.ts +3 -3
  47. package/dist/controllers/ControllerFactory.d.ts.map +1 -1
  48. package/dist/controllers/ControllerFactory.mjs +1 -1
  49. package/dist/controllers/IController.d.ts +17 -17
  50. package/dist/controllers/IController.d.ts.map +1 -1
  51. package/dist/controllers/NestedAppAuthController.d.ts +21 -21
  52. package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
  53. package/dist/controllers/NestedAppAuthController.mjs +2 -2
  54. package/dist/controllers/StandardController.d.ts +28 -28
  55. package/dist/controllers/StandardController.d.ts.map +1 -1
  56. package/dist/controllers/StandardController.mjs +2 -2
  57. package/dist/controllers/UnknownOperatingContextController.d.ts +19 -19
  58. package/dist/controllers/UnknownOperatingContextController.d.ts.map +1 -1
  59. package/dist/controllers/UnknownOperatingContextController.mjs +2 -2
  60. package/dist/crypto/BrowserCrypto.d.ts +1 -1
  61. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  62. package/dist/crypto/BrowserCrypto.mjs +2 -2
  63. package/dist/crypto/CryptoOps.d.ts +1 -1
  64. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  65. package/dist/crypto/CryptoOps.mjs +2 -2
  66. package/dist/crypto/CryptoOps.mjs.map +1 -1
  67. package/dist/crypto/PkceGenerator.d.ts +1 -1
  68. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  69. package/dist/crypto/PkceGenerator.mjs +2 -2
  70. package/dist/crypto/SignedHttpRequest.d.ts +1 -1
  71. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  72. package/dist/crypto/SignedHttpRequest.mjs +2 -2
  73. package/dist/encode/Base64Decode.mjs +1 -1
  74. package/dist/encode/Base64Encode.mjs +1 -1
  75. package/dist/error/BrowserAuthError.d.ts +2 -2
  76. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  77. package/dist/error/BrowserAuthError.mjs +2 -2
  78. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  79. package/dist/error/BrowserConfigurationAuthError.d.ts +2 -2
  80. package/dist/error/BrowserConfigurationAuthError.d.ts.map +1 -1
  81. package/dist/error/BrowserConfigurationAuthError.mjs +2 -2
  82. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  83. package/dist/error/NativeAuthError.d.ts +2 -2
  84. package/dist/error/NativeAuthError.d.ts.map +1 -1
  85. package/dist/error/NativeAuthError.mjs +2 -2
  86. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  87. package/dist/error/NestedAppAuthError.d.ts +1 -1
  88. package/dist/error/NestedAppAuthError.d.ts.map +1 -1
  89. package/dist/error/NestedAppAuthError.mjs +2 -2
  90. package/dist/event/EventHandler.d.ts +4 -4
  91. package/dist/event/EventHandler.d.ts.map +1 -1
  92. package/dist/event/EventHandler.mjs +2 -2
  93. package/dist/event/EventMessage.d.ts +9 -4
  94. package/dist/event/EventMessage.d.ts.map +1 -1
  95. package/dist/event/EventMessage.mjs +1 -1
  96. package/dist/event/EventMessage.mjs.map +1 -1
  97. package/dist/event/EventType.mjs +1 -1
  98. package/dist/index.d.ts +35 -35
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.mjs +2 -2
  101. package/dist/interaction_client/BaseInteractionClient.d.ts +24 -16
  102. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  103. package/dist/interaction_client/BaseInteractionClient.mjs +23 -10
  104. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  105. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +1 -1
  106. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -1
  107. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +2 -2
  108. package/dist/interaction_client/NativeInteractionClient.d.ts +16 -16
  109. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  110. package/dist/interaction_client/NativeInteractionClient.mjs +12 -6
  111. package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
  112. package/dist/interaction_client/PopupClient.d.ts +17 -16
  113. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  114. package/dist/interaction_client/PopupClient.mjs +59 -56
  115. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  116. package/dist/interaction_client/RedirectClient.d.ts +10 -10
  117. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  118. package/dist/interaction_client/RedirectClient.mjs +16 -6
  119. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  120. package/dist/interaction_client/SilentAuthCodeClient.d.ts +10 -10
  121. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  122. package/dist/interaction_client/SilentAuthCodeClient.mjs +9 -3
  123. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  124. package/dist/interaction_client/SilentCacheClient.d.ts +4 -4
  125. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  126. package/dist/interaction_client/SilentCacheClient.mjs +8 -3
  127. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  128. package/dist/interaction_client/SilentIframeClient.d.ts +11 -11
  129. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  130. package/dist/interaction_client/SilentIframeClient.mjs +9 -3
  131. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  132. package/dist/interaction_client/SilentRefreshClient.d.ts +17 -6
  133. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  134. package/dist/interaction_client/SilentRefreshClient.mjs +23 -7
  135. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  136. package/dist/interaction_client/StandardInteractionClient.d.ts +36 -15
  137. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  138. package/dist/interaction_client/StandardInteractionClient.mjs +26 -11
  139. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  140. package/dist/interaction_handler/InteractionHandler.d.ts +4 -4
  141. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  142. package/dist/interaction_handler/InteractionHandler.mjs +2 -2
  143. package/dist/interaction_handler/RedirectHandler.d.ts +4 -4
  144. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  145. package/dist/interaction_handler/RedirectHandler.mjs +2 -2
  146. package/dist/interaction_handler/SilentHandler.d.ts +1 -1
  147. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  148. package/dist/interaction_handler/SilentHandler.mjs +2 -2
  149. package/dist/naa/AuthResult.d.ts +2 -2
  150. package/dist/naa/AuthResult.d.ts.map +1 -1
  151. package/dist/naa/BridgeError.d.ts +1 -1
  152. package/dist/naa/BridgeError.d.ts.map +1 -1
  153. package/dist/naa/BridgeError.mjs +1 -1
  154. package/dist/naa/BridgeProxy.d.ts +9 -8
  155. package/dist/naa/BridgeProxy.d.ts.map +1 -1
  156. package/dist/naa/BridgeProxy.mjs +16 -14
  157. package/dist/naa/BridgeProxy.mjs.map +1 -1
  158. package/dist/naa/BridgeRequest.d.ts +1 -1
  159. package/dist/naa/BridgeRequest.d.ts.map +1 -1
  160. package/dist/naa/BridgeRequestEnvelope.d.ts +1 -1
  161. package/dist/naa/BridgeRequestEnvelope.d.ts.map +1 -1
  162. package/dist/naa/BridgeResponseEnvelope.d.ts +4 -4
  163. package/dist/naa/BridgeResponseEnvelope.d.ts.map +1 -1
  164. package/dist/naa/BridgeStatusCode.mjs +1 -1
  165. package/dist/naa/IBridgeProxy.d.ts +4 -4
  166. package/dist/naa/IBridgeProxy.d.ts.map +1 -1
  167. package/dist/naa/InitContext.d.ts +2 -2
  168. package/dist/naa/InitContext.d.ts.map +1 -1
  169. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts +9 -9
  170. package/dist/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
  171. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +2 -2
  172. package/dist/navigation/INavigationClient.d.ts +1 -1
  173. package/dist/navigation/INavigationClient.d.ts.map +1 -1
  174. package/dist/navigation/NavigationClient.d.ts +2 -2
  175. package/dist/navigation/NavigationClient.d.ts.map +1 -1
  176. package/dist/navigation/NavigationClient.mjs +1 -1
  177. package/dist/navigation/NavigationOptions.d.ts +1 -1
  178. package/dist/navigation/NavigationOptions.d.ts.map +1 -1
  179. package/dist/network/FetchClient.d.ts +1 -1
  180. package/dist/network/FetchClient.d.ts.map +1 -1
  181. package/dist/network/FetchClient.mjs +2 -2
  182. package/dist/operatingcontext/BaseOperatingContext.d.ts +2 -2
  183. package/dist/operatingcontext/BaseOperatingContext.d.ts.map +1 -1
  184. package/dist/operatingcontext/BaseOperatingContext.mjs +2 -2
  185. package/dist/operatingcontext/NestedAppOperatingContext.d.ts +8 -3
  186. package/dist/operatingcontext/NestedAppOperatingContext.d.ts.map +1 -1
  187. package/dist/operatingcontext/NestedAppOperatingContext.mjs +4 -5
  188. package/dist/operatingcontext/NestedAppOperatingContext.mjs.map +1 -1
  189. package/dist/operatingcontext/StandardOperatingContext.d.ts +1 -1
  190. package/dist/operatingcontext/StandardOperatingContext.d.ts.map +1 -1
  191. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  192. package/dist/operatingcontext/UnknownOperatingContext.d.ts +1 -1
  193. package/dist/operatingcontext/UnknownOperatingContext.d.ts.map +1 -1
  194. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  195. package/dist/packageMetadata.d.ts +1 -1
  196. package/dist/packageMetadata.mjs +2 -2
  197. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  198. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  199. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  200. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  201. package/dist/request/ClearCacheRequest.d.ts +1 -1
  202. package/dist/request/ClearCacheRequest.d.ts.map +1 -1
  203. package/dist/request/EndSessionPopupRequest.d.ts +4 -2
  204. package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
  205. package/dist/request/EndSessionRequest.d.ts +1 -1
  206. package/dist/request/EndSessionRequest.d.ts.map +1 -1
  207. package/dist/request/PopupRequest.d.ts +4 -2
  208. package/dist/request/PopupRequest.d.ts.map +1 -1
  209. package/dist/request/RedirectRequest.d.ts +1 -1
  210. package/dist/request/RedirectRequest.d.ts.map +1 -1
  211. package/dist/request/RequestHelpers.d.ts +3 -3
  212. package/dist/request/RequestHelpers.d.ts.map +1 -1
  213. package/dist/request/RequestHelpers.mjs +2 -2
  214. package/dist/request/SilentRequest.d.ts +2 -2
  215. package/dist/request/SilentRequest.d.ts.map +1 -1
  216. package/dist/request/SsoSilentRequest.d.ts +1 -1
  217. package/dist/request/SsoSilentRequest.d.ts.map +1 -1
  218. package/dist/response/AuthenticationResult.d.ts +1 -1
  219. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  220. package/dist/response/ResponseHandler.d.ts +2 -2
  221. package/dist/response/ResponseHandler.d.ts.map +1 -1
  222. package/dist/response/ResponseHandler.mjs +2 -2
  223. package/dist/telemetry/BrowserPerformanceClient.d.ts +2 -2
  224. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  225. package/dist/telemetry/BrowserPerformanceClient.mjs +2 -2
  226. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  227. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +1 -1
  228. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -1
  229. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  230. package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
  231. package/dist/utils/BrowserConstants.d.ts +2 -2
  232. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  233. package/dist/utils/BrowserConstants.mjs +2 -2
  234. package/dist/utils/BrowserProtocolUtils.d.ts +2 -2
  235. package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
  236. package/dist/utils/BrowserProtocolUtils.mjs +2 -2
  237. package/dist/utils/BrowserUtils.d.ts +2 -2
  238. package/dist/utils/BrowserUtils.d.ts.map +1 -1
  239. package/dist/utils/BrowserUtils.mjs +3 -3
  240. package/lib/msal-browser.cjs +5045 -4956
  241. package/lib/msal-browser.cjs.map +1 -1
  242. package/lib/msal-browser.js +5045 -4956
  243. package/lib/msal-browser.js.map +1 -1
  244. package/lib/msal-browser.min.js +66 -68
  245. package/lib/package.json +1 -0
  246. package/lib/types/app/IPublicClientApplication.d.ts +54 -0
  247. package/lib/types/app/IPublicClientApplication.d.ts.map +1 -0
  248. package/lib/types/app/PublicClientApplication.d.ts +294 -0
  249. package/lib/types/app/PublicClientApplication.d.ts.map +1 -0
  250. package/lib/types/app/PublicClientNext.d.ts +277 -0
  251. package/lib/types/app/PublicClientNext.d.ts.map +1 -0
  252. package/lib/types/broker/nativeBroker/NativeMessageHandler.d.ts +63 -0
  253. package/lib/types/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -0
  254. package/lib/types/broker/nativeBroker/NativeRequest.d.ts +46 -0
  255. package/lib/types/broker/nativeBroker/NativeRequest.d.ts.map +1 -0
  256. package/lib/types/broker/nativeBroker/NativeResponse.d.ts +49 -0
  257. package/lib/types/broker/nativeBroker/NativeResponse.d.ts.map +1 -0
  258. package/lib/types/broker/nativeBroker/NativeStatusCodes.d.ts +8 -0
  259. package/lib/types/broker/nativeBroker/NativeStatusCodes.d.ts.map +1 -0
  260. package/lib/types/cache/AccountManager.d.ts +49 -0
  261. package/lib/types/cache/AccountManager.d.ts.map +1 -0
  262. package/lib/types/cache/AsyncMemoryStorage.d.ts +51 -0
  263. package/lib/types/cache/AsyncMemoryStorage.d.ts.map +1 -0
  264. package/lib/types/cache/BrowserCacheManager.d.ts +386 -0
  265. package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -0
  266. package/lib/types/cache/BrowserStorage.d.ts +12 -0
  267. package/lib/types/cache/BrowserStorage.d.ts.map +1 -0
  268. package/lib/types/cache/DatabaseStorage.d.ts +57 -0
  269. package/lib/types/cache/DatabaseStorage.d.ts.map +1 -0
  270. package/lib/types/cache/IAsyncStorage.d.ts +28 -0
  271. package/lib/types/cache/IAsyncStorage.d.ts.map +1 -0
  272. package/lib/types/cache/ITokenCache.d.ts +12 -0
  273. package/lib/types/cache/ITokenCache.d.ts.map +1 -0
  274. package/lib/types/cache/IWindowStorage.d.ts +28 -0
  275. package/lib/types/cache/IWindowStorage.d.ts.map +1 -0
  276. package/lib/types/cache/MemoryStorage.d.ts +12 -0
  277. package/lib/types/cache/MemoryStorage.d.ts.map +1 -0
  278. package/lib/types/cache/TokenCache.d.ts +78 -0
  279. package/lib/types/cache/TokenCache.d.ts.map +1 -0
  280. package/lib/types/config/Configuration.d.ts +218 -0
  281. package/lib/types/config/Configuration.d.ts.map +1 -0
  282. package/lib/types/controllers/ControllerFactory.d.ts +6 -0
  283. package/lib/types/controllers/ControllerFactory.d.ts.map +1 -0
  284. package/lib/types/controllers/IController.d.ts +61 -0
  285. package/lib/types/controllers/IController.d.ts.map +1 -0
  286. package/lib/types/controllers/NestedAppAuthController.d.ts +203 -0
  287. package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -0
  288. package/lib/types/controllers/StandardController.d.ts +406 -0
  289. package/lib/types/controllers/StandardController.d.ts.map +1 -0
  290. package/lib/types/controllers/UnknownOperatingContextController.d.ts +87 -0
  291. package/lib/types/controllers/UnknownOperatingContextController.d.ts.map +1 -0
  292. package/lib/types/crypto/BrowserCrypto.d.ts +53 -0
  293. package/lib/types/crypto/BrowserCrypto.d.ts.map +1 -0
  294. package/lib/types/crypto/CryptoOps.d.ts +75 -0
  295. package/lib/types/crypto/CryptoOps.d.ts.map +1 -0
  296. package/lib/types/crypto/PkceGenerator.d.ts +9 -0
  297. package/lib/types/crypto/PkceGenerator.d.ts.map +1 -0
  298. package/lib/types/crypto/SignedHttpRequest.d.ts +31 -0
  299. package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
  300. package/lib/types/encode/Base64Decode.d.ts +10 -0
  301. package/lib/types/encode/Base64Decode.d.ts.map +1 -0
  302. package/lib/types/encode/Base64Encode.d.ts +20 -0
  303. package/lib/types/encode/Base64Encode.d.ts.map +1 -0
  304. package/lib/types/error/BrowserAuthError.d.ts +256 -0
  305. package/lib/types/error/BrowserAuthError.d.ts.map +1 -0
  306. package/lib/types/error/BrowserAuthErrorCodes.d.ts +47 -0
  307. package/lib/types/error/BrowserAuthErrorCodes.d.ts.map +1 -0
  308. package/lib/types/error/BrowserConfigurationAuthError.d.ts +34 -0
  309. package/lib/types/error/BrowserConfigurationAuthError.d.ts.map +1 -0
  310. package/lib/types/error/BrowserConfigurationAuthErrorCodes.d.ts +4 -0
  311. package/lib/types/error/BrowserConfigurationAuthErrorCodes.d.ts.map +1 -0
  312. package/lib/types/error/NativeAuthError.d.ts +30 -0
  313. package/lib/types/error/NativeAuthError.d.ts.map +1 -0
  314. package/lib/types/error/NativeAuthErrorCodes.d.ts +3 -0
  315. package/lib/types/error/NativeAuthErrorCodes.d.ts.map +1 -0
  316. package/lib/types/error/NestedAppAuthError.d.ts +15 -0
  317. package/lib/types/error/NestedAppAuthError.d.ts.map +1 -0
  318. package/lib/types/event/EventHandler.d.ts +42 -0
  319. package/lib/types/event/EventHandler.d.ts.map +1 -0
  320. package/lib/types/event/EventMessage.d.ts +31 -0
  321. package/lib/types/event/EventMessage.d.ts.map +1 -0
  322. package/lib/types/event/EventType.d.ts +30 -0
  323. package/lib/types/event/EventType.d.ts.map +1 -0
  324. package/lib/types/index.d.ts +41 -0
  325. package/lib/types/index.d.ts.map +1 -0
  326. package/lib/types/interaction_client/BaseInteractionClient.d.ts +59 -0
  327. package/lib/types/interaction_client/BaseInteractionClient.d.ts.map +1 -0
  328. package/lib/types/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +5 -0
  329. package/lib/types/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -0
  330. package/lib/types/interaction_client/NativeInteractionClient.d.ts +152 -0
  331. package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -0
  332. package/lib/types/interaction_client/PopupClient.d.ts +107 -0
  333. package/lib/types/interaction_client/PopupClient.d.ts.map +1 -0
  334. package/lib/types/interaction_client/RedirectClient.d.ts +51 -0
  335. package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -0
  336. package/lib/types/interaction_client/SilentAuthCodeClient.d.ts +24 -0
  337. package/lib/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -0
  338. package/lib/types/interaction_client/SilentCacheClient.d.ts +17 -0
  339. package/lib/types/interaction_client/SilentCacheClient.d.ts.map +1 -0
  340. package/lib/types/interaction_client/SilentIframeClient.d.ts +33 -0
  341. package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -0
  342. package/lib/types/interaction_client/SilentRefreshClient.d.ts +32 -0
  343. package/lib/types/interaction_client/SilentRefreshClient.d.ts.map +1 -0
  344. package/lib/types/interaction_client/StandardInteractionClient.d.ts +70 -0
  345. package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -0
  346. package/lib/types/interaction_handler/InteractionHandler.d.ts +34 -0
  347. package/lib/types/interaction_handler/InteractionHandler.d.ts.map +1 -0
  348. package/lib/types/interaction_handler/RedirectHandler.d.ts +33 -0
  349. package/lib/types/interaction_handler/RedirectHandler.d.ts.map +1 -0
  350. package/lib/types/interaction_handler/SilentHandler.d.ts +14 -0
  351. package/lib/types/interaction_handler/SilentHandler.d.ts.map +1 -0
  352. package/lib/types/naa/AccountInfo.d.ts +12 -0
  353. package/lib/types/naa/AccountInfo.d.ts.map +1 -0
  354. package/lib/types/naa/AuthBridge.d.ts +9 -0
  355. package/lib/types/naa/AuthBridge.d.ts.map +1 -0
  356. package/lib/types/naa/AuthResult.d.ts +7 -0
  357. package/lib/types/naa/AuthResult.d.ts.map +1 -0
  358. package/lib/types/naa/BridgeAccountContext.d.ts +13 -0
  359. package/lib/types/naa/BridgeAccountContext.d.ts.map +1 -0
  360. package/lib/types/naa/BridgeCapabilities.d.ts +4 -0
  361. package/lib/types/naa/BridgeCapabilities.d.ts.map +1 -0
  362. package/lib/types/naa/BridgeError.d.ts +10 -0
  363. package/lib/types/naa/BridgeError.d.ts.map +1 -0
  364. package/lib/types/naa/BridgeProxy.d.ts +69 -0
  365. package/lib/types/naa/BridgeProxy.d.ts.map +1 -0
  366. package/lib/types/naa/BridgeRequest.d.ts +8 -0
  367. package/lib/types/naa/BridgeRequest.d.ts.map +1 -0
  368. package/lib/types/naa/BridgeRequestEnvelope.d.ts +13 -0
  369. package/lib/types/naa/BridgeRequestEnvelope.d.ts.map +1 -0
  370. package/lib/types/naa/BridgeResponseEnvelope.d.ts +14 -0
  371. package/lib/types/naa/BridgeResponseEnvelope.d.ts.map +1 -0
  372. package/lib/types/naa/BridgeStatusCode.d.ts +12 -0
  373. package/lib/types/naa/BridgeStatusCode.d.ts.map +1 -0
  374. package/lib/types/naa/IBridgeProxy.d.ts +11 -0
  375. package/lib/types/naa/IBridgeProxy.d.ts.map +1 -0
  376. package/lib/types/naa/InitContext.d.ts +9 -0
  377. package/lib/types/naa/InitContext.d.ts.map +1 -0
  378. package/lib/types/naa/TokenRequest.d.ts +19 -0
  379. package/lib/types/naa/TokenRequest.d.ts.map +1 -0
  380. package/lib/types/naa/TokenResponse.d.ts +14 -0
  381. package/lib/types/naa/TokenResponse.d.ts.map +1 -0
  382. package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts +36 -0
  383. package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -0
  384. package/lib/types/navigation/INavigationClient.d.ts +17 -0
  385. package/lib/types/navigation/INavigationClient.d.ts.map +1 -0
  386. package/lib/types/navigation/NavigationClient.d.ts +23 -0
  387. package/lib/types/navigation/NavigationClient.d.ts.map +1 -0
  388. package/lib/types/navigation/NavigationOptions.d.ts +13 -0
  389. package/lib/types/navigation/NavigationOptions.d.ts.map +1 -0
  390. package/lib/types/network/FetchClient.d.ts +27 -0
  391. package/lib/types/network/FetchClient.d.ts.map +1 -0
  392. package/lib/types/operatingcontext/BaseOperatingContext.d.ts +42 -0
  393. package/lib/types/operatingcontext/BaseOperatingContext.d.ts.map +1 -0
  394. package/lib/types/operatingcontext/NestedAppOperatingContext.d.ts +40 -0
  395. package/lib/types/operatingcontext/NestedAppOperatingContext.d.ts.map +1 -0
  396. package/lib/types/operatingcontext/StandardOperatingContext.d.ts +26 -0
  397. package/lib/types/operatingcontext/StandardOperatingContext.d.ts.map +1 -0
  398. package/lib/types/operatingcontext/UnknownOperatingContext.d.ts +26 -0
  399. package/lib/types/operatingcontext/UnknownOperatingContext.d.ts.map +1 -0
  400. package/lib/types/packageMetadata.d.ts +3 -0
  401. package/lib/types/packageMetadata.d.ts.map +1 -0
  402. package/lib/types/request/AuthorizationCodeRequest.d.ts +9 -0
  403. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -0
  404. package/lib/types/request/AuthorizationUrlRequest.d.ts +9 -0
  405. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -0
  406. package/lib/types/request/ClearCacheRequest.d.ts +11 -0
  407. package/lib/types/request/ClearCacheRequest.d.ts.map +1 -0
  408. package/lib/types/request/EndSessionPopupRequest.d.ts +21 -0
  409. package/lib/types/request/EndSessionPopupRequest.d.ts.map +1 -0
  410. package/lib/types/request/EndSessionRequest.d.ts +16 -0
  411. package/lib/types/request/EndSessionRequest.d.ts.map +1 -0
  412. package/lib/types/request/InitializeApplicationRequest.d.ts +9 -0
  413. package/lib/types/request/InitializeApplicationRequest.d.ts.map +1 -0
  414. package/lib/types/request/PopupRequest.d.ts +37 -0
  415. package/lib/types/request/PopupRequest.d.ts.map +1 -0
  416. package/lib/types/request/PopupWindowAttributes.d.ts +16 -0
  417. package/lib/types/request/PopupWindowAttributes.d.ts.map +1 -0
  418. package/lib/types/request/RedirectRequest.d.ts +41 -0
  419. package/lib/types/request/RedirectRequest.d.ts.map +1 -0
  420. package/lib/types/request/RequestHelpers.d.ts +14 -0
  421. package/lib/types/request/RequestHelpers.d.ts.map +1 -0
  422. package/lib/types/request/SilentRequest.d.ts +34 -0
  423. package/lib/types/request/SilentRequest.d.ts.map +1 -0
  424. package/lib/types/request/SsoSilentRequest.d.ts +30 -0
  425. package/lib/types/request/SsoSilentRequest.d.ts.map +1 -0
  426. package/lib/types/response/AuthenticationResult.d.ts +5 -0
  427. package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
  428. package/lib/types/response/ResponseHandler.d.ts +8 -0
  429. package/lib/types/response/ResponseHandler.d.ts.map +1 -0
  430. package/lib/types/telemetry/BrowserPerformanceClient.d.ts +35 -0
  431. package/lib/types/telemetry/BrowserPerformanceClient.d.ts.map +1 -0
  432. package/lib/types/telemetry/BrowserPerformanceMeasurement.d.ts +22 -0
  433. package/lib/types/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -0
  434. package/lib/types/utils/BrowserConstants.d.ts +181 -0
  435. package/lib/types/utils/BrowserConstants.d.ts.map +1 -0
  436. package/lib/types/utils/BrowserProtocolUtils.d.ts +12 -0
  437. package/lib/types/utils/BrowserProtocolUtils.d.ts.map +1 -0
  438. package/lib/types/utils/BrowserUtils.d.ts +76 -0
  439. package/lib/types/utils/BrowserUtils.d.ts.map +1 -0
  440. package/package.json +14 -13
  441. package/src/app/IPublicClientApplication.ts +17 -17
  442. package/src/app/PublicClientApplication.ts +26 -23
  443. package/src/app/PublicClientNext.ts +22 -19
  444. package/src/broker/nativeBroker/NativeMessageHandler.ts +7 -7
  445. package/src/broker/nativeBroker/NativeRequest.ts +2 -2
  446. package/src/cache/AccountManager.ts +2 -2
  447. package/src/cache/AsyncMemoryStorage.ts +5 -5
  448. package/src/cache/BrowserCacheManager.ts +16 -16
  449. package/src/cache/BrowserStorage.ts +3 -3
  450. package/src/cache/DatabaseStorage.ts +7 -3
  451. package/src/cache/ITokenCache.ts +4 -4
  452. package/src/cache/MemoryStorage.ts +1 -1
  453. package/src/cache/TokenCache.ts +9 -9
  454. package/src/config/Configuration.ts +10 -5
  455. package/src/controllers/ControllerFactory.ts +7 -7
  456. package/src/controllers/IController.ts +17 -17
  457. package/src/controllers/NestedAppAuthController.ts +25 -25
  458. package/src/controllers/StandardController.ts +39 -39
  459. package/src/controllers/UnknownOperatingContextController.ts +21 -21
  460. package/src/crypto/BrowserCrypto.ts +4 -4
  461. package/src/crypto/CryptoOps.ts +10 -6
  462. package/src/crypto/PkceGenerator.ts +4 -4
  463. package/src/crypto/SignedHttpRequest.ts +3 -3
  464. package/src/encode/Base64Decode.ts +1 -1
  465. package/src/error/BrowserAuthError.ts +2 -2
  466. package/src/error/BrowserConfigurationAuthError.ts +2 -2
  467. package/src/error/NativeAuthError.ts +4 -4
  468. package/src/error/NestedAppAuthError.ts +1 -1
  469. package/src/event/EventHandler.ts +5 -5
  470. package/src/event/EventMessage.ts +11 -10
  471. package/src/index.ts +35 -35
  472. package/src/interaction_client/BaseInteractionClient.ts +51 -28
  473. package/src/interaction_client/HybridSpaAuthorizationCodeClient.ts +1 -1
  474. package/src/interaction_client/NativeInteractionClient.ts +32 -29
  475. package/src/interaction_client/PopupClient.ts +95 -109
  476. package/src/interaction_client/RedirectClient.ts +32 -30
  477. package/src/interaction_client/SilentAuthCodeClient.ts +20 -19
  478. package/src/interaction_client/SilentCacheClient.ts +11 -11
  479. package/src/interaction_client/SilentIframeClient.ts +23 -22
  480. package/src/interaction_client/SilentRefreshClient.ts +33 -20
  481. package/src/interaction_client/StandardInteractionClient.ts +62 -38
  482. package/src/interaction_handler/InteractionHandler.ts +5 -5
  483. package/src/interaction_handler/RedirectHandler.ts +7 -7
  484. package/src/interaction_handler/SilentHandler.ts +3 -3
  485. package/src/naa/AuthResult.ts +2 -2
  486. package/src/naa/BridgeError.ts +1 -1
  487. package/src/naa/BridgeProxy.ts +36 -26
  488. package/src/naa/BridgeRequest.ts +1 -1
  489. package/src/naa/BridgeRequestEnvelope.ts +1 -1
  490. package/src/naa/BridgeResponseEnvelope.ts +4 -4
  491. package/src/naa/IBridgeProxy.ts +4 -4
  492. package/src/naa/InitContext.ts +2 -2
  493. package/src/naa/mapping/NestedAppAuthAdapter.ts +12 -12
  494. package/src/navigation/INavigationClient.ts +1 -1
  495. package/src/navigation/NavigationClient.ts +2 -2
  496. package/src/navigation/NavigationOptions.ts +1 -1
  497. package/src/network/FetchClient.ts +3 -3
  498. package/src/operatingcontext/BaseOperatingContext.ts +4 -4
  499. package/src/operatingcontext/NestedAppOperatingContext.ts +14 -9
  500. package/src/operatingcontext/StandardOperatingContext.ts +1 -1
  501. package/src/operatingcontext/UnknownOperatingContext.ts +1 -1
  502. package/src/packageMetadata.ts +1 -1
  503. package/src/request/AuthorizationCodeRequest.ts +1 -1
  504. package/src/request/AuthorizationUrlRequest.ts +1 -1
  505. package/src/request/ClearCacheRequest.ts +1 -1
  506. package/src/request/EndSessionPopupRequest.ts +4 -2
  507. package/src/request/EndSessionRequest.ts +1 -1
  508. package/src/request/PopupRequest.ts +7 -2
  509. package/src/request/RedirectRequest.ts +4 -1
  510. package/src/request/RequestHelpers.ts +4 -4
  511. package/src/request/SilentRequest.ts +2 -2
  512. package/src/request/SsoSilentRequest.ts +4 -1
  513. package/src/response/AuthenticationResult.ts +1 -1
  514. package/src/response/ResponseHandler.ts +4 -4
  515. package/src/telemetry/BrowserPerformanceClient.ts +6 -6
  516. package/src/telemetry/BrowserPerformanceMeasurement.ts +4 -1
  517. package/src/utils/BrowserConstants.ts +3 -3
  518. package/src/utils/BrowserProtocolUtils.ts +2 -2
  519. package/src/utils/BrowserUtils.ts +6 -6
@@ -20,38 +20,39 @@ import {
20
20
  ServerResponseType,
21
21
  invokeAsync,
22
22
  invoke,
23
- } from "@azure/msal-common";
24
- import { StandardInteractionClient } from "./StandardInteractionClient";
25
- import { EventType } from "../event/EventType";
23
+ } from "@azure/msal-common/browser";
24
+ import { StandardInteractionClient } from "./StandardInteractionClient.js";
25
+ import { EventType } from "../event/EventType.js";
26
26
  import {
27
27
  InteractionType,
28
28
  ApiId,
29
29
  BrowserConstants,
30
- } from "../utils/BrowserConstants";
31
- import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest";
32
- import { NavigationOptions } from "../navigation/NavigationOptions";
33
- import * as BrowserUtils from "../utils/BrowserUtils";
34
- import { PopupRequest } from "../request/PopupRequest";
35
- import { NativeInteractionClient } from "./NativeInteractionClient";
36
- import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
30
+ } from "../utils/BrowserConstants.js";
31
+ import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
32
+ import { NavigationOptions } from "../navigation/NavigationOptions.js";
33
+ import * as BrowserUtils from "../utils/BrowserUtils.js";
34
+ import { PopupRequest } from "../request/PopupRequest.js";
35
+ import { NativeInteractionClient } from "./NativeInteractionClient.js";
36
+ import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
37
37
  import {
38
38
  createBrowserAuthError,
39
39
  BrowserAuthErrorCodes,
40
- } from "../error/BrowserAuthError";
41
- import { INavigationClient } from "../navigation/INavigationClient";
42
- import { EventHandler } from "../event/EventHandler";
43
- import { BrowserCacheManager } from "../cache/BrowserCacheManager";
44
- import { BrowserConfiguration } from "../config/Configuration";
45
- import { InteractionHandler } from "../interaction_handler/InteractionHandler";
46
- import { PopupWindowAttributes } from "../request/PopupWindowAttributes";
47
- import { EventError } from "../event/EventMessage";
48
- import { AuthenticationResult } from "../response/AuthenticationResult";
49
- import * as ResponseHandler from "../response/ResponseHandler";
40
+ } from "../error/BrowserAuthError.js";
41
+ import { INavigationClient } from "../navigation/INavigationClient.js";
42
+ import { EventHandler } from "../event/EventHandler.js";
43
+ import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
44
+ import { BrowserConfiguration } from "../config/Configuration.js";
45
+ import { InteractionHandler } from "../interaction_handler/InteractionHandler.js";
46
+ import { PopupWindowAttributes } from "../request/PopupWindowAttributes.js";
47
+ import { EventError } from "../event/EventMessage.js";
48
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
49
+ import * as ResponseHandler from "../response/ResponseHandler.js";
50
50
 
51
51
  export type PopupParams = {
52
52
  popup?: Window | null;
53
53
  popupName: string;
54
54
  popupWindowAttributes: PopupWindowAttributes;
55
+ popupWindowParent: Window;
55
56
  };
56
57
 
57
58
  export class PopupClient extends StandardInteractionClient {
@@ -96,33 +97,27 @@ export class PopupClient extends StandardInteractionClient {
96
97
  request.scopes || OIDC_DEFAULT_SCOPES,
97
98
  request.authority || this.config.auth.authority
98
99
  );
99
- const popupWindowAttributes = request.popupWindowAttributes || {};
100
+ const popupParams: PopupParams = {
101
+ popupName,
102
+ popupWindowAttributes: request.popupWindowAttributes || {},
103
+ popupWindowParent: request.popupWindowParent ?? window,
104
+ };
100
105
 
101
106
  // asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.
102
107
  if (this.config.system.asyncPopups) {
103
108
  this.logger.verbose("asyncPopups set to true, acquiring token");
104
109
  // Passes on popup position and dimensions if in request
105
- return this.acquireTokenPopupAsync(
106
- request,
107
- popupName,
108
- popupWindowAttributes
109
- );
110
+ return this.acquireTokenPopupAsync(request, popupParams);
110
111
  } else {
111
112
  // asyncPopups flag is set to false. Opens popup before acquiring token.
112
113
  this.logger.verbose(
113
114
  "asyncPopup set to false, opening popup before acquiring token"
114
115
  );
115
- const popup = this.openSizedPopup(
116
+ popupParams.popup = this.openSizedPopup(
116
117
  "about:blank",
117
- popupName,
118
- popupWindowAttributes
119
- );
120
- return this.acquireTokenPopupAsync(
121
- request,
122
- popupName,
123
- popupWindowAttributes,
124
- popup
118
+ popupParams
125
119
  );
120
+ return this.acquireTokenPopupAsync(request, popupParams);
126
121
  }
127
122
  } catch (e) {
128
123
  return Promise.reject(e);
@@ -138,13 +133,15 @@ export class PopupClient extends StandardInteractionClient {
138
133
  this.logger.verbose("logoutPopup called");
139
134
  const validLogoutRequest =
140
135
  this.initializeLogoutRequest(logoutRequest);
141
-
142
- const popupName = this.generateLogoutPopupName(validLogoutRequest);
136
+ const popupParams: PopupParams = {
137
+ popupName: this.generateLogoutPopupName(validLogoutRequest),
138
+ popupWindowAttributes:
139
+ logoutRequest?.popupWindowAttributes || {},
140
+ popupWindowParent: logoutRequest?.popupWindowParent ?? window,
141
+ };
143
142
  const authority = logoutRequest && logoutRequest.authority;
144
143
  const mainWindowRedirectUri =
145
144
  logoutRequest && logoutRequest.mainWindowRedirectUri;
146
- const popupWindowAttributes =
147
- logoutRequest?.popupWindowAttributes || {};
148
145
 
149
146
  // asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.
150
147
  if (this.config.system.asyncPopups) {
@@ -152,26 +149,21 @@ export class PopupClient extends StandardInteractionClient {
152
149
  // Passes on popup position and dimensions if in request
153
150
  return this.logoutPopupAsync(
154
151
  validLogoutRequest,
155
- popupName,
156
- popupWindowAttributes,
152
+ popupParams,
157
153
  authority,
158
- undefined,
159
154
  mainWindowRedirectUri
160
155
  );
161
156
  } else {
162
157
  // asyncPopups flag is set to false. Opens popup before logging out.
163
158
  this.logger.verbose("asyncPopup set to false, opening popup");
164
- const popup = this.openSizedPopup(
159
+ popupParams.popup = this.openSizedPopup(
165
160
  "about:blank",
166
- popupName,
167
- popupWindowAttributes
161
+ popupParams
168
162
  );
169
163
  return this.logoutPopupAsync(
170
164
  validLogoutRequest,
171
- popupName,
172
- popupWindowAttributes,
165
+ popupParams,
173
166
  authority,
174
- popup,
175
167
  mainWindowRedirectUri
176
168
  );
177
169
  }
@@ -192,9 +184,7 @@ export class PopupClient extends StandardInteractionClient {
192
184
  */
193
185
  protected async acquireTokenPopupAsync(
194
186
  request: PopupRequest,
195
- popupName: string,
196
- popupWindowAttributes: PopupWindowAttributes,
197
- popup?: Window | null
187
+ popupParams: PopupParams
198
188
  ): Promise<AuthenticationResult> {
199
189
  this.logger.verbose("acquireTokenPopupAsync called");
200
190
  const serverTelemetryManager = this.initializeServerTelemetryManager(
@@ -229,12 +219,13 @@ export class PopupClient extends StandardInteractionClient {
229
219
  this.logger,
230
220
  this.performanceClient,
231
221
  this.correlationId
232
- )(
222
+ )({
233
223
  serverTelemetryManager,
234
- validRequest.authority,
235
- validRequest.azureCloudOptions,
236
- validRequest.account
237
- );
224
+ requestAuthority: validRequest.authority,
225
+ requestAzureCloudOptions: validRequest.azureCloudOptions,
226
+ requestExtraQueryParameters: validRequest.extraQueryParameters,
227
+ account: validRequest.account,
228
+ });
238
229
 
239
230
  const isNativeBroker = NativeMessageHandler.isNativeAvailable(
240
231
  this.config,
@@ -268,14 +259,9 @@ export class PopupClient extends StandardInteractionClient {
268
259
  );
269
260
 
270
261
  // Show the UI once the url has been created. Get the window handle for the popup.
271
- const popupParameters: PopupParams = {
272
- popup,
273
- popupName,
274
- popupWindowAttributes,
275
- };
276
262
  const popupWindow: Window = this.initiateAuthRequest(
277
263
  navigateUrl,
278
- popupParameters
264
+ popupParams
279
265
  );
280
266
  this.eventHandler.emitEvent(
281
267
  EventType.POPUP_OPENED,
@@ -285,7 +271,10 @@ export class PopupClient extends StandardInteractionClient {
285
271
  );
286
272
 
287
273
  // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
288
- const responseString = await this.monitorPopupForHash(popupWindow);
274
+ const responseString = await this.monitorPopupForHash(
275
+ popupWindow,
276
+ popupParams.popupWindowParent
277
+ );
289
278
 
290
279
  const serverParams = invoke(
291
280
  ResponseHandler.deserializeResponse,
@@ -355,10 +344,8 @@ export class PopupClient extends StandardInteractionClient {
355
344
 
356
345
  return result;
357
346
  } catch (e) {
358
- if (popup) {
359
- // Close the synchronous popup if an error is thrown before the window unload event is registered
360
- popup.close();
361
- }
347
+ // Close the synchronous popup if an error is thrown before the window unload event is registered
348
+ popupParams.popup?.close();
362
349
 
363
350
  if (e instanceof AuthError) {
364
351
  (e as AuthError).setCorrelationId(this.correlationId);
@@ -380,10 +367,8 @@ export class PopupClient extends StandardInteractionClient {
380
367
  */
381
368
  protected async logoutPopupAsync(
382
369
  validRequest: CommonEndSessionRequest,
383
- popupName: string,
384
- popupWindowAttributes: PopupWindowAttributes,
370
+ popupParams: PopupParams,
385
371
  requestAuthority?: string,
386
- popup?: Window | null,
387
372
  mainWindowRedirectUri?: string
388
373
  ): Promise<void> {
389
374
  this.logger.verbose("logoutPopupAsync called");
@@ -408,12 +393,11 @@ export class PopupClient extends StandardInteractionClient {
408
393
  this.logger,
409
394
  this.performanceClient,
410
395
  this.correlationId
411
- )(
396
+ )({
412
397
  serverTelemetryManager,
413
- requestAuthority,
414
- undefined, // AzureCloudOptions
415
- validRequest.account || undefined
416
- );
398
+ requestAuthority: requestAuthority,
399
+ account: validRequest.account || undefined,
400
+ });
417
401
 
418
402
  try {
419
403
  authClient.authority.endSessionEndpoint;
@@ -450,9 +434,7 @@ export class PopupClient extends StandardInteractionClient {
450
434
  );
451
435
  }
452
436
 
453
- if (popup) {
454
- popup.close();
455
- }
437
+ popupParams.popup?.close();
456
438
 
457
439
  return;
458
440
  }
@@ -468,11 +450,7 @@ export class PopupClient extends StandardInteractionClient {
468
450
  );
469
451
 
470
452
  // Open the popup window to requestUrl.
471
- const popupWindow = this.openPopup(logoutUri, {
472
- popupName,
473
- popupWindowAttributes,
474
- popup,
475
- });
453
+ const popupWindow = this.openPopup(logoutUri, popupParams);
476
454
  this.eventHandler.emitEvent(
477
455
  EventType.POPUP_OPENED,
478
456
  InteractionType.Popup,
@@ -480,7 +458,10 @@ export class PopupClient extends StandardInteractionClient {
480
458
  null
481
459
  );
482
460
 
483
- await this.monitorPopupForHash(popupWindow).catch(() => {
461
+ await this.monitorPopupForHash(
462
+ popupWindow,
463
+ popupParams.popupWindowParent
464
+ ).catch(() => {
484
465
  // Swallow any errors related to monitoring the window. Server logout is best effort
485
466
  });
486
467
 
@@ -509,10 +490,8 @@ export class PopupClient extends StandardInteractionClient {
509
490
  this.logger.verbose("No main window navigation requested");
510
491
  }
511
492
  } catch (e) {
512
- if (popup) {
513
- // Close the synchronous popup if an error is thrown before the window unload event is registered
514
- popup.close();
515
- }
493
+ // Close the synchronous popup if an error is thrown before the window unload event is registered
494
+ popupParams.popup?.close();
516
495
 
517
496
  if (e instanceof AuthError) {
518
497
  (e as AuthError).setCorrelationId(this.correlationId);
@@ -562,7 +541,10 @@ export class PopupClient extends StandardInteractionClient {
562
541
  * @param popupWindow - window that is being monitored
563
542
  * @param timeout - timeout for processing hash once popup is redirected back to application
564
543
  */
565
- monitorPopupForHash(popupWindow: Window): Promise<string> {
544
+ monitorPopupForHash(
545
+ popupWindow: Window,
546
+ popupWindowParent: Window
547
+ ): Promise<string> {
566
548
  return new Promise<string>((resolve, reject) => {
567
549
  this.logger.verbose(
568
550
  "PopupHandler.monitorPopupForHash - polling started"
@@ -617,7 +599,7 @@ export class PopupClient extends StandardInteractionClient {
617
599
  resolve(responseString);
618
600
  }, this.config.system.pollIntervalMilliseconds);
619
601
  }).finally(() => {
620
- this.cleanPopup(popupWindow);
602
+ this.cleanPopup(popupWindow, popupWindowParent);
621
603
  });
622
604
  }
623
605
 
@@ -649,11 +631,7 @@ export class PopupClient extends StandardInteractionClient {
649
631
  this.logger.verbosePii(
650
632
  `Opening popup window to: ${urlNavigate}`
651
633
  );
652
- popupWindow = this.openSizedPopup(
653
- urlNavigate,
654
- popupParams.popupName,
655
- popupParams.popupWindowAttributes
656
- );
634
+ popupWindow = this.openSizedPopup(urlNavigate, popupParams);
657
635
  }
658
636
 
659
637
  // Popup will be null if popups are blocked
@@ -666,7 +644,10 @@ export class PopupClient extends StandardInteractionClient {
666
644
  popupWindow.focus();
667
645
  }
668
646
  this.currentWindow = popupWindow;
669
- window.addEventListener("beforeunload", this.unloadWindow);
647
+ popupParams.popupWindowParent.addEventListener(
648
+ "beforeunload",
649
+ this.unloadWindow
650
+ );
670
651
 
671
652
  return popupWindow;
672
653
  } catch (e) {
@@ -689,25 +670,28 @@ export class PopupClient extends StandardInteractionClient {
689
670
  */
690
671
  openSizedPopup(
691
672
  urlNavigate: string,
692
- popupName: string,
693
- popupWindowAttributes: PopupWindowAttributes
673
+ { popupName, popupWindowAttributes, popupWindowParent }: PopupParams
694
674
  ): Window | null {
695
675
  /**
696
676
  * adding winLeft and winTop to account for dual monitor
697
677
  * using screenLeft and screenTop for IE8 and earlier
698
678
  */
699
- const winLeft = window.screenLeft ? window.screenLeft : window.screenX;
700
- const winTop = window.screenTop ? window.screenTop : window.screenY;
679
+ const winLeft = popupWindowParent.screenLeft
680
+ ? popupWindowParent.screenLeft
681
+ : popupWindowParent.screenX;
682
+ const winTop = popupWindowParent.screenTop
683
+ ? popupWindowParent.screenTop
684
+ : popupWindowParent.screenY;
701
685
  /**
702
686
  * window.innerWidth displays browser window"s height and width excluding toolbars
703
687
  * using document.documentElement.clientWidth for IE8 and earlier
704
688
  */
705
689
  const winWidth =
706
- window.innerWidth ||
690
+ popupWindowParent.innerWidth ||
707
691
  document.documentElement.clientWidth ||
708
692
  document.body.clientWidth;
709
693
  const winHeight =
710
- window.innerHeight ||
694
+ popupWindowParent.innerHeight ||
711
695
  document.documentElement.clientHeight ||
712
696
  document.body.clientHeight;
713
697
 
@@ -750,7 +734,7 @@ export class PopupClient extends StandardInteractionClient {
750
734
  );
751
735
  }
752
736
 
753
- return window.open(
737
+ return popupWindowParent.open(
754
738
  urlNavigate,
755
739
  popupName,
756
740
  `width=${width}, height=${height}, top=${top}, left=${left}, scrollbars=yes`
@@ -775,13 +759,15 @@ export class PopupClient extends StandardInteractionClient {
775
759
  * Closes popup, removes any state vars created during popup calls.
776
760
  * @param popupWindow
777
761
  */
778
- cleanPopup(popupWindow?: Window): void {
779
- if (popupWindow) {
780
- // Close window.
781
- popupWindow.close();
782
- }
762
+ cleanPopup(popupWindow: Window, popupWindowParent: Window): void {
763
+ // Close window.
764
+ popupWindow.close();
765
+
783
766
  // Remove window unload function
784
- window.removeEventListener("beforeunload", this.unloadWindow);
767
+ popupWindowParent.removeEventListener(
768
+ "beforeunload",
769
+ this.unloadWindow
770
+ );
785
771
 
786
772
  // Interaction is completed - remove interaction status.
787
773
  this.browserStorage.setInteractionInProgress(false);
@@ -22,32 +22,32 @@ import {
22
22
  ServerResponseType,
23
23
  UrlUtils,
24
24
  InProgressPerformanceEvent,
25
- } from "@azure/msal-common";
26
- import { StandardInteractionClient } from "./StandardInteractionClient";
25
+ } from "@azure/msal-common/browser";
26
+ import { StandardInteractionClient } from "./StandardInteractionClient.js";
27
27
  import {
28
28
  ApiId,
29
29
  InteractionType,
30
30
  TemporaryCacheKeys,
31
- } from "../utils/BrowserConstants";
32
- import { RedirectHandler } from "../interaction_handler/RedirectHandler";
33
- import * as BrowserUtils from "../utils/BrowserUtils";
34
- import { EndSessionRequest } from "../request/EndSessionRequest";
35
- import { EventType } from "../event/EventType";
36
- import { NavigationOptions } from "../navigation/NavigationOptions";
31
+ } from "../utils/BrowserConstants.js";
32
+ import { RedirectHandler } from "../interaction_handler/RedirectHandler.js";
33
+ import * as BrowserUtils from "../utils/BrowserUtils.js";
34
+ import { EndSessionRequest } from "../request/EndSessionRequest.js";
35
+ import { EventType } from "../event/EventType.js";
36
+ import { NavigationOptions } from "../navigation/NavigationOptions.js";
37
37
  import {
38
38
  createBrowserAuthError,
39
39
  BrowserAuthErrorCodes,
40
- } from "../error/BrowserAuthError";
41
- import { RedirectRequest } from "../request/RedirectRequest";
42
- import { NativeInteractionClient } from "./NativeInteractionClient";
43
- import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
44
- import { BrowserConfiguration } from "../config/Configuration";
45
- import { BrowserCacheManager } from "../cache/BrowserCacheManager";
46
- import { EventHandler } from "../event/EventHandler";
47
- import { INavigationClient } from "../navigation/INavigationClient";
48
- import { EventError } from "../event/EventMessage";
49
- import { AuthenticationResult } from "../response/AuthenticationResult";
50
- import * as ResponseHandler from "../response/ResponseHandler";
40
+ } from "../error/BrowserAuthError.js";
41
+ import { RedirectRequest } from "../request/RedirectRequest.js";
42
+ import { NativeInteractionClient } from "./NativeInteractionClient.js";
43
+ import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
44
+ import { BrowserConfiguration } from "../config/Configuration.js";
45
+ import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
46
+ import { EventHandler } from "../event/EventHandler.js";
47
+ import { INavigationClient } from "../navigation/INavigationClient.js";
48
+ import { EventError } from "../event/EventMessage.js";
49
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
50
+ import * as ResponseHandler from "../response/ResponseHandler.js";
51
51
 
52
52
  export class RedirectClient extends StandardInteractionClient {
53
53
  protected nativeStorage: BrowserCacheManager;
@@ -134,12 +134,13 @@ export class RedirectClient extends StandardInteractionClient {
134
134
  this.logger,
135
135
  this.performanceClient,
136
136
  this.correlationId
137
- )(
137
+ )({
138
138
  serverTelemetryManager,
139
- validRequest.authority,
140
- validRequest.azureCloudOptions,
141
- validRequest.account
142
- );
139
+ requestAuthority: validRequest.authority,
140
+ requestAzureCloudOptions: validRequest.azureCloudOptions,
141
+ requestExtraQueryParameters: validRequest.extraQueryParameters,
142
+ account: validRequest.account,
143
+ });
143
144
 
144
145
  // Create redirect interaction handler.
145
146
  const interactionHandler = new RedirectHandler(
@@ -477,7 +478,7 @@ export class RedirectClient extends StandardInteractionClient {
477
478
  this.logger,
478
479
  this.performanceClient,
479
480
  this.correlationId
480
- )(serverTelemetryManager, currentAuthority);
481
+ )({ serverTelemetryManager, requestAuthority: currentAuthority });
481
482
 
482
483
  ThrottlingUtils.removeThrottle(
483
484
  this.browserStorage,
@@ -528,12 +529,13 @@ export class RedirectClient extends StandardInteractionClient {
528
529
  this.logger,
529
530
  this.performanceClient,
530
531
  this.correlationId
531
- )(
532
+ )({
532
533
  serverTelemetryManager,
533
- logoutRequest && logoutRequest.authority,
534
- undefined, // AzureCloudOptions
535
- (logoutRequest && logoutRequest.account) || undefined
536
- );
534
+ requestAuthority: logoutRequest && logoutRequest.authority,
535
+ requestExtraQueryParameters:
536
+ logoutRequest?.extraQueryParameters,
537
+ account: (logoutRequest && logoutRequest.account) || undefined,
538
+ });
537
539
 
538
540
  if (authClient.authority.protocolMode === ProtocolMode.OIDC) {
539
541
  try {
@@ -11,23 +11,23 @@ import {
11
11
  IPerformanceClient,
12
12
  PerformanceEvents,
13
13
  invokeAsync,
14
- } from "@azure/msal-common";
15
- import { StandardInteractionClient } from "./StandardInteractionClient";
16
- import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
17
- import { BrowserConfiguration } from "../config/Configuration";
18
- import { BrowserCacheManager } from "../cache/BrowserCacheManager";
19
- import { EventHandler } from "../event/EventHandler";
20
- import { INavigationClient } from "../navigation/INavigationClient";
14
+ } from "@azure/msal-common/browser";
15
+ import { StandardInteractionClient } from "./StandardInteractionClient.js";
16
+ import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest.js";
17
+ import { BrowserConfiguration } from "../config/Configuration.js";
18
+ import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
19
+ import { EventHandler } from "../event/EventHandler.js";
20
+ import { INavigationClient } from "../navigation/INavigationClient.js";
21
21
  import {
22
22
  createBrowserAuthError,
23
23
  BrowserAuthErrorCodes,
24
- } from "../error/BrowserAuthError";
25
- import { InteractionType, ApiId } from "../utils/BrowserConstants";
26
- import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest";
27
- import { HybridSpaAuthorizationCodeClient } from "./HybridSpaAuthorizationCodeClient";
28
- import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
29
- import { AuthenticationResult } from "../response/AuthenticationResult";
30
- import { InteractionHandler } from "../interaction_handler/InteractionHandler";
24
+ } from "../error/BrowserAuthError.js";
25
+ import { InteractionType, ApiId } from "../utils/BrowserConstants.js";
26
+ import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
27
+ import { HybridSpaAuthorizationCodeClient } from "./HybridSpaAuthorizationCodeClient.js";
28
+ import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
29
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
30
+ import { InteractionHandler } from "../interaction_handler/InteractionHandler.js";
31
31
 
32
32
  export class SilentAuthCodeClient extends StandardInteractionClient {
33
33
  private apiId: ApiId;
@@ -99,12 +99,13 @@ export class SilentAuthCodeClient extends StandardInteractionClient {
99
99
  this.logger,
100
100
  this.performanceClient,
101
101
  request.correlationId
102
- )(
102
+ )({
103
103
  serverTelemetryManager,
104
- silentRequest.authority,
105
- silentRequest.azureCloudOptions,
106
- silentRequest.account
107
- );
104
+ requestAuthority: silentRequest.authority,
105
+ requestAzureCloudOptions: silentRequest.azureCloudOptions,
106
+ requestExtraQueryParameters: silentRequest.extraQueryParameters,
107
+ account: silentRequest.account,
108
+ });
108
109
  const authClient: HybridSpaAuthorizationCodeClient =
109
110
  new HybridSpaAuthorizationCodeClient(clientConfig);
110
111
  this.logger.verbose("Auth code client created");
@@ -3,20 +3,20 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { StandardInteractionClient } from "./StandardInteractionClient";
6
+ import { StandardInteractionClient } from "./StandardInteractionClient.js";
7
7
  import {
8
8
  CommonSilentFlowRequest,
9
9
  SilentFlowClient,
10
10
  PerformanceEvents,
11
11
  invokeAsync,
12
- } from "@azure/msal-common";
13
- import { ApiId } from "../utils/BrowserConstants";
12
+ } from "@azure/msal-common/browser";
13
+ import { ApiId } from "../utils/BrowserConstants.js";
14
14
  import {
15
15
  BrowserAuthError,
16
16
  BrowserAuthErrorCodes,
17
- } from "../error/BrowserAuthError";
18
- import { AuthenticationResult } from "../response/AuthenticationResult";
19
- import { ClearCacheRequest } from "../request/ClearCacheRequest";
17
+ } from "../error/BrowserAuthError.js";
18
+ import { AuthenticationResult } from "../response/AuthenticationResult.js";
19
+ import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
20
20
 
21
21
  export class SilentCacheClient extends StandardInteractionClient {
22
22
  /**
@@ -41,12 +41,12 @@ export class SilentCacheClient extends StandardInteractionClient {
41
41
  this.logger,
42
42
  this.performanceClient,
43
43
  this.correlationId
44
- )(
44
+ )({
45
45
  serverTelemetryManager,
46
- silentRequest.authority,
47
- silentRequest.azureCloudOptions,
48
- silentRequest.account
49
- );
46
+ requestAuthority: silentRequest.authority,
47
+ requestAzureCloudOptions: silentRequest.azureCloudOptions,
48
+ account: silentRequest.account,
49
+ });
50
50
  const silentAuthClient = new SilentFlowClient(
51
51
  clientConfig,
52
52
  this.performanceClient