@auth0/auth0-spa-js 2.0.6 → 2.0.7
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.
- package/dist/auth0-spa-js.development.js +9 -5
- package/dist/auth0-spa-js.development.js.map +1 -1
- package/dist/auth0-spa-js.production.esm.js +1 -1
- package/dist/auth0-spa-js.production.esm.js.map +1 -1
- package/dist/auth0-spa-js.production.js +1 -1
- package/dist/auth0-spa-js.production.js.map +1 -1
- package/dist/lib/auth0-spa-js.cjs.js +9 -5
- package/dist/lib/auth0-spa-js.cjs.js.map +1 -1
- package/dist/typings/transaction-manager.d.ts +2 -1
- package/dist/typings/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Auth0Client.ts +2 -1
- package/src/transaction-manager.ts +6 -3
- package/src/version.ts +1 -1
|
@@ -481,7 +481,7 @@ var browserTabsLock = createCommonjsModule((function(module, exports) {
|
|
|
481
481
|
|
|
482
482
|
var Lock = unwrapExports(browserTabsLock);
|
|
483
483
|
|
|
484
|
-
var version = "2.0.
|
|
484
|
+
var version = "2.0.7";
|
|
485
485
|
|
|
486
486
|
const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
|
|
487
487
|
|
|
@@ -1050,16 +1050,18 @@ class CacheManager {
|
|
|
1050
1050
|
const TRANSACTION_STORAGE_KEY_PREFIX = "a0.spajs.txs";
|
|
1051
1051
|
|
|
1052
1052
|
class TransactionManager {
|
|
1053
|
-
constructor(storage, clientId) {
|
|
1053
|
+
constructor(storage, clientId, cookieDomain) {
|
|
1054
1054
|
this.storage = storage;
|
|
1055
1055
|
this.clientId = clientId;
|
|
1056
|
+
this.cookieDomain = cookieDomain;
|
|
1056
1057
|
this.storageKey = `${TRANSACTION_STORAGE_KEY_PREFIX}.${this.clientId}`;
|
|
1057
1058
|
this.transaction = this.storage.get(this.storageKey);
|
|
1058
1059
|
}
|
|
1059
1060
|
create(transaction) {
|
|
1060
1061
|
this.transaction = transaction;
|
|
1061
1062
|
this.storage.save(this.storageKey, transaction, {
|
|
1062
|
-
daysUntilExpire: 1
|
|
1063
|
+
daysUntilExpire: 1,
|
|
1064
|
+
cookieDomain: this.cookieDomain
|
|
1063
1065
|
});
|
|
1064
1066
|
}
|
|
1065
1067
|
get() {
|
|
@@ -1067,7 +1069,9 @@ class TransactionManager {
|
|
|
1067
1069
|
}
|
|
1068
1070
|
remove() {
|
|
1069
1071
|
delete this.transaction;
|
|
1070
|
-
this.storage.remove(this.storageKey
|
|
1072
|
+
this.storage.remove(this.storageKey, {
|
|
1073
|
+
cookieDomain: this.cookieDomain
|
|
1074
|
+
});
|
|
1071
1075
|
}
|
|
1072
1076
|
}
|
|
1073
1077
|
|
|
@@ -1536,7 +1540,7 @@ class Auth0Client {
|
|
|
1536
1540
|
this.sessionCheckExpiryDays = options.sessionCheckExpiryDays || DEFAULT_SESSION_CHECK_EXPIRY_DAYS;
|
|
1537
1541
|
const transactionStorage = options.useCookiesForTransactions ? this.cookieStorage : SessionStorage;
|
|
1538
1542
|
this.scope = getUniqueScopes("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : "");
|
|
1539
|
-
this.transactionManager = new TransactionManager(transactionStorage, this.options.clientId);
|
|
1543
|
+
this.transactionManager = new TransactionManager(transactionStorage, this.options.clientId, this.options.cookieDomain);
|
|
1540
1544
|
this.nowProvider = this.options.nowProvider || DEFAULT_NOW_PROVIDER;
|
|
1541
1545
|
this.cacheManager = new CacheManager(cache, !cache.allKeys ? new CacheKeyManifest(cache, this.options.clientId) : undefined, this.nowProvider);
|
|
1542
1546
|
this.domainUrl = getDomain(this.options.domain);
|