@azure/msal-browser 3.7.0 → 3.7.1

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 (86) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/app/PublicClientNext.mjs +1 -1
  4. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
  5. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  6. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  7. package/dist/cache/BrowserCacheManager.mjs +1 -1
  8. package/dist/cache/BrowserStorage.mjs +1 -1
  9. package/dist/cache/CryptoKeyStore.mjs +1 -1
  10. package/dist/cache/DatabaseStorage.mjs +1 -1
  11. package/dist/cache/MemoryStorage.mjs +1 -1
  12. package/dist/cache/TokenCache.d.ts.map +1 -1
  13. package/dist/cache/TokenCache.mjs +3 -2
  14. package/dist/cache/TokenCache.mjs.map +1 -1
  15. package/dist/config/Configuration.mjs +1 -1
  16. package/dist/controllers/ControllerFactory.mjs +1 -1
  17. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  18. package/dist/controllers/StandardController.d.ts.map +1 -1
  19. package/dist/controllers/StandardController.mjs +9 -3
  20. package/dist/controllers/StandardController.mjs.map +1 -1
  21. package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
  22. package/dist/crypto/BrowserCrypto.mjs +1 -1
  23. package/dist/crypto/CryptoOps.mjs +1 -1
  24. package/dist/crypto/PkceGenerator.mjs +1 -1
  25. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  26. package/dist/encode/Base64Decode.mjs +1 -1
  27. package/dist/encode/Base64Encode.mjs +1 -1
  28. package/dist/error/BrowserAuthError.mjs +1 -1
  29. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  30. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  31. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  32. package/dist/error/NativeAuthError.mjs +1 -1
  33. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  34. package/dist/error/NestedAppAuthError.mjs +1 -1
  35. package/dist/event/EventHandler.mjs +1 -1
  36. package/dist/event/EventMessage.mjs +1 -1
  37. package/dist/event/EventType.mjs +1 -1
  38. package/dist/index.mjs +1 -1
  39. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  40. package/dist/interaction_client/BaseInteractionClient.mjs +4 -7
  41. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  42. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  43. package/dist/interaction_client/NativeInteractionClient.mjs +1 -1
  44. package/dist/interaction_client/PopupClient.mjs +1 -1
  45. package/dist/interaction_client/RedirectClient.mjs +1 -1
  46. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  47. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  48. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  49. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  50. package/dist/interaction_client/StandardInteractionClient.mjs +2 -2
  51. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  52. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  53. package/dist/interaction_handler/RedirectHandler.mjs +1 -1
  54. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  55. package/dist/naa/BridgeError.mjs +1 -1
  56. package/dist/naa/BridgeProxy.mjs +1 -1
  57. package/dist/naa/BridgeStatusCode.mjs +1 -1
  58. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  59. package/dist/navigation/NavigationClient.mjs +1 -1
  60. package/dist/network/FetchClient.mjs +1 -1
  61. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  62. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  63. package/dist/operatingcontext/TeamsAppOperatingContext.mjs +1 -1
  64. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  65. package/dist/packageMetadata.d.ts +1 -1
  66. package/dist/packageMetadata.mjs +2 -2
  67. package/dist/request/SilentRequest.d.ts +1 -0
  68. package/dist/request/SilentRequest.d.ts.map +1 -1
  69. package/dist/response/ResponseHandler.mjs +1 -1
  70. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  71. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  72. package/dist/utils/BrowserConstants.mjs +1 -1
  73. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  74. package/dist/utils/BrowserUtils.mjs +1 -1
  75. package/lib/msal-browser.cjs +126 -599
  76. package/lib/msal-browser.cjs.map +1 -1
  77. package/lib/msal-browser.js +126 -599
  78. package/lib/msal-browser.js.map +1 -1
  79. package/lib/msal-browser.min.js +66 -66
  80. package/package.json +2 -2
  81. package/src/cache/TokenCache.ts +3 -1
  82. package/src/controllers/StandardController.ts +8 -2
  83. package/src/interaction_client/BaseInteractionClient.ts +6 -18
  84. package/src/interaction_client/StandardInteractionClient.ts +2 -2
  85. package/src/packageMetadata.ts +1 -1
  86. package/src/request/SilentRequest.ts +1 -0
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js.git"
12
12
  },
