@auth0/auth0-spa-js 2.0.6 → 2.0.8
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 +10 -9
- 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 +10 -9
- package/dist/lib/auth0-spa-js.cjs.js.map +1 -1
- package/dist/typings/transaction-manager.d.ts +2 -2
- package/dist/typings/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Auth0Client.ts +2 -1
- package/src/transaction-manager.ts +11 -9
- 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.8";
|
|
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,24 +984,25 @@
|
|
|
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
|
-
this.transaction = this.storage.get(this.storageKey);
|
|
992
992
|
}
|
|
993
993
|
create(transaction) {
|
|
994
|
-
this.transaction = transaction;
|
|
995
994
|
this.storage.save(this.storageKey, transaction, {
|
|
996
|
-
daysUntilExpire: 1
|
|
995
|
+
daysUntilExpire: 1,
|
|
996
|
+
cookieDomain: this.cookieDomain
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
999
|
get() {
|
|
1000
|
-
return this.
|
|
1000
|
+
return this.storage.get(this.storageKey);
|
|
1001
1001
|
}
|
|
1002
1002
|
remove() {
|
|
1003
|
-
|
|
1004
|
-
|
|
1003
|
+
this.storage.remove(this.storageKey, {
|
|
1004
|
+
cookieDomain: this.cookieDomain
|
|
1005
|
+
});
|
|
1005
1006
|
}
|
|
1006
1007
|
}
|
|
1007
1008
|
const isNumber = n => typeof n === "number";
|
|
@@ -1436,7 +1437,7 @@
|
|
|
1436
1437
|
this.sessionCheckExpiryDays = options.sessionCheckExpiryDays || DEFAULT_SESSION_CHECK_EXPIRY_DAYS;
|
|
1437
1438
|
const transactionStorage = options.useCookiesForTransactions ? this.cookieStorage : SessionStorage;
|
|
1438
1439
|
this.scope = getUniqueScopes("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : "");
|
|
1439
|
-
this.transactionManager = new TransactionManager(transactionStorage, this.options.clientId);
|
|
1440
|
+
this.transactionManager = new TransactionManager(transactionStorage, this.options.clientId, this.options.cookieDomain);
|
|
1440
1441
|
this.nowProvider = this.options.nowProvider || DEFAULT_NOW_PROVIDER;
|
|
1441
1442
|
this.cacheManager = new CacheManager(cache, !cache.allKeys ? new CacheKeyManifest(cache, this.options.clientId) : undefined, this.nowProvider);
|
|
1442
1443
|
this.domainUrl = getDomain(this.options.domain);
|