1 | # Change Log - msal
|
2 |
|
3 | This log was last generated on Mon, 01 May 2023 20:47:42 GMT and should not be manually modified.
|
4 |
|
5 |
|
6 |
|
7 | ## 1.4.18
|
8 |
|
9 | Mon, 01 May 2023 20:47:42 GMT
|
10 |
|
11 | ### Patches
|
12 |
|
13 | - Update polycheck version, rename Blacklist params (#5901) (sameera.gajjarapu@microsoft.com)
|
14 |
|
15 | ## 1.4.17
|
16 |
|
17 | Mon, 01 Aug 2022 22:22:36 GMT
|
18 |
|
19 | ### Patches
|
20 |
|
21 | - Use login_hint claim over sid/upn for msal v1 #4995 (janutter@microsoft.com)
|
22 |
|
23 | ## 1.4.16
|
24 |
|
25 | Tue, 08 Feb 2022 00:41:07 GMT
|
26 |
|
27 | ### Patches
|
28 |
|
29 | - Improve reliability of interaction_in_progress #4466 (thomas.norling@microsoft.com)
|
30 |
|
31 | ## 1.4.15
|
32 |
|
33 | Mon, 01 Nov 2021 23:53:22 GMT
|
34 |
|
35 | ### Patches
|
36 |
|
37 | - Remove fallback logic for iframe creation in msal-core #4182 (janutter@microsoft.com)
|
38 |
|
39 | ## 1.4.14
|
40 |
|
41 | Mon, 04 Oct 2021 23:12:35 GMT
|
42 |
|
43 | ### Patches
|
44 |
|
45 | - Export library version #4124 (thomas.norling@microsoft.com)
|
46 |
|
47 | ## 1.4.13
|
48 |
|
49 | Tue, 07 Sep 2021 23:22:24 GMT
|
50 |
|
51 | ### Patches
|
52 |
|
53 | - Throw interaction in progress if any msal instance has interaction in progress #4014 (thomas.norling@microsoft.com)
|
54 |
|
55 | ## 1.4.12
|
56 |
|
57 | Thu, 22 Jul 2021 22:50:22 GMT
|
58 |
|
59 | ### Patches
|
60 |
|
61 | - Fix bug causing acquireTokenSilent to hang and never return #3867 (thomas.norling@microsoft.com)
|
62 |
|
63 | ## 1.4.11
|
64 |
|
65 | Wed, 12 May 2021 18:35:03 GMT
|
66 |
|
67 | ### Patches
|
68 |
|
69 | - Remove idtoken hash from browser history in msal-core #3587 (hemoral@microsoft.com)
|
70 |
|
71 | ## 1.4.10
|
72 |
|
73 | Thu, 22 Apr 2021 23:26:08 GMT
|
74 |
|
75 | ### Patches
|
76 |
|
77 | - Encode control characters in cookies set by MSAL.js v1 #3469 (janutter@microsoft.com)
|
78 | - Add .browserslistrc #3471 (thomas.norling@microsoft.com)
|
79 |
|
80 | ## 1.4.9
|
81 |
|
82 | Wed, 31 Mar 2021 22:25:57 GMT
|
83 |
|
84 | ### Patches
|
85 |
|
86 | - Fix token cache for /consumers authority #3327 (thomas.norling@microsoft.com)
|
87 |
|
88 | ## 1.4.8
|
89 |
|
90 | Mon, 15 Mar 2021 23:45:17 GMT
|
91 |
|
92 | ### Patches
|
93 |
|
94 | - Dont migrate tokens for different clientId #3188 (thomas.norling@microsoft.com)
|
95 |
|
96 | ## 1.4.7
|
97 |
|
98 | Wed, 03 Mar 2021 21:47:05 GMT
|
99 |
|
100 | ### Patches
|
101 |
|
102 | - Fix lib version on request (#3080) (thomas.norling@microsoft.com)
|
103 |
|
104 | ## 1.4.6
|
105 |
|
106 | Tue, 09 Feb 2021 01:48:22 GMT
|
107 |
|
108 | ### Patches
|
109 |
|
110 | - Fix version.json import errors (#2993) (thomas.norling@microsoft.com)
|
111 |
|
112 | ## 1.4.5
|
113 |
|
114 | Tue, 02 Feb 2021 01:56:47 GMT
|
115 |
|
116 | ### Patches
|
117 |
|
118 | - Get package version from version.json (#2915) (thomas.norling@microsoft.com)
|
119 |
|
120 | ## 1.4.4
|
121 |
|
122 | Wed, 11 Nov 2020 23:33:20 GMT
|
123 |
|
124 | ### Patches
|
125 |
|
126 | - Fix multiple matching tokens error (#2582) (thomas.norling@microsoft.com)
|
127 |
|
128 | ## 1.4.3
|
129 |
|
130 | Thu, 29 Oct 2020 20:36:48 GMT
|
131 |
|
132 | ### Patches
|
133 |
|
134 | - Fix ID token matching logic to ignore non-JSON cache keys (#2510) (hemoral@microsoft.com)
|
135 | - Ensure history.replaceState is a function (janutter@microsoft.com)
|
136 |
|
137 | ## 1.4.2
|
138 |
|
139 | Tue, 20 Oct 2020 23:47:28 GMT
|
140 |
|
141 | ### Patches
|
142 |
|
143 | - Fix issue where concurrent acquireTokenSilent call closed window used by acquireTokenPopup (#2355) (hemoral@microsoft.com)
|
144 | - Use history API to clear hash to remove # sign (janutter@microsoft.com)
|
145 | - Fix issues with ID token caching and cache lookup (#2376) (hemoral@microsoft.com)
|
146 |
|
147 | ## 1.4.1
|
148 |
|
149 | Wed, 30 Sep 2020 17:58:33 GMT
|
150 |
|
151 | ### Patches
|
152 |
|
153 | - Fix ID Token cache lookup. PR #2206 (hemoral@microsoft.com)
|
154 |
|
155 | ## 1.4.0
|
156 |
|
157 | Tue, 25 Aug 2020 00:40:45 GMT
|
158 |
|
159 | ### Minor changes
|
160 |
|
161 | - B2C Multiple Policy Support (#1757) (thomas.norling@microsoft.com)
|
162 | - ADFS 2019 Support (#1668) (thomas.l.norling@gmail.com)
|
163 | - Enables idToken acquisition in acquireToken API calls through the use of OIDC scopes by redefining the way response_type is determined. (PR #2022) (hemoral@microsoft.com)
|
164 |
|
165 | # 1.3.4
|
166 |
|
167 | ## Bugs
|
168 | * Fix lowercase scopes issue (#1945)
|
169 | * Fix Redirect Error Callback (#1942)
|
170 | * Replace /organizations with tenant ID in replaceTenantPath (#1974)
|
171 | * Fix cache miss when common authority is provided (#2015)
|
172 | * Fix back button behavior (#2081)
|
173 |
|
174 | # 1.3.3
|
175 |
|
176 | ## Enhancements
|
177 | * Add monitorIframeForHash to ensure silent requests timeout. (#1823)
|
178 | * Use instance discovery for trusted hosts and combine authority classes. ([#1583](https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/1583)
|
179 | * Add custom authority lookup. (#1836)
|
180 | * Ensure cookies are minimal size and deleted when necessary. (#1829)
|
181 | * Logging improvements. (#1777, #1767, #1752)
|
182 |
|
183 | # 1.3.2
|
184 |
|
185 | ## Bugs
|
186 | * Ensure decoding query parameters doesnt remove plus signs twice. (#1746)
|
187 | * Fix popup about:blank errors. (#1667)
|
188 | * Fix processing and redirection of acquireTokenRedirect. (#1758)
|
189 |
|
190 | ## Enhancements
|
191 | * Remove url from timeout error message, move to errorPii logger. (#1686)
|
192 | * Add onRedirectNavigate callback to stop navigatation and get redirect url. (#1691)
|
193 | * Allow applications to bypass network request for OpenID configuration. (#1578)
|
194 | * Extend acquireTokenSilent Instrumentation. (#1629)
|
195 | * Add performance instrumentation to TelemetryManager events. (#1643)
|
196 |
|
197 | # 1.3.1
|
198 |
|
199 | ## Bugs
|
200 |
|
201 | * Prevent adding unnecessary entries into browser history. (#1577)
|
202 | * Add aria-hidden to hidden iframes. (#1581)
|
203 | * Fix regression for redirect URIs that included query strings. (#1604)
|
204 |
|
205 | # 1.3.0
|
206 |
|
207 | ## Features
|
208 | * Add ssoSilent API (#1166)
|
209 |
|
210 | ## Enhancements
|
211 | * Turn library state into encoded string that contains guid and timestamp. (#1395)
|
212 | * Fix behavior of `handleRedirectCallback`, and make it no longer required. (#1358)
|
213 | * `domain_hint` is no longer supported in silent calls or when `sid` or `login_hint` is passed. (#1299)
|
214 | * Update the framename to reflect authority and scopes (#1267)
|
215 | * Switch to file-based sourcemaps for msal.js and msal.min.js (#1525)
|
216 | * Set sideEffects to false to enable better tree-shaking (#1526)
|
217 | * Add TelemetryManager to public APIs (#1399)
|
218 |
|
219 | ## Bugs
|
220 | * Ensure responses from redirect requests are always processed. (#1413)
|
221 | * Ensure state is decoded before it is processed. (#1456)
|
222 | * B2C Authority Fixes. (#1276)
|
223 | * Check if request is null in populateQueryParams (#1531)
|
224 | * Fix token caching for acquireToken calls (#1516)
|
225 | * Unblock popup scrolling for IE11 (#1426)
|
226 |
|
227 | # 1.2.2
|
228 |
|
229 | ## Features
|
230 | * Add `setLogger` function to `UserAgentApplication`. (#1251)
|
231 |
|
232 | ## Enhancements
|
233 | * Render hidden iframes synchronously if `navigateFrameWait` is set to `0`. (#1278)
|
234 | * Add `redirectStartPage` property to `AuthenticationParameters` to allow apps to indicate which page triggered the redirect. (#1343)
|
235 |
|
236 | ## Bugs
|
237 | * Properly remove temporary cache entries. (#1339)
|
238 | * Always send back the accessToken and scopes if the response includes them. (#1351)
|
239 | * Ensure silent operations timeout if the iframe never returns to the app domain. (#1354)
|
240 | * Ensure hidden iframes are properly removed. (#1415)
|
241 |
|
242 | ## Logging / Telemetry
|
243 | * Add telemetry for `acquireTokenSilent`. (#1388)
|
244 |
|
245 | # 1.2.1
|
246 |
|
247 | ## Bugs
|
248 | * `urlContainsHash()` is restored as a public API (#1202)
|
249 | * `allow-forms` added in sandbox properties for the iframes created by `msal js` to support certain B2C scenarios(#1191)
|
250 |
|
251 | ## Enhancements
|
252 | * `isAngular` flag removal from `redirect` use cases(#1193)
|
253 |
|
254 | # 1.2.0
|
255 |
|
256 | ## Features:
|
257 | * Iframes Support added (#939, #975, #1053, #1075); msal js now added support for authentication in applications embedded in iframes which implies that an application can now call `loginSilent()`, `acquireTokenSilent()` and `acquireTokenPopup()` from iframes.
|
258 | * `redirectUri` supported as a request parameter (#1116); This feature in conjunction with iframes support improves performance, by providing the application the capability to avoid a full reload of a SPA on redirect. Please refer to the [sample](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/VanillaJSTestApp/index_blankPageRedirectUri.html) in the release [notes](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-JS-1.2.0) for the usage details
|
259 | * Multiple Instances (#980, #1010)
|
260 | * Cache changes - to support iframes, multiple instances and other enhancements (#983, #1042, #1067)
|
261 | * fromCache flag added in response to indicate cache vs network response for a request (#1114)
|
262 | * Instance Aware support (#969)
|
263 |
|
264 | ## Bugs
|
265 | * `request.correlationId` is now passed to the service (#1083)
|
266 | * response_mode explicitly set to fragment for all use cases (#1090)
|
267 | * verbose messages and monitoring for timeout errors (#1098, #1113)
|
268 | * handle `loginRedirect` set to null (#1047)
|
269 | * Fix japanese decoding (#1036, #1054)
|
270 | * Fix Unified cache, Redirect and B2C samples (#933, #959, #1027, #973)
|
271 | * Change `location.replace` to `location.assign` to support history in redirect APIs (#1002)
|
272 |
|
273 | ## Dev tools
|
274 | * linting added (#931, #935, #947)
|
275 | * CI/CD pipeline (#924)
|
276 | * Removed karma from UT and migrate completely to mocha/chai (#956)
|
277 | * Added Code coverage, introduce coveralls (#972, #1105)
|
278 | * Fix unit tests for unix environments (#977)
|
279 | * Move samples to top level (#987)
|
280 | * Added SRI tags to CDN files (#1020, #1024, #1030)
|
281 |
|
282 | ## Documentation
|
283 | * Simplify root readme file (#1004)
|
284 | * Remove generated doc files from repo, deploy them to Github Pages (#1131)
|
285 |
|
286 | # 1.1.3
|
287 | * Introduction of Azure Pipelines (#912)
|
288 | * Removing uuid library that is incompatible with ES6 modules (#878)
|
289 | * Update lerna dependency to resolve to safe version of lodash (#910)
|
290 | * Refactoring (#886)
|
291 |
|
292 | # 1.1.2
|
293 | * Minor fixes to docs and samples (#859, #857, #757)
|
294 | * Fixes issue where scope object was being mutated (#875)
|
295 | * Fixes issue where token type wasn't being set correctly when renewing id token (#873)
|
296 | * Refactoring (#805, #806)
|
297 |
|
298 | # 1.1.1
|
299 | * Fixed an issue where cacheLocation was no longer accepting string values (#862)
|
300 |
|
301 | # 1.1.0
|
302 | * Core
|
303 | * idTokenClaims has been added to the API surface in AuthResponse and Account (#804)
|
304 | * Added forceRefresh parameter to request object, which will force acquireTokenSilent to fetch tokens from cache (#823)
|
305 | * Added scaffolding for telemetry (#737, #802, #840)
|
306 | * The full telemetry feature will be available in a future release
|
307 | * Fixed issue where server was sending a null errorDesc which caused a problem in error response processing (#811)
|
308 | * MSAL.js now throws a ServerError when the user chooses not to grant consent or clicks back in multi-account selection
|
309 | * Updating the comments in Configuration.ts to show the correct parameters (#780)
|
310 | * CacheLocation changed to enum to avoid type widening (#851)
|
311 | * MSAL.js sends log messages when removing sid and login_hint from extraQueryParameters (#781)
|
312 | * Improved formatting and docs in README and issue template (#789, #793, #795)
|
313 | * Fixed bug where expiresIn was not calculating correctly (#799)
|
314 | * Fixed issue where errors did not display for failed redirect login attempts in the React sample. (#820)
|
315 | * Fixed `npm audit` security warnings (#828)
|
316 | * Updated references to `cloud.microsoft.com` since domain no longer works properly (#830)
|
317 | * AcquireToken APIs throw empty request errors when given null or empty request objects (#831)
|
318 | * Switched from tslint to eslint for linting configuration (#849)
|
319 | * Removed dependency on base64-js package due to incompatability with ES modules, removed unused encoding functions (#826)
|
320 | * Refactoring (#792)
|
321 |
|
322 | * Other Updates
|
323 | * Fixed issues with Angular and Angular-JS samples (#813)
|
324 |
|
325 | # 1.0.2
|
326 | * Fixed broken link in docs for error message and module docs (#731)
|
327 | * Fix typo in README (#743, #749)
|
328 | * Update lerna version (#748)
|
329 | * Fix Interaction_Required error to throw on all interaction_required error types (#753)
|
330 | * Added a react sample (#727)
|
331 | * Fix for bug preventing asynchronous acquireTokenSilent calls (#768)
|
332 |
|
333 | # 1.0.1
|
334 | * Fixed bug where navigateToLoginRequestURL = false would cause callback to not fire (#696)
|
335 | * Fixed bug where null request object would cause null pointer exception for state parameter (#698)
|
336 | * All msal related cache items are deleted on logout (#709)
|
337 | * Fixed bug where "user cancelled" error in acquireTokenPopup would not throw (#707)
|
338 | * Logout endpoint now uses the given EndSessionEndpoint from the oauth discovery endpoint response (#716)
|
339 | * Now uses base64.js instead of window.atob (#712)
|
340 | * Fixed bug where login_hint was added if sid was already populated. (#700)
|
341 |
|
342 | # 1.0.0
|
343 | * Formal release of msal-1.0.0 which includes all the msal-1.0.0-preview.x changes.
|
344 | * Includes breaking API Changes - please find the details @https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-preview-api-release
|
345 |
|
346 | # 1.0.0-preview.5
|
347 | * Error First Callbacks PR #658
|
348 | * Claims Request Support PR #664
|
349 | * loginInProgress() as a public function #671
|
350 | * 'state' moved from config to request, returning the user state if passed stripping the GUID #674 #679 #681
|
351 | * cache cleanup of all values (keys cleanup will be done in next release) #675
|
352 | * made loading iFrame timeout in silent calls configurable, 'navigateFrameWait' #676
|
353 | * readme updated with latest code patterns #672
|
354 |
|
355 | # 1.0.0-preview.4
|
356 | Add dist back into npm package as a valid build artifact
|
357 |
|
358 | # 1.0.0-preview.3
|
359 | Add a hook in package.json to build msal js before npm publish to have the libraries up to date
|
360 |
|
361 | # 1.0.0-preview.2
|
362 | ## Bug Fixes
|
363 |
|
364 | * Fix for the multiple_authorities issue seen due to non Canonalized authority storage in cache PR #656
|
365 | * Populate scopes from cache for getCachedToken Response object PR #657.
|
366 | * ES6 modules are added back into the npm #654
|
367 |
|
368 | # 1.0.0-preview.1
|
369 | ## Bug Fixes
|
370 |
|
371 | * Fix dependencies for non typescript environments
|
372 |
|
373 | # 1.0.0-preview.0
|
374 | ## New Features (Breaking Changes)
|
375 |
|
376 | As announced earlier @https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-preview-changes we are excited to announce the preview release.
|
377 |
|
378 | ### Release notes:
|
379 |
|
380 | #### Configuration
|
381 | * Initialization of the MSAL JS library – We introduced a 'Configuration' object that can be sent through the constructor of UserAgentApplication() class.
|
382 |
|
383 | ##### Configuration datatype :
|
384 |
|
385 | ```javascript
|
386 | // make CacheStorage a fixed type to limit it to specific inputs
|
387 | type storage = "localStorage" | "sessionStorage";
|
388 |
|
389 | // Protocol Support
|
390 | export type AuthOptions = {
|
391 | clientId: string;
|
392 | authority?: string;
|
393 | validateAuthority?: boolean;
|
394 | redirectUri?: string | (() => string);
|
395 | postLogoutRedirectUri?: string | (() => string);
|
396 | state?: string;
|
397 | navigateToLoginRequestUrl?: boolean;
|
398 | };
|
399 |
|
400 | // Cache Support
|
401 | export type CacheOptions = {
|
402 | cacheLocation?: CacheLocation;
|
403 | storeAuthStateInCookie?: boolean;
|
404 | };
|
405 |
|
406 | // Library support
|
407 | export type SystemOptions = {
|
408 | logger?: Logger;
|
409 | loadFrameTimeout?: number;
|
410 | tokenRenewalOffsetSeconds?: number;
|
411 | };
|
412 |
|
413 | // Developer App Environment Support
|
414 | export type FrameworkOptions = {
|
415 | isAngular?: boolean;
|
416 | unprotectedResources?: Array<string>;
|
417 | protectedResourceMap?: Map<string, Array<string>>;
|
418 | };
|
419 |
|
420 | // Configuration Object
|
421 | export type Configuration = {
|
422 | auth: AuthOptions,
|
423 | cache?: CacheOptions,
|
424 | system?: SystemOptions,
|
425 | framework?: FrameworkOptions
|
426 | };
|
427 | ```
|
428 |
|
429 | ##### Example Config object:
|
430 |
|
431 | ```javascript
|
432 | var config = {
|
433 | auth: {
|
434 | clientId: applicationConfig.clientID,
|
435 | authority: applicationConfig.authority,
|
436 | validateAuthority: true
|
437 | },
|
438 | cache: {
|
439 | cacheLocation: "localStorage",
|
440 | storeAuthStateInCookie: true
|
441 | },
|
442 | system: {
|
443 | logger: devLogger
|
444 | }
|
445 | };
|
446 | ```
|
447 |
|
448 | ##### Before (<= 0.2.4)
|
449 |
|
450 | ```javascript
|
451 | // initialize the MSAL JS configuration options
|
452 | var myMSALObj = new Msal.UserAgentApplication(
|
453 | applicationConfig.clientID,
|
454 | applicationConfig.authority,
|
455 | acquireTokenRedirectCallBack,
|
456 | {storeAuthStateInCookie: true, cacheLocation: "localStorage"}
|
457 | );
|
458 | ```
|
459 | ##### After (>= 1.0.0-preview.0)
|
460 |
|
461 | ```javascript
|
462 | // initialize the configuration object
|
463 | var config = {
|
464 | auth: {
|
465 | clientId: applicationConfig.clientID,
|
466 | authority: applicationConfig.authority,
|
467 | validateAuthority: true
|
468 | },
|
469 | cache: {
|
470 | cacheLocation: "localStorage",
|
471 | storeAuthStateInCookie: true
|
472 | }
|
473 | };
|
474 |
|
475 | // initialize the MSAL JS with a configuration object
|
476 | var myMSALObj = new Msal.UserAgentApplication(config);
|
477 |
|
478 | // register redirect call backs : for Success and Error
|
479 | myMSALObj.handleRedirectCallbacks(acquireTokenRedirectCallBack, acquireTokenErrorRedirectCallBack);
|
480 | ```
|
481 |
|
482 | #### Request Object
|
483 |
|
484 | * 'Request' object is introduced for all login/accessToken calls, this replaces previous overloading of login/acquireToken calls.
|
485 | * Users can choose to pass optional parameters to finetune their requests for authentication and authorization.
|
486 | * 'User' object is now replaced with 'Account' => the public API getUser() is now getAccount() with more enhanced data.
|
487 |
|
488 | ###### Request Object datatype
|
489 |
|
490 | ```javascript
|
491 | export type QPDict = {[key: string]: string};
|
492 |
|
493 | // Request type
|
494 | export type AuthenticationParameters = {
|
495 | scopes?: Array<string>;
|
496 | extraScopesToConsent?: Array<string>;
|
497 | prompt?: string;
|
498 | extraQueryParameters?: QPDict;
|
499 | claimsRequest?: null;
|
500 | authority?: string;
|
501 | correlationId?: string;
|
502 | account?: Account;
|
503 | sid?: string;
|
504 | loginHint?: string;
|
505 | };
|
506 |
|
507 | // Account Class
|
508 | export class Account {
|
509 |
|
510 | accountIdentifier: string;
|
511 | homeAccountIdentifier: string;
|
512 | userName: string;
|
513 | name: string;
|
514 | idToken: Object;
|
515 | sid: string;
|
516 | environment: string;
|
517 |
|
518 | ....
|
519 | }
|
520 | ```
|
521 | ##### Before (<= 0.2.4)
|
522 |
|
523 | ```javascript
|
524 | // login request
|
525 | loginPopup(applicationConfig.graphScopes);
|
526 |
|
527 | ```
|
528 |
|
529 | ##### After (>= 1.0.0-preview.0)
|
530 |
|
531 | ```javascript
|
532 |
|
533 | let loginRequest = {
|
534 | scopes: applicationConfig.graphScopes
|
535 | };
|
536 |
|
537 | loginPopup(loginRequest).then(function (loginResponse) {
|
538 | //Login Success
|
539 | }).catch(function (error) {
|
540 | console.log(error);
|
541 | });
|
542 | ```
|
543 |
|
544 | #### Response Object
|
545 | * 'Response' and 'Error' objects are introduced for server responses and app failures
|
546 | - For 'Redirect' usecases, explicit success and failure call backs should be passed to 'handleRedirectCallbacks()'.
|
547 | - For 'Popup' and 'Silent' usecases, a promise pattern i.e.,' .then and .catch' can be used.
|
548 |
|
549 | ###### Response Object datatype
|
550 |
|
551 | ```javascript
|
552 | export type AuthResponse = {
|
553 | uniqueId: string;
|
554 | tenantId: string;
|
555 | tokenType: string;
|
556 | idToken: IdToken;
|
557 | accessToken: string;
|
558 | scopes: Array<string>;
|
559 | expiresOn: Date;
|
560 | account: Account;
|
561 | accountState: string;
|
562 | };
|
563 | ```
|
564 |
|
565 | ###### Error Object datatype
|
566 | - Note: Error objects are better classified and messaged with this release. Detailed documentation for Error Handling will be added soon.
|
567 |
|
568 | ```javascript
|
569 | export class AuthError extends Error {
|
570 | errorCode: string;
|
571 | errorMessage: string;
|
572 | ...
|
573 | }
|
574 | ```
|
575 |
|
576 | ##### Before (<= 0.2.4)
|
577 | ```javascript
|
578 |
|
579 | // Login using Popup
|
580 | function signIn() {
|
581 | myMSALObj.loginPopup(applicationConfig.graphScopes).then(function (idToken) { ... }
|
582 | }
|
583 |
|
584 | // Request for Access Token
|
585 | myMSALObj.acquireTokenSilent(applicationConfig.graphScopes).then(function (accessToken) {
|
586 | callMSGraph(applicationConfig.graphEndpoint, accessToken, graphAPICallback);
|
587 | }, function (error) {
|
588 | console.log(error);
|
589 | // Call acquireTokenPopup (popup window) in case of acquireTokenSilent failure due to consent or interaction required ONLY
|
590 | if (error.indexOf("consent_required") !== -1 || error.indexOf("interaction_required") !== -1 || error.indexOf("login_required") !== -1) {
|
591 | myMSALObj.acquireTokenPopup(applicationConfig.graphScopes).then(function (accessToken) {
|
592 | callMSGraph(applicationConfig.graphEndpoint, accessToken, graphAPICallback);
|
593 | }, function (error) {
|
594 | console.log(error);
|
595 | });
|
596 | }
|
597 | });
|
598 | ```
|
599 |
|
600 | ##### After (>= 1.0.0-preview.0)
|
601 |
|
602 | ```javascript
|
603 | myMSALObj = new UserAgentApplication(config);
|
604 |
|
605 | // Login
|
606 | loginPopup(loginRequest).then(function(response) {
|
607 | var idToken = response.idToken;
|
608 | // etc.
|
609 | }).catch(function(error) {
|
610 | // Catches any rejects thrown by loginPopup. Also catches errors thrown the above 'then' block
|
611 | if (error.ClientConfigurationError) {
|
612 | // Error with configuration, please check your parameters.
|
613 | } else if (error instanceof ClientAuthError) {
|
614 | // authentication could not be completed due to protocol error, browser error or already in progress
|
615 | } else if (error instanceof ServerError) {
|
616 | // server may be temporarily unavailable, or the request that was sent was invalid or not acceptable. Please check error returned and retry.
|
617 | } else {
|
618 | // Unexpected error, console.log and report on Github or StackOverflow
|
619 | }
|
620 | });
|
621 |
|
622 | // access token
|
623 | acquireTokenPopup(tokenRequest).then(function(response) {
|
624 | var idToken = response.idToken;
|
625 | var accessToken = response.accessToken;
|
626 | // etc.
|
627 | }).catch(function(error) {
|
628 | // Catches any rejects thrown by loginPopup. Also catches errors thrown the above 'then' block
|
629 | if (error.ClientConfigurationError) {
|
630 | // Error with configuration, please check your parameters.
|
631 | } else if (error instanceof ClientAuthError) {
|
632 | // authentication could not be completed due to protocol error, browser error or already in progress
|
633 | } else if (error instanceof ServerError) {
|
634 | // server may be temporarily unavailable, or the request that was sent was invalid or not acceptable. Please check error returned and retry.
|
635 | } else {
|
636 | // Unexpected error, console.log and report on Github or StackOverflow
|
637 | }
|
638 | });
|
639 | ```
|
640 |
|
641 | We will follow up with a detailed blog post and a Quickstart Application soon with these changes.
|
642 |
|
643 |
|
644 | # 0.2.4
|
645 | ## New Features
|
646 | * Unified Cache - This is to support migration from ADAL.js to MSAL.js. If your app is currently using ADAL.js and if user already has an existing session there, when your app migrates to MSAL.js,
|
647 | MSAL.js will do a Silent login.
|
648 | * Removal of prompt-select account - Removes prompt parameter from interactive login and acquireToken requests. acquireTokenSilent will continue to pass prompt=none.
|
649 | * End-to-end testing for msal-core
|
650 | * Support for redirect URI as a function
|
651 |
|
652 | # 0.2.3
|
653 | ## New Features
|
654 | * Single Sign on
|
655 | * IE and edge bug fix if navigateToLoginRequestUrl=false (cookies not deleted)
|
656 | * IE and edge bug fix for login_popup (state mismatch)
|
657 | * User state not passed to callback if navigateToLoginrequestUrl = false
|
658 | * Added sample app for single sign on
|
659 |
|
660 |
|
661 | # 0.2.2
|
662 | ## New Features
|
663 | * Added support to handle the issue of the session storage and local storage getting cleared in IE and edge browsers during redirects across different security zones. This can be enabled by setting storeAuthStateInCookie flag in config to true. Default value is false.
|
664 | https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/347
|
665 |
|
666 |
|
667 | # 0.2.1
|
668 | ## New Features
|
669 | * Added State parameter in login request. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/262
|
670 |
|
671 | * Removed istanbul code coverage due to webpack bundle size issue.
|
672 |
|
673 | # 0.2.0
|
674 | ## New Features
|
675 | Moved npmjs package to @azure/msal
|
676 |
|
677 | # 0.1.9
|
678 | ## New Features
|
679 |
|
680 | * Fixed bug to use acquireTokenRedirect to call your own APIS. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/333
|
681 | * Fixed bug to delete temporary cache entries in cases of errors. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/327
|
682 |
|
683 |
|
684 | # 0.1.7
|
685 | ## New Features
|
686 |
|
687 | * Fixed bug with resolveAuthority in acquireTokenSilent. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/322
|
688 | * Fixed bug with window.opener for cases when app is opened due to a click event. https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/318
|
689 |
|
690 | # 0.1.6
|
691 | ## New Features
|
692 |
|
693 | * Fixed bug with concurrent acquireToken requests. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/274
|
694 | * Added catchHandler for authority validation
|
695 | * Fixed bug to handle the case for id_token with special characters.
|
696 |
|
697 | # 0.1.5
|
698 | ## Breaking Changes
|
699 |
|
700 | * The constructor function in Msal is no longer asynchronous. To use the instance of userAgentApplication in the callback function passed in the constructor, use "this" in the calback function scope. Please see below:
|
701 | ```
|
702 | var userAgentApplication = new Msal.UserAgentApplication(applicationConfig.clientID, null, authCallback);
|
703 | function authCallback(errorDesc, token, error, tokenType) {
|
704 | console.log(userAgentApplication) //this will print undefined, use this instead
|
705 | var self = this// self is instance of userAgentApplication
|
706 | }
|
707 | ```
|
708 |
|
709 | ## New Features
|
710 |
|
711 | * By default, msal tries to take you back to the loginStartPage after successful authentication. To disable this setting, you can pass navigateToLoginRequestUrl:false
|
712 | in the options object in the constructor. In that case, msal will just set the url hash to null and call the provided callback, thereby avoiding an additional reload. Please see snippet below:
|
713 | ```
|
714 | var userAgentApplication = new Msal.UserAgentApplication(applicationConfig.clientID, null, authCallback, { navigateToLoginRequestUrl:false });
|
715 | ```
|
716 | * The idToken object is now added as a property on user object in msal which can be used to query claims and the User class itself is exported under the global namespace.
|
717 | * loadFrameTimout(msec) is now configurable by setting it to a value in the options object passed to the userAgentApplication contructor. The default timeout is 6000 msec. Please see the snippet below to change it:
|
718 | ```
|
719 | var userAgentApplication = new Msal.UserAgentApplication(applicationConfig.clientID, null, authCallback, { loadFrameTimout:10000 });
|
720 | ```
|
721 |
|
722 | # 0.1.4-beta
|
723 |
|
724 | ## Bug Fixes
|
725 |
|
726 | * Test version
|
727 |
|
728 | # 0.1.3
|
729 |
|
730 | ## Bug Fixes
|
731 |
|
732 | * Added ability to import msal as es-5 or es-6 module.
|
733 | * Added webpack to create a umd bundle with a global variable Msal exported to the window object.
|
734 | * Fixed bug related to browser refresh.
|
735 | * Set user object from cache if available before every acquireToken request.
|
736 | * Enable logging by passing a logger in the constructor function.
|
737 |
|
738 | # 0.1.2
|
739 | ## Bug Fixes
|
740 | * Fixed bug with renewal of id_token.
|
741 | * Added support for multiple asynchronous acquireToken requests.
|
742 | * Added "user_cancelled" event for popup window.
|
743 |
|
744 | # 0.1.1
|
745 | ## Bug Fixes
|
746 | * Fix browser specific issues.
|
747 |
|
748 | # 0.1.0
|
749 | Preview Release
|