@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
|
@@ -472,7 +472,7 @@
|
|
|
472
472
|
exports.default = SuperTokensLock;
|
|
473
473
|
}));
|
|
474
474
|
var Lock = unwrapExports(browserTabsLock);
|
|
475
|
-
var version = "2.0.
|
|
475
|
+
var version = "2.0.7";
|
|
476
476
|
const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
|
|
477
477
|
const DEFAULT_POPUP_CONFIG_OPTIONS = {
|
|
478
478
|
timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
|
|
@@ -984,16 +984,18 @@
|
|
|
984
984
|
}
|
|
985
985
|
const TRANSACTION_STORAGE_KEY_PREFIX = "a0.spajs.txs";
|
|
986
986
|
class TransactionManager {
|
|
987
|
-
constructor(storage, clientId) {
|
|
987
|
+
constructor(storage, clientId, cookieDomain) {
|
|
988
988
|
this.storage = storage;
|
|
989
989
|
this.clientId = clientId;
|
|
990
|
+
this.cookieDomain = cookieDomain;
|
|
990
991
|
this.storageKey = `${TRANSACTION_STORAGE_KEY_PREFIX}.${this.clientId}`;
|
|
991
992
|
this.transaction = this.storage.get(this.storageKey);
|
|
992
993
|
}
|
|
993
994
|
create(transaction) {
|
|
994
995
|
this.transaction = transaction;
|
|
995
996
|
this.storage.save(this.storageKey, transaction, {
|
|
996
|
-
daysUntilExpire: 1
|
|
997
|
+
daysUntilExpire: 1,
|
|
998
|
+
cookieDomain: this.cookieDomain
|
|
997
999
|
});
|
|
998
1000
|
}
|
|
999
1001
|
get() {
|
|
@@ -1001,7 +1003,9 @@
|
|
|
1001
1003
|
}
|
|
1002
1004
|
remove() {
|
|
1003
1005
|
delete this.transaction;
|
|
1004
|
-
this.storage.remove(this.storageKey
|
|
1006
|
+
this.storage.remove(this.storageKey, {
|
|
1007
|
+
cookieDomain: this.cookieDomain
|
|
1008
|
+
});
|
|
1005
1009
|
}
|
|
1006
1010
|
}
|
|
1007
1011
|
const isNumber = n => typeof n === "number";
|
|
@@ -1436,7 +1440,7 @@
|
|
|
1436
1440
|
this.sessionCheckExpiryDays = options.sessionCheckExpiryDays || DEFAULT_SESSION_CHECK_EXPIRY_DAYS;
|
|
1437
1441
|
const transactionStorage = options.useCookiesForTransactions ? this.cookieStorage : SessionStorage;
|
|
1438
1442
|
this.scope = getUniqueScopes("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : "");
|
|
1439
|
-
this.transactionManager = new TransactionManager(transactionStorage, this.options.clientId);
|
|
1443
|
+
this.transactionManager = new TransactionManager(transactionStorage, this.options.clientId, this.options.cookieDomain);
|
|
1440
1444
|
this.nowProvider = this.options.nowProvider || DEFAULT_NOW_PROVIDER;
|
|
1441
1445
|
this.cacheManager = new CacheManager(cache, !cache.allKeys ? new CacheKeyManifest(cache, this.options.clientId) : undefined, this.nowProvider);
|
|
1442
1446
|
this.domainUrl = getDomain(this.options.domain);
|