@azure/msal-browser
Advanced tools
Comparing version 2.15.0 to 2.16.0
@@ -5,2 +5,51 @@ { | ||
{ | ||
"date": "Thu, 22 Jul 2021 22:50:22 GMT", | ||
"tag": "@azure/msal-browser_v2.16.0", | ||
"version": "2.16.0", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Add fix for loginRedirect failure when angular index.html base href is different from the origin (#3875)", | ||
"author": "rishanthakumar@gmail.com", | ||
"commit": "9da0b3f92216367d68bdb7fea74cd9050d202a76", | ||
"package": "@azure/msal-browser" | ||
}, | ||
{ | ||
"comment": "fix: fixing the npm audit issues", | ||
"author": "samuelkamau@microsoft.com", | ||
"commit": "9b19470078b65bedf2b69246ba764b32b533a268", | ||
"package": "@azure/msal-browser" | ||
}, | ||
{ | ||
"comment": "Expose isInPopup helper function #3825", | ||
"author": "thomas.norling@microsoft.com", | ||
"commit": "45e51762597ffde61d70a9e085e77893b339d0e1", | ||
"package": "@azure/msal-browser" | ||
} | ||
], | ||
"none": [ | ||
{ | ||
"comment": "Add support for prompt=create #3773", | ||
"author": "joarroyo@microsoft.com", | ||
"commit": "c9314cedfe08b643e43e358243dc7f49253f77ef", | ||
"package": "@azure/msal-browser" | ||
} | ||
], | ||
"minor": [ | ||
{ | ||
"comment": "Msal-Browser supports parallel silent requests #3837", | ||
"author": "joarroyo@microsoft.com", | ||
"commit": "3d6a01191deb3fa1da722b4362d52535c350ddd7", | ||
"package": "@azure/msal-browser" | ||
}, | ||
{ | ||
"comment": "Persist active account #3755", | ||
"author": "thomas.norling@microsoft.com", | ||
"commit": "db59cc072e50f201f09e03a09a1b7b8355e10ee1", | ||
"package": "@azure/msal-browser" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Mon, 28 Jun 2021 23:39:48 GMT", | ||
@@ -7,0 +56,0 @@ "tag": "@azure/msal-browser_v2.15.0", |
# Change Log - @azure/msal-browser | ||
This log was last generated on Mon, 28 Jun 2021 23:39:48 GMT and should not be manually modified. | ||
This log was last generated on Thu, 22 Jul 2021 22:50:22 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 2.16.0 | ||
Thu, 22 Jul 2021 22:50:22 GMT | ||
### Minor changes | ||
- Msal-Browser supports parallel silent requests #3837 (joarroyo@microsoft.com) | ||
- Persist active account #3755 (thomas.norling@microsoft.com) | ||
### Patches | ||
- Add fix for loginRedirect failure when angular index.html base href is different from the origin (#3875) (rishanthakumar@gmail.com) | ||
- fix: fixing the npm audit issues (samuelkamau@microsoft.com) | ||
- Expose isInPopup helper function #3825 (thomas.norling@microsoft.com) | ||
## 2.15.0 | ||
@@ -8,0 +23,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /*! ***************************************************************************** |
@@ -22,3 +22,2 @@ import { Authority, CommonAuthorizationCodeRequest, AuthorizationCodeClient, AccountInfo, ServerTelemetryManager, SilentFlowClient, ClientConfiguration, BaseAuthRequest, INetworkModule, AuthenticationResult, Logger, RefreshTokenClient, CommonSilentFlowRequest, CommonEndSessionRequest, ICrypto } from "@azure/msal-common"; | ||
protected isBrowserEnvironment: boolean; | ||
private activeLocalAccountId; | ||
private wrapperSKU; | ||
@@ -25,0 +24,0 @@ private wrapperVer; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js'; |
@@ -13,2 +13,3 @@ import { AuthenticationResult } from "@azure/msal-common"; | ||
export declare class PublicClientApplication extends ClientApplication implements IPublicClientApplication { | ||
private activeSilentTokenRequests; | ||
/** | ||
@@ -55,3 +56,3 @@ * @constructor | ||
/** | ||
* Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token. | ||
* Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made. | ||
* | ||
@@ -62,3 +63,10 @@ * @param {@link (SilentRequest:type)} | ||
acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult>; | ||
/** | ||
* Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token. | ||
* @param {@link (SilentRequest:type)} | ||
* @param {@link (AccountInfo:type)} | ||
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} | ||
*/ | ||
private acquireTokenSilentAsync; | ||
} | ||
//# sourceMappingURL=PublicClientApplication.d.ts.map |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -42,3 +42,5 @@ import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js'; | ||
function PublicClientApplication(configuration) { | ||
return _super.call(this, configuration) || this; | ||
var _this = _super.call(this, configuration) || this; | ||
_this.activeSilentTokenRequests = new Map(); | ||
return _this; | ||
} | ||
@@ -74,3 +76,3 @@ /** | ||
/** | ||
* Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token. | ||
* Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made. | ||
* | ||
@@ -82,12 +84,52 @@ * @param {@link (SilentRequest:type)} | ||
return __awaiter(this, void 0, void 0, function () { | ||
var account, silentRequest, browserRequestLogger, serverTelemetryManager, silentAuthClient, cachedToken, tokenRenewalResult, tokenRenewalError_1; | ||
var account, thumbprint, silentRequestKey, cachedResponse, response; | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
this.preflightBrowserEnvironmentCheck(InteractionType.Silent); | ||
this.logger.verbose("acquireTokenSilent called", request.correlationId); | ||
account = request.account || this.getActiveAccount(); | ||
if (!account) { | ||
throw BrowserAuthError.createNoAccountError(); | ||
} | ||
thumbprint = { | ||
clientId: this.config.auth.clientId, | ||
authority: request.authority || "", | ||
scopes: request.scopes, | ||
homeAccountIdentifier: account.homeAccountId | ||
}; | ||
silentRequestKey = JSON.stringify(thumbprint); | ||
cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey); | ||
if (typeof cachedResponse === "undefined") { | ||
this.logger.verbose("acquireTokenSilent called for the first time, storing active request", request.correlationId); | ||
response = this.acquireTokenSilentAsync(request, account) | ||
.then(function (result) { | ||
_this.activeSilentTokenRequests.delete(silentRequestKey); | ||
return result; | ||
}) | ||
.catch(function (error) { | ||
_this.activeSilentTokenRequests.delete(silentRequestKey); | ||
throw error; | ||
}); | ||
this.activeSilentTokenRequests.set(silentRequestKey, response); | ||
return [2 /*return*/, response]; | ||
} | ||
else { | ||
this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call", request.correlationId); | ||
return [2 /*return*/, cachedResponse]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
* Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token. | ||
* @param {@link (SilentRequest:type)} | ||
* @param {@link (AccountInfo:type)} | ||
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} | ||
*/ | ||
PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var silentRequest, browserRequestLogger, serverTelemetryManager, silentAuthClient, cachedToken, tokenRenewalResult, tokenRenewalError_1; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
this.preflightBrowserEnvironmentCheck(InteractionType.Silent); | ||
this.logger.verbose("acquireTokenSilent called", request.correlationId); | ||
account = request.account || this.getActiveAccount(); | ||
if (!account) { | ||
throw BrowserAuthError.createNoAccountError(); | ||
} | ||
silentRequest = __assign(__assign(__assign({}, request), this.initializeBaseRequest(request)), { account: account, forceRefresh: request.forceRefresh || false }); | ||
@@ -94,0 +136,0 @@ browserRequestLogger = this.logger.clone(name, version, silentRequest.correlationId); |
@@ -131,2 +131,16 @@ import { CommonAuthorizationCodeRequest, ICrypto, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, CacheManager, ServerTelemetryEntity, ThrottlingEntity, Logger, AuthorityMetadataEntity, AccountInfo } from "@azure/msal-common"; | ||
/** | ||
* Gets the active account | ||
*/ | ||
getActiveAccount(): AccountInfo | null; | ||
/** | ||
* Sets the active account's localAccountId in cache | ||
* @param account | ||
*/ | ||
setActiveAccount(account: AccountInfo | null): void; | ||
/** | ||
* Gets a list of accounts that match all of the filters provided | ||
* @param account | ||
*/ | ||
getAccountInfoByFilter(accountFilter: Partial<Omit<AccountInfo, "idTokenClaims" | "name">>): AccountInfo[]; | ||
/** | ||
* fetch throttling entity from the platform cache | ||
@@ -133,0 +147,0 @@ * @param throttlingCacheKey |
@@ -1,5 +0,5 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
import { __extends, __spread } from '../_virtual/_tslib.js'; | ||
import { DEFAULT_CRYPTO_IMPLEMENTATION, AccountEntity, CacheManager, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, AuthorityMetadataEntity, ThrottlingEntity, Constants, StringUtils, PersistentCacheKeys, ProtocolUtils, CcsCredentialType } from '@azure/msal-common'; | ||
import { DEFAULT_CRYPTO_IMPLEMENTATION, AccountEntity, CacheManager, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, AuthorityMetadataEntity, PersistentCacheKeys, ThrottlingEntity, Constants, StringUtils, ProtocolUtils, CcsCredentialType } from '@azure/msal-common'; | ||
import { BrowserAuthError } from '../error/BrowserAuthError.js'; | ||
@@ -334,2 +334,53 @@ import { BrowserCacheLocation, TemporaryCacheKeys } from '../utils/BrowserConstants.js'; | ||
/** | ||
* Gets the active account | ||
*/ | ||
BrowserCacheManager.prototype.getActiveAccount = function () { | ||
var activeAccountIdKey = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT); | ||
var activeAccountId = this.browserStorage.getItem(activeAccountIdKey); | ||
if (!activeAccountId) { | ||
return null; | ||
} | ||
return this.getAccountInfoByFilter({ localAccountId: activeAccountId })[0] || null; | ||
}; | ||
/** | ||
* Sets the active account's localAccountId in cache | ||
* @param account | ||
*/ | ||
BrowserCacheManager.prototype.setActiveAccount = function (account) { | ||
var activeAccountIdKey = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT); | ||
if (account) { | ||
this.logger.verbose("setActiveAccount: Active account set"); | ||
this.browserStorage.setItem(activeAccountIdKey, account.localAccountId); | ||
} | ||
else { | ||
this.logger.verbose("setActiveAccount: No account passed, active account not set"); | ||
this.browserStorage.removeItem(activeAccountIdKey); | ||
} | ||
}; | ||
/** | ||
* Gets a list of accounts that match all of the filters provided | ||
* @param account | ||
*/ | ||
BrowserCacheManager.prototype.getAccountInfoByFilter = function (accountFilter) { | ||
var allAccounts = this.getAllAccounts(); | ||
return allAccounts.filter(function (accountObj) { | ||
if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) { | ||
return false; | ||
} | ||
if (accountFilter.homeAccountId && accountFilter.homeAccountId !== accountObj.homeAccountId) { | ||
return false; | ||
} | ||
if (accountFilter.localAccountId && accountFilter.localAccountId !== accountObj.localAccountId) { | ||
return false; | ||
} | ||
if (accountFilter.tenantId && accountFilter.tenantId !== accountObj.tenantId) { | ||
return false; | ||
} | ||
if (accountFilter.environment && accountFilter.environment !== accountObj.environment) { | ||
return false; | ||
} | ||
return true; | ||
}); | ||
}; | ||
/** | ||
* fetch throttling entity from the platform cache | ||
@@ -336,0 +387,0 @@ * @param throttlingCacheKey |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __assign } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { MathUtils } from '../utils/MathUtils.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { BrowserStringUtils } from '../utils/BrowserStringUtils.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { BrowserStringUtils } from '../utils/BrowserStringUtils.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { EventType } from './EventType.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ export { PublicClientApplication } from './app/PublicClientApplication.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { __awaiter, __generator } from '../_virtual/_tslib.js'; |
export declare const name = "@azure/msal-browser"; | ||
export declare const version = "2.15.0"; | ||
export declare const version = "2.16.0"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
@@ -1,8 +0,8 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
/* eslint-disable header/header */ | ||
var name = "@azure/msal-browser"; | ||
var version = "2.15.0"; | ||
var version = "2.16.0"; | ||
export { name, version }; | ||
//# sourceMappingURL=packageMetadata.js.map |
@@ -17,2 +17,3 @@ import { CommonAuthorizationUrlRequest } from "@azure/msal-common"; | ||
* select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account | ||
* create: will direct the user to the account creation experience instead of the log in experience | ||
* - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. | ||
@@ -19,0 +20,0 @@ * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. |
@@ -17,2 +17,3 @@ import { CommonAuthorizationUrlRequest } from "@azure/msal-common"; | ||
* select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account | ||
* create: will direct the user to the account creation experience instead of the log in experience | ||
* - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. | ||
@@ -19,0 +20,0 @@ * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. |
@@ -17,2 +17,3 @@ import { CommonAuthorizationUrlRequest } from "@azure/msal-common"; | ||
* select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account | ||
* create: will direct the user to the account creation experience instead of the log in experience | ||
* - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim. | ||
@@ -19,0 +20,0 @@ * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens. |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { OIDC_DEFAULT_SCOPES } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { StringUtils, ProtocolUtils, ClientAuthError, UrlString } from '@azure/msal-common'; |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -20,2 +20,6 @@ import { INetworkModule } from "@azure/msal-common"; | ||
/** | ||
* Returns boolean of whether or not the current window is a popup opened by msal | ||
*/ | ||
static isInPopup(): boolean; | ||
/** | ||
* Returns current window URL as redirect uri | ||
@@ -22,0 +26,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -7,3 +7,3 @@ import { Constants, UrlString } from '@azure/msal-common'; | ||
import { BrowserAuthError } from '../error/BrowserAuthError.js'; | ||
import { InteractionType, BrowserConstants } from './BrowserConstants.js'; | ||
import { BrowserConstants, InteractionType } from './BrowserConstants.js'; | ||
@@ -29,3 +29,3 @@ /* | ||
// Full removes "#" from url | ||
contentWindow.history.replaceState(null, Constants.EMPTY_STRING, "" + contentWindow.location.pathname + contentWindow.location.search); | ||
contentWindow.history.replaceState(null, Constants.EMPTY_STRING, "" + contentWindow.location.origin + contentWindow.location.pathname + contentWindow.location.search); | ||
} | ||
@@ -47,2 +47,11 @@ }; | ||
}; | ||
/** | ||
* Returns boolean of whether or not the current window is a popup opened by msal | ||
*/ | ||
BrowserUtils.isInPopup = function () { | ||
return typeof window !== "undefined" && !!window.opener && | ||
window.opener !== window && | ||
typeof window.name === "string" && | ||
window.name.indexOf(BrowserConstants.POPUP_NAME_PREFIX + ".") === 0; | ||
}; | ||
// #endregion | ||
@@ -102,3 +111,3 @@ /** | ||
// Popups opened by msal popup APIs are given a name that starts with "msal." | ||
if (window.opener && window.opener !== window && typeof window.name === "string" && window.name.indexOf(BrowserConstants.POPUP_NAME_PREFIX + ".") === 0) { | ||
if (BrowserUtils.isInPopup()) { | ||
throw BrowserAuthError.createBlockAcquireTokenInPopupsError(); | ||
@@ -105,0 +114,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
/*! @azure/msal-browser v2.15.0 2021-06-29 */ | ||
/*! @azure/msal-browser v2.16.0 2021-07-22 */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ import { StringUtils, Constants } from '@azure/msal-common'; |
@@ -13,3 +13,3 @@ { | ||
}, | ||
"version": "2.15.0", | ||
"version": "2.16.0", | ||
"description": "Microsoft Authentication Library for js", | ||
@@ -88,4 +88,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@azure/msal-common": "^4.4.0" | ||
"@azure/msal-common": "^4.5.0" | ||
} | ||
} |
@@ -0,0 +0,0 @@ # Microsoft Authentication Library for JavaScript (MSAL.js) 2.0 for Browser-Based Single-Page Applications |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4030747
33076
Updated@azure/msal-common@^4.5.0