@azure/msal-browser 3.0.2 → 3.1.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 (256) hide show
  1. package/dist/app/IPublicClientApplication.d.ts +2 -0
  2. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  3. package/dist/app/IPublicClientApplication.mjs +4 -1
  4. package/dist/app/IPublicClientApplication.mjs.map +1 -1
  5. package/dist/app/PublicClientApplication.d.ts +6 -0
  6. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  7. package/dist/app/PublicClientApplication.mjs +8 -1
  8. package/dist/app/PublicClientApplication.mjs.map +1 -1
  9. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
  10. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +5 -4
  11. package/dist/broker/nativeBroker/NativeMessageHandler.mjs.map +1 -1
  12. package/dist/cache/AsyncMemoryStorage.mjs +4 -3
  13. package/dist/cache/AsyncMemoryStorage.mjs.map +1 -1
  14. package/dist/cache/BrowserCacheManager.d.ts +9 -2
  15. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  16. package/dist/cache/BrowserCacheManager.mjs +54 -26
  17. package/dist/cache/BrowserCacheManager.mjs.map +1 -1
  18. package/dist/cache/BrowserStorage.mjs +1 -1
  19. package/dist/cache/BrowserStorage.mjs.map +1 -1
  20. package/dist/cache/CryptoKeyStore.mjs +1 -1
  21. package/dist/cache/CryptoKeyStore.mjs.map +1 -1
  22. package/dist/cache/DatabaseStorage.d.ts.map +1 -1
  23. package/dist/cache/DatabaseStorage.mjs +9 -8
  24. package/dist/cache/DatabaseStorage.mjs.map +1 -1
  25. package/dist/cache/MemoryStorage.mjs +1 -1
  26. package/dist/cache/MemoryStorage.mjs.map +1 -1
  27. package/dist/cache/TokenCache.d.ts.map +1 -1
  28. package/dist/cache/TokenCache.mjs +30 -30
  29. package/dist/cache/TokenCache.mjs.map +1 -1
  30. package/dist/config/Configuration.d.ts +1 -0
  31. package/dist/config/Configuration.d.ts.map +1 -1
  32. package/dist/config/Configuration.mjs +7 -11
  33. package/dist/config/Configuration.mjs.map +1 -1
  34. package/dist/controllers/ControllerFactory.mjs +1 -1
  35. package/dist/controllers/ControllerFactory.mjs.map +1 -1
  36. package/dist/controllers/IController.d.ts +3 -27
  37. package/dist/controllers/IController.d.ts.map +1 -1
  38. package/dist/controllers/StandardController.d.ts +6 -25
  39. package/dist/controllers/StandardController.d.ts.map +1 -1
  40. package/dist/controllers/StandardController.mjs +28 -52
  41. package/dist/controllers/StandardController.mjs.map +1 -1
  42. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  43. package/dist/crypto/BrowserCrypto.mjs +4 -3
  44. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  45. package/dist/crypto/CryptoOps.d.ts +0 -3
  46. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  47. package/dist/crypto/CryptoOps.mjs +14 -17
  48. package/dist/crypto/CryptoOps.mjs.map +1 -1
  49. package/dist/crypto/ModernBrowserCrypto.mjs +1 -1
  50. package/dist/crypto/ModernBrowserCrypto.mjs.map +1 -1
  51. package/dist/crypto/PkceGenerator.d.ts +0 -1
  52. package/dist/crypto/PkceGenerator.d.ts.map +1 -1
  53. package/dist/crypto/PkceGenerator.mjs +8 -8
  54. package/dist/crypto/PkceGenerator.mjs.map +1 -1
  55. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  56. package/dist/crypto/SignedHttpRequest.mjs.map +1 -1
  57. package/dist/encode/Base64Decode.d.ts +6 -19
  58. package/dist/encode/Base64Decode.d.ts.map +1 -1
  59. package/dist/encode/Base64Decode.mjs +17 -70
  60. package/dist/encode/Base64Decode.mjs.map +1 -1
  61. package/dist/encode/Base64Encode.d.ts +15 -27
  62. package/dist/encode/Base64Encode.d.ts.map +1 -1
  63. package/dist/encode/Base64Encode.mjs +36 -75
  64. package/dist/encode/Base64Encode.mjs.map +1 -1
  65. package/dist/error/BrowserAuthError.d.ts +54 -195
  66. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  67. package/dist/error/BrowserAuthError.mjs +150 -381
  68. package/dist/error/BrowserAuthError.mjs.map +1 -1
  69. package/dist/error/BrowserAuthErrorCodes.d.ts +45 -0
  70. package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -0
  71. package/dist/error/BrowserAuthErrorCodes.mjs +53 -0
  72. package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -0
  73. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  74. package/dist/error/BrowserConfigurationAuthError.mjs.map +1 -1
  75. package/dist/error/NativeAuthError.d.ts.map +1 -1
  76. package/dist/error/NativeAuthError.mjs +5 -4
  77. package/dist/error/NativeAuthError.mjs.map +1 -1
  78. package/dist/event/EventHandler.mjs +1 -1
  79. package/dist/event/EventHandler.mjs.map +1 -1
  80. package/dist/event/EventMessage.mjs +1 -1
  81. package/dist/event/EventMessage.mjs.map +1 -1
  82. package/dist/event/EventType.mjs +1 -1
  83. package/dist/event/EventType.mjs.map +1 -1
  84. package/dist/index.d.ts +5 -5
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.mjs +5 -3
  87. package/dist/index.mjs.map +1 -1
  88. package/dist/interaction_client/BaseInteractionClient.d.ts +2 -1
  89. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  90. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  91. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  92. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  93. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs.map +1 -1
  94. package/dist/interaction_client/NativeInteractionClient.d.ts +4 -10
  95. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  96. package/dist/interaction_client/NativeInteractionClient.mjs +22 -30
  97. package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
  98. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  99. package/dist/interaction_client/PopupClient.mjs +16 -15
  100. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  101. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  102. package/dist/interaction_client/RedirectClient.mjs +7 -6
  103. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  104. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  105. package/dist/interaction_client/SilentAuthCodeClient.mjs +5 -4
  106. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  107. package/dist/interaction_client/SilentCacheClient.d.ts +4 -2
  108. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  109. package/dist/interaction_client/SilentCacheClient.mjs +10 -8
  110. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  111. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  112. package/dist/interaction_client/SilentIframeClient.mjs +20 -47
  113. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  114. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  115. package/dist/interaction_client/SilentRefreshClient.mjs +4 -3
  116. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  117. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  118. package/dist/interaction_client/StandardInteractionClient.mjs +8 -7
  119. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  120. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  121. package/dist/interaction_handler/InteractionHandler.mjs +9 -9
  122. package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
  123. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  124. package/dist/interaction_handler/RedirectHandler.mjs +11 -10
  125. package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
  126. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  127. package/dist/interaction_handler/SilentHandler.mjs +10 -9
  128. package/dist/interaction_handler/SilentHandler.mjs.map +1 -1
  129. package/dist/navigation/NavigationClient.mjs +1 -1
  130. package/dist/navigation/NavigationClient.mjs.map +1 -1
  131. package/dist/network/FetchClient.d.ts.map +1 -1
  132. package/dist/network/FetchClient.mjs +9 -8
  133. package/dist/network/FetchClient.mjs.map +1 -1
  134. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  135. package/dist/operatingcontext/BaseOperatingContext.mjs.map +1 -1
  136. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  137. package/dist/operatingcontext/StandardOperatingContext.mjs.map +1 -1
  138. package/dist/operatingcontext/TeamsAppOperatingContext.mjs +1 -1
  139. package/dist/operatingcontext/TeamsAppOperatingContext.mjs.map +1 -1
  140. package/dist/packageMetadata.d.ts +1 -1
  141. package/dist/packageMetadata.mjs +2 -2
  142. package/dist/packageMetadata.mjs.map +1 -1
  143. package/dist/request/ClearCacheRequest.d.ts +11 -0
  144. package/dist/request/ClearCacheRequest.d.ts.map +1 -0
  145. package/dist/telemetry/BrowserPerformanceClient.d.ts +2 -4
  146. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  147. package/dist/telemetry/BrowserPerformanceClient.mjs +2 -6
  148. package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
  149. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  150. package/dist/telemetry/BrowserPerformanceMeasurement.mjs.map +1 -1
  151. package/dist/utils/BrowserConstants.mjs +1 -1
  152. package/dist/utils/BrowserConstants.mjs.map +1 -1
  153. package/dist/utils/BrowserProtocolUtils.d.ts.map +1 -1
  154. package/dist/utils/BrowserProtocolUtils.mjs +3 -3
  155. package/dist/utils/BrowserProtocolUtils.mjs.map +1 -1
  156. package/dist/utils/BrowserStringUtils.mjs +1 -1
  157. package/dist/utils/BrowserStringUtils.mjs.map +1 -1
  158. package/dist/utils/BrowserUtils.d.ts +0 -9
  159. package/dist/utils/BrowserUtils.d.ts.map +1 -1
  160. package/dist/utils/BrowserUtils.mjs +8 -33
  161. package/dist/utils/BrowserUtils.mjs.map +1 -1
  162. package/lib/msal-browser.cjs +6579 -7102
  163. package/lib/msal-browser.cjs.map +1 -1
  164. package/lib/msal-browser.js +6579 -7102
  165. package/lib/msal-browser.js.map +1 -1
  166. package/lib/msal-browser.min.js +65 -62
  167. package/package.json +7 -5
  168. package/src/app/IPublicClientApplication.ts +199 -0
  169. package/src/app/PublicClientApplication.ts +405 -0
  170. package/src/broker/nativeBroker/NativeMessageHandler.ts +419 -0
  171. package/src/broker/nativeBroker/NativeRequest.ts +52 -0
  172. package/src/broker/nativeBroker/NativeResponse.ts +56 -0
  173. package/src/cache/AsyncMemoryStorage.ts +158 -0
  174. package/src/cache/BrowserCacheManager.ts +1994 -0
  175. package/src/cache/BrowserStorage.ts +54 -0
  176. package/src/cache/CryptoKeyStore.ts +63 -0
  177. package/src/cache/DatabaseStorage.ts +287 -0
  178. package/src/cache/IAsyncMemoryStorage.ts +36 -0
  179. package/src/cache/ITokenCache.ts +21 -0
  180. package/src/cache/IWindowStorage.ts +36 -0
  181. package/src/cache/MemoryStorage.ts +42 -0
  182. package/src/cache/TokenCache.ts +484 -0
  183. package/src/config/Configuration.ts +375 -0
  184. package/src/controllers/ControllerFactory.ts +55 -0
  185. package/src/controllers/IController.ts +131 -0
  186. package/src/controllers/StandardController.ts +2107 -0
  187. package/src/crypto/BrowserCrypto.ts +135 -0
  188. package/src/crypto/CryptoOps.ts +247 -0
  189. package/src/crypto/ISubtleCrypto.ts +30 -0
  190. package/src/crypto/ModernBrowserCrypto.ts +69 -0
  191. package/src/crypto/PkceGenerator.ts +76 -0
  192. package/src/crypto/SignedHttpRequest.ts +76 -0
  193. package/src/encode/Base64Decode.ts +26 -0
  194. package/src/encode/Base64Encode.ts +52 -0
  195. package/src/error/BrowserAuthError.ts +340 -0
  196. package/src/error/BrowserAuthErrorCodes.ts +56 -0
  197. package/src/error/BrowserConfigurationAuthError.ts +133 -0
  198. package/src/error/NativeAuthError.ts +141 -0
  199. package/src/event/EventHandler.ts +176 -0
  200. package/src/event/EventMessage.ts +125 -0
  201. package/src/event/EventType.ts +33 -0
  202. package/src/index.ts +152 -0
  203. package/src/interaction_client/BaseInteractionClient.ts +301 -0
  204. package/src/interaction_client/HybridSpaAuthorizationCodeClient.ts +16 -0
  205. package/src/interaction_client/NativeInteractionClient.ts +907 -0
  206. package/src/interaction_client/PopupClient.ts +926 -0
  207. package/src/interaction_client/RedirectClient.ts +616 -0
  208. package/src/interaction_client/SilentAuthCodeClient.ts +163 -0
  209. package/src/interaction_client/SilentCacheClient.ts +133 -0
  210. package/src/interaction_client/SilentIframeClient.ts +301 -0
  211. package/src/interaction_client/SilentRefreshClient.ts +120 -0
  212. package/src/interaction_client/StandardInteractionClient.ts +481 -0
  213. package/src/interaction_handler/InteractionHandler.ts +246 -0
  214. package/src/interaction_handler/RedirectHandler.ts +225 -0
  215. package/src/interaction_handler/SilentHandler.ts +266 -0
  216. package/src/navigation/INavigationClient.ts +23 -0
  217. package/src/navigation/NavigationClient.ts +55 -0
  218. package/src/navigation/NavigationOptions.ts +18 -0
  219. package/src/network/FetchClient.ts +130 -0
  220. package/src/operatingcontext/BaseOperatingContext.ts +82 -0
  221. package/src/operatingcontext/StandardOperatingContext.ts +49 -0
  222. package/src/operatingcontext/TeamsAppOperatingContext.ts +48 -0
  223. package/src/packageMetadata.ts +3 -0
  224. package/src/request/AuthorizationCodeRequest.ts +19 -0
  225. package/src/request/AuthorizationUrlRequest.ts +17 -0
  226. package/src/request/ClearCacheRequest.ts +16 -0
  227. package/src/request/EndSessionPopupRequest.ts +26 -0
  228. package/src/request/EndSessionRequest.ts +23 -0
  229. package/src/request/PopupRequest.ts +51 -0
  230. package/src/request/PopupWindowAttributes.ts +22 -0
  231. package/src/request/RedirectRequest.ts +51 -0
  232. package/src/request/SilentRequest.ts +49 -0
  233. package/src/request/SsoSilentRequest.ts +44 -0
  234. package/src/response/AuthenticationResult.ts +13 -0
  235. package/src/telemetry/BrowserPerformanceClient.ts +226 -0
  236. package/src/telemetry/BrowserPerformanceMeasurement.ts +144 -0
  237. package/src/utils/BrowserConstants.ts +241 -0
  238. package/src/utils/BrowserProtocolUtils.ts +57 -0
  239. package/src/utils/BrowserStringUtils.ts +143 -0
  240. package/src/utils/BrowserUtils.ts +156 -0
  241. package/dist/crypto/GuidGenerator.d.ts +0 -13
  242. package/dist/crypto/GuidGenerator.d.ts.map +0 -1
  243. package/dist/crypto/GuidGenerator.mjs +0 -104
  244. package/dist/crypto/GuidGenerator.mjs.map +0 -1
  245. package/dist/internals.d.ts +0 -23
  246. package/dist/internals.d.ts.map +0 -1
  247. package/dist/internals.mjs +0 -28
  248. package/dist/internals.mjs.map +0 -1
  249. package/dist/network/XhrClient.d.ts +0 -41
  250. package/dist/network/XhrClient.d.ts.map +0 -1
  251. package/dist/network/XhrClient.mjs +0 -125
  252. package/dist/network/XhrClient.mjs.map +0 -1
  253. package/dist/utils/MathUtils.d.ts +0 -12
  254. package/dist/utils/MathUtils.d.ts.map +0 -1
  255. package/dist/utils/MathUtils.mjs +0 -26
  256. package/dist/utils/MathUtils.mjs.map +0 -1