13
- "version": "3.7.0",
13
+ "version": "3.7.1",
14
14
  "description": "Microsoft Authentication Library for js",
15
15
  "keywords": [
16
16
  "implicit",
@@ -101,6 +101,6 @@
101
101
  "typescript": "^4.9.5"
102
102
  },
103
103
  "dependencies": {
104
- "@azure/msal-common": "14.6.0"
104
+ "@azure/msal-common": "14.6.1"
105
105
  }
106
106
  }
@@ -31,6 +31,7 @@ import {
31
31
  } from "../error/BrowserAuthError";
32
32
  import { AuthenticationResult } from "../response/AuthenticationResult";
33
33
  import { base64Decode } from "../encode/Base64Decode";
34
+ import * as BrowserCrypto from "../crypto/BrowserCrypto";
34
35
 
35
36
  export type LoadTokenOptions = {
36
37
  clientInfo?: string;
@@ -142,7 +143,8 @@ export class TokenCache implements ITokenCache {
142
143
  this.config.system.networkClient,
143
144
  this.storage,
144
145
  authorityOptions,
145
- this.logger
146
+ this.logger,
147
+ request.correlationId || BrowserCrypto.createNewGuid()
146
148
  );
147
149
 
148
150
  // "clientInfo" from options takes precedence over "clientInfo" in response
@@ -1950,7 +1950,10 @@ export class StandardController implements IController {
1950
1950
  throw error;
1951
1951
  });
1952
1952
  this.activeSilentTokenRequests.set(silentRequestKey, response);
1953
- return response;
1953
+ return {
1954
+ ...(await response),
1955
+ state: request.state,
1956
+ };
1954
1957
  } else {
1955
1958
  this.logger.verbose(
1956
1959
  "acquireTokenSilent has been called previously, returning the result from the first call",
@@ -1958,7 +1961,10 @@ export class StandardController implements IController {
1958
1961
  );
1959
1962
  // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics
1960
1963
  atsMeasurement.discard();
1961
- return cachedResponse;
1964
+ return {
1965
+ ...(await cachedResponse),
1966
+ state: request.state,
1967
+ };
1962
1968
  }
1963
1969
  }
1964
1970
 
@@ -279,28 +279,16 @@ export abstract class BaseInteractionClient {
279
279
  authorityMetadata: this.config.auth.authorityMetadata,
280
280
  };
281
281
 
282
- if (requestAuthority) {
283
- this.logger.verbose(
284
- "Creating discovered authority with request authority"
285
- );
286
- return AuthorityFactory.createDiscoveredInstance(
287
- requestAuthority,
288
- this.config.system.networkClient,
289
- this.browserStorage,
290
- authorityOptions,
291
- this.logger
292
- );
293
- }
294
-
295
- this.logger.verbose(
296
- "Creating discovered authority with configured authority"
297
- );
282
+ const authority = requestAuthority || this.config.auth.authority;
283
+ this.logger.verbose(`Creating discovered authority with ${authority}`);
298
284
  return AuthorityFactory.createDiscoveredInstance(
299
- this.config.auth.authority,
285
+ authority,
300
286
  this.config.system.networkClient,
301
287
  this.browserStorage,
302
288
  authorityOptions,
303
- this.logger
289
+ this.logger,
290
+ this.correlationId,
291
+ this.performanceClient
304
292
  );
305
293
  }
306
294
  }
@@ -331,8 +331,8 @@ export abstract class StandardInteractionClient extends BaseInteractionClient {
331
331
  this.browserStorage,
332
332
  authorityOptions,
333
333
  this.logger,
334
- this.performanceClient,
335
- this.correlationId
334
+ this.correlationId,
335
+ this.performanceClient
336
336
  );
337
337
  }
338
338
 
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable header/header */
2
2
  export const name = "@azure/msal-browser";
3
- export const version = "3.7.0";
3
+ export const version = "3.7.1";
@@ -45,5 +45,6 @@ export type SilentRequest = Omit<
45
45
  forceRefresh?: boolean;
46
46
  cacheLookupPolicy?: CacheLookupPolicy;
47
47
  prompt?: string;
48
+ state?: string;
48
49
  tokenBodyParameters?: StringDict;
49
50
  };