@@ -0,0 +1,52 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /**
7
+ * Class which exposes APIs to encode plaintext to base64 encoded string. See here for implementation details:
8
+ * https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64
9
+ */
10
+
11
+ /**
12
+ * Returns URL Safe b64 encoded string from a plaintext string.
13
+ * @param input
14
+ */
15
+ export function urlEncode(input: string): string {
16
+ return encodeURIComponent(
17
+ base64Encode(input)
18
+ .replace(/=/g, "")
19
+ .replace(/\+/g, "-")
20
+ .replace(/\//g, "_")
21
+ );
22
+ }
23
+
24
+ /**
25
+ * Returns URL Safe b64 encoded string from an int8Array.
26
+ * @param inputArr
27
+ */
28
+ export function urlEncodeArr(inputArr: Uint8Array): string {
29
+ return base64EncArr(inputArr)
30
+ .replace(/=/g, "")
31
+ .replace(/\+/g, "-")
32
+ .replace(/\//g, "_");
33
+ }
34
+
35
+ /**
36
+ * Returns b64 encoded string from plaintext string.
37
+ * @param input
38
+ */
39
+ export function base64Encode(input: string): string {
40
+ return base64EncArr(new TextEncoder().encode(input));
41
+ }
42
+
43
+ /**
44
+ * Base64 encode byte array
45
+ * @param aBytes
46
+ */
47
+ function base64EncArr(aBytes: Uint8Array): string {
48
+ const binString = Array.from(aBytes, (x) => String.fromCodePoint(x)).join(
49
+ ""
50
+ );
51
+ return btoa(binString);
52
+ }
@@ -0,0 +1,340 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { AuthError } from "@azure/msal-common";
7
+ import * as BrowserAuthErrorCodes from "./BrowserAuthErrorCodes";
8
+ export { BrowserAuthErrorCodes }; // Allow importing as "BrowserAuthErrorCodes"
9
+
10
+ const ErrorLink = "For more visit: aka.ms/msaljs/browser-errors";
11
+
12
+ /**
13
+ * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
14
+ */
15
+ export const BrowserAuthErrorMessages = {
16
+ [BrowserAuthErrorCodes.pkceNotCreated]:
17
+ "The PKCE code challenge and verifier could not be generated.",
18
+ [BrowserAuthErrorCodes.cryptoNonExistent]:
19
+ "The crypto object or function is not available.",
20
+ [BrowserAuthErrorCodes.emptyNavigateUri]:
21
+ "Navigation URI is empty. Please check stack trace for more info.",
22
+ [BrowserAuthErrorCodes.hashEmptyError]: `Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${ErrorLink}`,
23
+ [BrowserAuthErrorCodes.noStateInHash]:
24
+ "Hash does not contain state. Please verify that the request originated from msal.",
25
+ [BrowserAuthErrorCodes.hashDoesNotContainKnownProperties]: `Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${ErrorLink}`,
26
+ [BrowserAuthErrorCodes.unableToParseState]:
27
+ "Unable to parse state. Please verify that the request originated from msal.",
28
+ [BrowserAuthErrorCodes.stateInteractionTypeMismatch]:
29
+ "Hash contains state but the interaction type does not match the caller.",
30
+ [BrowserAuthErrorCodes.interactionInProgress]: `Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${ErrorLink}`,
31
+ [BrowserAuthErrorCodes.popupWindowError]:
32
+ "Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",
33
+ [BrowserAuthErrorCodes.emptyWindowError]:
34
+ "window.open returned null or undefined window object.",
35
+ [BrowserAuthErrorCodes.userCancelled]: "User cancelled the flow.",
36
+ [BrowserAuthErrorCodes.monitorPopupTimeout]: `Token acquisition in popup failed due to timeout. ${ErrorLink}`,
37
+ [BrowserAuthErrorCodes.monitorWindowTimeout]: `Token acquisition in iframe failed due to timeout. ${ErrorLink}`,
38
+ [BrowserAuthErrorCodes.redirectInIframe]:
39
+ "Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",
40
+ [BrowserAuthErrorCodes.blockIframeReload]: `Request was blocked inside an iframe because MSAL detected an authentication response. ${ErrorLink}`,
41
+ [BrowserAuthErrorCodes.blockNestedPopups]:
42
+ "Request was blocked inside a popup because MSAL detected it was running in a popup.",
43
+ [BrowserAuthErrorCodes.iframeClosedPrematurely]:
44
+ "The iframe being monitored was closed prematurely.",
45
+ [BrowserAuthErrorCodes.silentLogoutUnsupported]:
46
+ "Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",
47
+ [BrowserAuthErrorCodes.noAccountError]:
48
+ "No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",
49
+ [BrowserAuthErrorCodes.silentPromptValueError]:
50
+ "The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",
51
+ [BrowserAuthErrorCodes.noTokenRequestCacheError]:
52
+ "No token request found in cache.",
53
+ [BrowserAuthErrorCodes.unableToParseTokenRequestCacheError]:
54
+ "The cached token request could not be parsed.",
55
+ [BrowserAuthErrorCodes.noCachedAuthorityError]:
56
+ "No cached authority found.",
57
+ [BrowserAuthErrorCodes.authRequestNotSetError]:
58
+ "Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",
59
+ [BrowserAuthErrorCodes.invalidCacheType]: "Invalid cache type",
60
+ [BrowserAuthErrorCodes.nonBrowserEnvironment]:
61
+ "Login and token requests are not supported in non-browser environments.",
62
+ [BrowserAuthErrorCodes.databaseNotOpen]: "Database is not open!",
63
+ [BrowserAuthErrorCodes.noNetworkConnectivity]:
64
+ "No network connectivity. Check your internet connection.",
65
+ [BrowserAuthErrorCodes.postRequestFailed]:
66
+ "Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",
67
+ [BrowserAuthErrorCodes.getRequestFailed]:
68
+ "Network request failed. Please check the network trace to determine root cause.",
69
+ [BrowserAuthErrorCodes.failedToParseResponse]:
70
+ "Failed to parse network response. Check network trace.",
71
+ [BrowserAuthErrorCodes.unableToLoadToken]: "Error loading token to cache.",
72
+ [BrowserAuthErrorCodes.cryptoKeyNotFound]:
73
+ "Cryptographic Key or Keypair not found in browser storage.",
74
+ [BrowserAuthErrorCodes.authCodeRequired]:
75
+ "An authorization code must be provided (as the `code` property on the request) to this flow.",
76
+ [BrowserAuthErrorCodes.authCodeOrNativeAccountIdRequired]:
77
+ "An authorization code or nativeAccountId must be provided to this flow.",
78
+ [BrowserAuthErrorCodes.spaCodeAndNativeAccountIdPresent]:
79
+ "Request cannot contain both spa code and native account id.",
80
+ [BrowserAuthErrorCodes.databaseUnavailable]:
81
+ "IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",
82
+ [BrowserAuthErrorCodes.unableToAcquireTokenFromNativePlatform]: `Unable to acquire token from native platform. ${ErrorLink}`,
83
+ [BrowserAuthErrorCodes.nativeHandshakeTimeout]:
84
+ "Timed out while attempting to establish connection to browser extension",
85
+ [BrowserAuthErrorCodes.nativeExtensionNotInstalled]:
86
+ "Native extension is not installed. If you think this is a mistake call the initialize function.",
87
+ [BrowserAuthErrorCodes.nativeConnectionNotEstablished]: `Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${ErrorLink}`,
88
+ [BrowserAuthErrorCodes.uninitializedPublicClientApplication]: `You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,
89
+ [BrowserAuthErrorCodes.nativePromptNotSupported]:
90
+ "The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
91
+ };
92
+
93
+ /**
94
+ * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
95
+ * @deprecated Use BrowserAuthBrowserAuthErrorCodes instead
96
+ */
97
+ export const BrowserAuthErrorMessage = {
98
+ pkceNotGenerated: {
99
+ code: BrowserAuthErrorCodes.pkceNotCreated,
100
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.pkceNotCreated],
101
+ },
102
+ cryptoDoesNotExist: {
103
+ code: BrowserAuthErrorCodes.cryptoNonExistent,
104
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.cryptoNonExistent],
105
+ },
106
+ emptyNavigateUriError: {
107
+ code: BrowserAuthErrorCodes.emptyNavigateUri,
108
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.emptyNavigateUri],
109
+ },
110
+ hashEmptyError: {
111
+ code: BrowserAuthErrorCodes.hashEmptyError,
112
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.hashEmptyError],
113
+ },
114
+ hashDoesNotContainStateError: {
115
+ code: BrowserAuthErrorCodes.noStateInHash,
116
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.noStateInHash],
117
+ },
118
+ hashDoesNotContainKnownPropertiesError: {
119
+ code: BrowserAuthErrorCodes.hashDoesNotContainKnownProperties,
120
+ desc: BrowserAuthErrorMessages[
121
+ BrowserAuthErrorCodes.hashDoesNotContainKnownProperties
122
+ ],
123
+ },
124
+ unableToParseStateError: {
125
+ code: BrowserAuthErrorCodes.unableToParseState,
126
+ desc: BrowserAuthErrorMessages[
127
+ BrowserAuthErrorCodes.unableToParseState
128
+ ],
129
+ },
130
+ stateInteractionTypeMismatchError: {
131
+ code: BrowserAuthErrorCodes.stateInteractionTypeMismatch,
132
+ desc: BrowserAuthErrorMessages[
133
+ BrowserAuthErrorCodes.stateInteractionTypeMismatch
134
+ ],
135
+ },
136
+ interactionInProgress: {
137
+ code: BrowserAuthErrorCodes.interactionInProgress,
138
+ desc: BrowserAuthErrorMessages[
139
+ BrowserAuthErrorCodes.interactionInProgress
140
+ ],
141
+ },
142
+ popupWindowError: {
143
+ code: BrowserAuthErrorCodes.popupWindowError,
144
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.popupWindowError],
145
+ },
146
+ emptyWindowError: {
147
+ code: BrowserAuthErrorCodes.emptyWindowError,
148
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.emptyWindowError],
149
+ },
150
+ userCancelledError: {
151
+ code: BrowserAuthErrorCodes.userCancelled,
152
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.userCancelled],
153
+ },
154
+ monitorPopupTimeoutError: {
155
+ code: BrowserAuthErrorCodes.monitorPopupTimeout,
156
+ desc: BrowserAuthErrorMessages[
157
+ BrowserAuthErrorCodes.monitorPopupTimeout
158
+ ],
159
+ },
160
+ monitorIframeTimeoutError: {
161
+ code: BrowserAuthErrorCodes.monitorWindowTimeout,
162
+ desc: BrowserAuthErrorMessages[
163
+ BrowserAuthErrorCodes.monitorWindowTimeout
164
+ ],
165
+ },
166
+ redirectInIframeError: {
167
+ code: BrowserAuthErrorCodes.redirectInIframe,
168
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.redirectInIframe],
169
+ },
170
+ blockTokenRequestsInHiddenIframeError: {
171
+ code: BrowserAuthErrorCodes.blockIframeReload,
172
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.blockIframeReload],
173
+ },
174
+ blockAcquireTokenInPopupsError: {
175
+ code: BrowserAuthErrorCodes.blockNestedPopups,
176
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.blockNestedPopups],
177
+ },
178
+ iframeClosedPrematurelyError: {
179
+ code: BrowserAuthErrorCodes.iframeClosedPrematurely,
180
+ desc: BrowserAuthErrorMessages[
181
+ BrowserAuthErrorCodes.iframeClosedPrematurely
182
+ ],
183
+ },
184
+ silentLogoutUnsupportedError: {
185
+ code: BrowserAuthErrorCodes.silentLogoutUnsupported,
186
+ desc: BrowserAuthErrorMessages[
187
+ BrowserAuthErrorCodes.silentLogoutUnsupported
188
+ ],
189
+ },
190
+ noAccountError: {
191
+ code: BrowserAuthErrorCodes.noAccountError,
192
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.noAccountError],
193
+ },
194
+ silentPromptValueError: {
195
+ code: BrowserAuthErrorCodes.silentPromptValueError,
196
+ desc: BrowserAuthErrorMessages[
197
+ BrowserAuthErrorCodes.silentPromptValueError
198
+ ],
199
+ },
200
+ noTokenRequestCacheError: {
201
+ code: BrowserAuthErrorCodes.noTokenRequestCacheError,
202
+ desc: BrowserAuthErrorMessages[
203
+ BrowserAuthErrorCodes.noTokenRequestCacheError
204
+ ],
205
+ },
206
+ unableToParseTokenRequestCacheError: {
207
+ code: BrowserAuthErrorCodes.unableToParseTokenRequestCacheError,
208
+ desc: BrowserAuthErrorMessages[
209
+ BrowserAuthErrorCodes.unableToParseTokenRequestCacheError
210
+ ],
211
+ },
212
+ noCachedAuthorityError: {
213
+ code: BrowserAuthErrorCodes.noCachedAuthorityError,
214
+ desc: BrowserAuthErrorMessages[
215
+ BrowserAuthErrorCodes.noCachedAuthorityError
216
+ ],
217
+ },
218
+ authRequestNotSet: {
219
+ code: BrowserAuthErrorCodes.authRequestNotSetError,
220
+ desc: BrowserAuthErrorMessages[
221
+ BrowserAuthErrorCodes.authRequestNotSetError
222
+ ],
223
+ },
224
+ invalidCacheType: {
225
+ code: BrowserAuthErrorCodes.invalidCacheType,
226
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.invalidCacheType],
227
+ },
228
+ notInBrowserEnvironment: {
229
+ code: BrowserAuthErrorCodes.nonBrowserEnvironment,
230
+ desc: BrowserAuthErrorMessages[
231
+ BrowserAuthErrorCodes.nonBrowserEnvironment
232
+ ],
233
+ },
234
+ databaseNotOpen: {
235
+ code: BrowserAuthErrorCodes.databaseNotOpen,
236
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.databaseNotOpen],
237
+ },
238
+ noNetworkConnectivity: {
239
+ code: BrowserAuthErrorCodes.noNetworkConnectivity,
240
+ desc: BrowserAuthErrorMessages[
241
+ BrowserAuthErrorCodes.noNetworkConnectivity
242
+ ],
243
+ },
244
+ postRequestFailed: {
245
+ code: BrowserAuthErrorCodes.postRequestFailed,
246
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.postRequestFailed],
247
+ },
248
+ getRequestFailed: {
249
+ code: BrowserAuthErrorCodes.getRequestFailed,
250
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.getRequestFailed],
251
+ },
252
+ failedToParseNetworkResponse: {
253
+ code: BrowserAuthErrorCodes.failedToParseResponse,
254
+ desc: BrowserAuthErrorMessages[
255
+ BrowserAuthErrorCodes.failedToParseResponse
256
+ ],
257
+ },
258
+ unableToLoadTokenError: {
259
+ code: BrowserAuthErrorCodes.unableToLoadToken,
260
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.unableToLoadToken],
261
+ },
262
+ signingKeyNotFoundInStorage: {
263
+ code: BrowserAuthErrorCodes.cryptoKeyNotFound,
264
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.cryptoKeyNotFound],
265
+ },
266
+ authCodeRequired: {
267
+ code: BrowserAuthErrorCodes.authCodeRequired,
268
+ desc: BrowserAuthErrorMessages[BrowserAuthErrorCodes.authCodeRequired],
269
+ },
270
+ authCodeOrNativeAccountRequired: {
271
+ code: BrowserAuthErrorCodes.authCodeOrNativeAccountIdRequired,
272
+ desc: BrowserAuthErrorMessages[
273
+ BrowserAuthErrorCodes.authCodeOrNativeAccountIdRequired
274
+ ],
275
+ },
276
+ spaCodeAndNativeAccountPresent: {
277
+ code: BrowserAuthErrorCodes.spaCodeAndNativeAccountIdPresent,
278
+ desc: BrowserAuthErrorMessages[
279
+ BrowserAuthErrorCodes.spaCodeAndNativeAccountIdPresent
280
+ ],
281
+ },
282
+ databaseUnavailable: {
283
+ code: BrowserAuthErrorCodes.databaseUnavailable,
284
+ desc: BrowserAuthErrorMessages[
285
+ BrowserAuthErrorCodes.databaseUnavailable
286
+ ],
287
+ },
288
+ unableToAcquireTokenFromNativePlatform: {
289
+ code: BrowserAuthErrorCodes.unableToAcquireTokenFromNativePlatform,
290
+ desc: BrowserAuthErrorMessages[
291
+ BrowserAuthErrorCodes.unableToAcquireTokenFromNativePlatform
292
+ ],
293
+ },
294
+ nativeHandshakeTimeout: {
295
+ code: BrowserAuthErrorCodes.nativeHandshakeTimeout,
296
+ desc: BrowserAuthErrorMessages[
297
+ BrowserAuthErrorCodes.nativeHandshakeTimeout
298
+ ],
299
+ },
300
+ nativeExtensionNotInstalled: {
301
+ code: BrowserAuthErrorCodes.nativeExtensionNotInstalled,
302
+ desc: BrowserAuthErrorMessages[
303
+ BrowserAuthErrorCodes.nativeExtensionNotInstalled
304
+ ],
305
+ },
306
+ nativeConnectionNotEstablished: {
307
+ code: BrowserAuthErrorCodes.nativeConnectionNotEstablished,
308
+ desc: BrowserAuthErrorMessages[
309
+ BrowserAuthErrorCodes.nativeConnectionNotEstablished
310
+ ],
311
+ },
312
+ uninitializedPublicClientApplication: {
313
+ code: BrowserAuthErrorCodes.uninitializedPublicClientApplication,
314
+ desc: BrowserAuthErrorMessages[
315
+ BrowserAuthErrorCodes.uninitializedPublicClientApplication
316
+ ],
317
+ },
318
+ nativePromptNotSupported: {
319
+ code: BrowserAuthErrorCodes.nativePromptNotSupported,
320
+ desc: BrowserAuthErrorMessages[
321
+ BrowserAuthErrorCodes.nativePromptNotSupported
322
+ ],
323
+ },
324
+ };
325
+
326
+ /**
327
+ * Browser library error class thrown by the MSAL.js library for SPAs
328
+ */
329
+ export class BrowserAuthError extends AuthError {
330
+ constructor(errorCode: string) {
331
+ super(errorCode, BrowserAuthErrorMessages[errorCode]);
332
+
333
+ Object.setPrototypeOf(this, BrowserAuthError.prototype);
334
+ this.name = "BrowserAuthError";
335
+ }
336
+ }
337
+
338
+ export function createBrowserAuthError(errorCode: string): BrowserAuthError {
339
+ return new BrowserAuthError(errorCode);
340
+ }
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ export const pkceNotCreated = "pkce_not_created";
7
+ export const cryptoNonExistent = "crypto_nonexistent";
8
+ export const emptyNavigateUri = "empty_navigate_uri";
9
+ export const hashEmptyError = "hash_empty_error";
10
+ export const noStateInHash = "no_state_in_hash";
11
+ export const hashDoesNotContainKnownProperties =
12
+ "hash_does_not_contain_known_properties";
13
+ export const unableToParseState = "unable_to_parse_state";
14
+ export const stateInteractionTypeMismatch = "state_interaction_type_mismatch";
15
+ export const interactionInProgress = "interaction_in_progress";
16
+ export const popupWindowError = "popup_window_error";
17
+ export const emptyWindowError = "empty_window_error";
18
+ export const userCancelled = "user_cancelled";
19
+ export const monitorPopupTimeout = "monitor_popup_timeout";
20
+ export const monitorWindowTimeout = "monitor_window_timeout";
21
+ export const redirectInIframe = "redirect_in_iframe";
22
+ export const blockIframeReload = "block_iframe_reload";
23
+ export const blockNestedPopups = "block_nested_popups";
24
+ export const iframeClosedPrematurely = "iframe_closed_prematurely";
25
+ export const silentLogoutUnsupported = "silent_logout_unsupported";
26
+ export const noAccountError = "no_account_error";
27
+ export const silentPromptValueError = "silent_prompt_value_error";
28
+ export const noTokenRequestCacheError = "no_token_request_cache_error";
29
+ export const unableToParseTokenRequestCacheError =
30
+ "unable_to_parse_token_request_cache_error";
31
+ export const noCachedAuthorityError = "no_cached_authority_error";
32
+ export const authRequestNotSetError = "auth_request_not_set_error";
33
+ export const invalidCacheType = "invalid_cache_type";
34
+ export const nonBrowserEnvironment = "non_browser_environment";
35
+ export const databaseNotOpen = "database_not_open";
36
+ export const noNetworkConnectivity = "no_network_connectivity";
37
+ export const postRequestFailed = "post_request_failed";
38
+ export const getRequestFailed = "get_request_failed";
39
+ export const failedToParseResponse = "failed_to_parse_response";
40
+ export const unableToLoadToken = "unable_to_load_token";
41
+ export const cryptoKeyNotFound = "crypto_key_not_found";
42
+ export const authCodeRequired = "auth_code_required";
43
+ export const authCodeOrNativeAccountIdRequired =
44
+ "auth_code_or_nativeAccountId_required";
45
+ export const spaCodeAndNativeAccountIdPresent =
46
+ "spa_code_and_nativeAccountId_present";
47
+ export const databaseUnavailable = "database_unavailable";
48
+ export const unableToAcquireTokenFromNativePlatform =
49
+ "unable_to_acquire_token_from_native_platform";
50
+ export const nativeHandshakeTimeout = "native_handshake_timeout";
51
+ export const nativeExtensionNotInstalled = "native_extension_not_installed";
52
+ export const nativeConnectionNotEstablished =
53
+ "native_connection_not_established";
54
+ export const uninitializedPublicClientApplication =
55
+ "uninitialized_public_client_application";
56
+ export const nativePromptNotSupported = "native_prompt_not_supported";
@@ -0,0 +1,133 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { AuthError } from "@azure/msal-common";
7
+
8
+ /**
9
+ * BrowserAuthErrorMessage class containing string constants used by error codes and messages.
10
+ */
11
+ export const BrowserConfigurationAuthErrorMessage = {
12
+ redirectUriNotSet: {
13
+ code: "redirect_uri_empty",
14
+ desc: "A redirect URI is required for all calls, and none has been set.",
15
+ },
16
+ postLogoutUriNotSet: {
17
+ code: "post_logout_uri_empty",
18
+ desc: "A post logout redirect has not been set.",
19
+ },
20
+ storageNotSupportedError: {
21
+ code: "storage_not_supported",
22
+ desc: "Given storage configuration option was not supported.",
23
+ },
24
+ noRedirectCallbacksSet: {
25
+ code: "no_redirect_callbacks",
26
+ desc:
27
+ "No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. " +
28
+ "More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.",
29
+ },
30
+ invalidCallbackObject: {
31
+ code: "invalid_callback_object",
32
+ desc:
33
+ "The object passed for the callback was invalid. " +
34
+ "More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics.",
35
+ },
36
+ stubPcaInstanceCalled: {
37
+ code: "stubbed_public_client_application_called",
38
+ desc: "Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",
39
+ },
40
+ inMemRedirectUnavailable: {
41
+ code: "in_mem_redirect_unavailable",
42
+ desc: "Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true.",
43
+ },
44
+ entropyNotProvided: {
45
+ code: "entropy_not_provided",
46
+ desc: "The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option.",
47
+ },
48
+ };
49
+
50
+ /**
51
+ * Browser library error class thrown by the MSAL.js library for SPAs
52
+ */
53
+ export class BrowserConfigurationAuthError extends AuthError {
54
+ constructor(errorCode: string, errorMessage?: string) {
55
+ super(errorCode, errorMessage);
56
+ this.name = "BrowserConfigurationAuthError";
57
+
58
+ Object.setPrototypeOf(this, BrowserConfigurationAuthError.prototype);
59
+ }
60
+
61
+ /**
62
+ * Creates an error thrown when the redirect uri is empty (not set by caller)
63
+ */
64
+ static createRedirectUriEmptyError(): BrowserConfigurationAuthError {
65
+ return new BrowserConfigurationAuthError(
66
+ BrowserConfigurationAuthErrorMessage.redirectUriNotSet.code,
67
+ BrowserConfigurationAuthErrorMessage.redirectUriNotSet.desc
68
+ );
69
+ }
70
+
71
+ /**
72
+ * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)
73
+ */
74
+ static createPostLogoutRedirectUriEmptyError(): BrowserConfigurationAuthError {
75
+ return new BrowserConfigurationAuthError(
76
+ BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.code,
77
+ BrowserConfigurationAuthErrorMessage.postLogoutUriNotSet.desc
78
+ );
79
+ }
80
+
81
+ /**
82
+ * Creates error thrown when given storage location is not supported.
83
+ * @param givenStorageLocation
84
+ */
85
+ static createStorageNotSupportedError(
86
+ givenStorageLocation: string
87
+ ): BrowserConfigurationAuthError {
88
+ return new BrowserConfigurationAuthError(
89
+ BrowserConfigurationAuthErrorMessage.storageNotSupportedError.code,
90
+ `${BrowserConfigurationAuthErrorMessage.storageNotSupportedError.desc} Given Location: ${givenStorageLocation}`
91
+ );
92
+ }
93
+
94
+ /**
95
+ * Creates error thrown when redirect callbacks are not set before calling loginRedirect() or acquireTokenRedirect().
96
+ */
97
+ static createRedirectCallbacksNotSetError(): BrowserConfigurationAuthError {
98
+ return new BrowserConfigurationAuthError(
99
+ BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.code,
100
+ BrowserConfigurationAuthErrorMessage.noRedirectCallbacksSet.desc
101
+ );
102
+ }
103
+
104
+ /**
105
+ * Creates error thrown when the stub instance of PublicClientApplication is called.
106
+ */
107
+ static createStubPcaInstanceCalledError(): BrowserConfigurationAuthError {
108
+ return new BrowserConfigurationAuthError(
109
+ BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.code,
110
+ BrowserConfigurationAuthErrorMessage.stubPcaInstanceCalled.desc
111
+ );
112
+ }
113
+
114
+ /*
115
+ * Create an error thrown when in-memory storage is used and storeAuthStateInCookie=false.
116
+ */
117
+ static createInMemoryRedirectUnavailableError(): BrowserConfigurationAuthError {
118
+ return new BrowserConfigurationAuthError(
119
+ BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.code,
120
+ BrowserConfigurationAuthErrorMessage.inMemRedirectUnavailable.desc
121
+ );
122
+ }
123
+
124
+ /**
125
+ * Creates an error thrown when a crypto interface that requires entropy is initialized without entropy
126
+ */
127
+ static createEntropyNotProvided(): BrowserConfigurationAuthError {
128
+ return new BrowserConfigurationAuthError(
129
+ BrowserConfigurationAuthErrorMessage.entropyNotProvided.code,
130
+ BrowserConfigurationAuthErrorMessage.entropyNotProvided.desc
131
+ );
132
+ }
133
+ }