@auth0/auth0-spa-js 2.18.1 → 2.18.2
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 +2 -65
- 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 +2 -65
- package/dist/lib/auth0-spa-js.cjs.js.map +1 -1
- package/dist/typings/Auth0Client.d.ts +439 -0
- package/dist/typings/Auth0Client.utils.d.ts +90 -0
- package/dist/typings/MyAccountApiClient.d.ts +92 -0
- package/dist/typings/TokenExchange.d.ts +77 -0
- package/dist/typings/api.d.ts +2 -0
- package/dist/typings/cache/cache-localstorage.d.ts +7 -0
- package/dist/typings/cache/cache-manager.d.ts +56 -0
- package/dist/typings/cache/cache-memory.d.ts +4 -0
- package/dist/typings/cache/index.d.ts +4 -0
- package/dist/typings/cache/key-manifest.d.ts +12 -0
- package/dist/typings/cache/shared.d.ts +68 -0
- package/dist/typings/constants.d.ts +58 -0
- package/dist/typings/dpop/dpop.d.ts +17 -0
- package/dist/typings/dpop/storage.d.ts +27 -0
- package/dist/typings/dpop/utils.d.ts +15 -0
- package/dist/typings/errors.d.ts +96 -0
- package/dist/typings/fetcher.d.ts +54 -0
- package/dist/typings/global.d.ts +819 -0
- package/dist/typings/http.d.ts +5 -0
- package/dist/typings/index.d.ts +24 -0
- package/dist/typings/jwt.d.ts +21 -0
- package/dist/typings/lock.d.ts +32 -0
- package/dist/typings/mfa/MfaApiClient.d.ts +225 -0
- package/dist/typings/mfa/MfaContextManager.d.ts +79 -0
- package/dist/typings/mfa/constants.d.ts +23 -0
- package/dist/typings/mfa/errors.d.ts +117 -0
- package/dist/typings/mfa/index.d.ts +4 -0
- package/dist/typings/mfa/types.d.ts +181 -0
- package/dist/typings/mfa/utils.d.ts +23 -0
- package/dist/typings/promise-utils.d.ts +2 -0
- package/dist/typings/scope.d.ts +35 -0
- package/dist/typings/storage.d.ts +26 -0
- package/dist/typings/transaction-manager.d.ts +33 -0
- package/dist/typings/utils.d.ts +36 -0
- package/dist/typings/version.d.ts +2 -0
- package/dist/typings/worker/token.worker.d.ts +1 -0
- package/dist/typings/worker/worker.types.d.ts +15 -0
- package/dist/typings/worker/worker.utils.d.ts +7 -0
- package/package.json +4 -3
- package/src/version.ts +1 -1
|
@@ -160,7 +160,7 @@ AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator ||
|
|
|
160
160
|
return this._invoke("return", e);
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
var version = "2.18.
|
|
163
|
+
var version = "2.18.2";
|
|
164
164
|
|
|
165
165
|
const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
|
|
166
166
|
|
|
@@ -1067,9 +1067,7 @@ class WebLocksApiManager {
|
|
|
1067
1067
|
|
|
1068
1068
|
class LegacyLockManager {
|
|
1069
1069
|
constructor() {
|
|
1070
|
-
_defineProperty(this, "lock", void 0);
|
|
1071
1070
|
_defineProperty(this, "activeLocks", new Set);
|
|
1072
|
-
_defineProperty(this, "pagehideHandler", void 0);
|
|
1073
1071
|
this.lock = new _default;
|
|
1074
1072
|
this.pagehideHandler = () => {
|
|
1075
1073
|
this.activeLocks.forEach(key => this.lock.releaseLock(key));
|
|
@@ -1649,9 +1647,6 @@ class CacheKey {
|
|
|
1649
1647
|
let suffix = arguments.length > 2 ? arguments[2] : undefined;
|
|
1650
1648
|
this.prefix = prefix;
|
|
1651
1649
|
this.suffix = suffix;
|
|
1652
|
-
_defineProperty(this, "clientId", void 0);
|
|
1653
|
-
_defineProperty(this, "scope", void 0);
|
|
1654
|
-
_defineProperty(this, "audience", void 0);
|
|
1655
1650
|
this.clientId = data.clientId;
|
|
1656
1651
|
this.scope = data.scope;
|
|
1657
1652
|
this.audience = data.audience;
|
|
@@ -1731,7 +1726,6 @@ class CacheManager {
|
|
|
1731
1726
|
constructor(cache, keyManifest, nowProvider) {
|
|
1732
1727
|
this.cache = cache;
|
|
1733
1728
|
this.keyManifest = keyManifest;
|
|
1734
|
-
_defineProperty(this, "nowProvider", void 0);
|
|
1735
1729
|
this.nowProvider = nowProvider || DEFAULT_NOW_PROVIDER;
|
|
1736
1730
|
}
|
|
1737
1731
|
async setIdToken(clientId, idToken, decodedToken) {
|
|
@@ -1905,7 +1899,6 @@ class TransactionManager {
|
|
|
1905
1899
|
this.storage = storage;
|
|
1906
1900
|
this.clientId = clientId;
|
|
1907
1901
|
this.cookieDomain = cookieDomain;
|
|
1908
|
-
_defineProperty(this, "storageKey", void 0);
|
|
1909
1902
|
this.storageKey = "".concat(TRANSACTION_STORAGE_KEY_PREFIX, ".").concat(this.clientId);
|
|
1910
1903
|
}
|
|
1911
1904
|
create(transaction) {
|
|
@@ -2225,30 +2218,7 @@ let ResponseType = function(ResponseType) {
|
|
|
2225
2218
|
return ResponseType;
|
|
2226
2219
|
}({});
|
|
2227
2220
|
|
|
2228
|
-
class User {
|
|
2229
|
-
constructor() {
|
|
2230
|
-
_defineProperty(this, "name", void 0);
|
|
2231
|
-
_defineProperty(this, "given_name", void 0);
|
|
2232
|
-
_defineProperty(this, "family_name", void 0);
|
|
2233
|
-
_defineProperty(this, "middle_name", void 0);
|
|
2234
|
-
_defineProperty(this, "nickname", void 0);
|
|
2235
|
-
_defineProperty(this, "preferred_username", void 0);
|
|
2236
|
-
_defineProperty(this, "profile", void 0);
|
|
2237
|
-
_defineProperty(this, "picture", void 0);
|
|
2238
|
-
_defineProperty(this, "website", void 0);
|
|
2239
|
-
_defineProperty(this, "email", void 0);
|
|
2240
|
-
_defineProperty(this, "email_verified", void 0);
|
|
2241
|
-
_defineProperty(this, "gender", void 0);
|
|
2242
|
-
_defineProperty(this, "birthdate", void 0);
|
|
2243
|
-
_defineProperty(this, "zoneinfo", void 0);
|
|
2244
|
-
_defineProperty(this, "locale", void 0);
|
|
2245
|
-
_defineProperty(this, "phone_number", void 0);
|
|
2246
|
-
_defineProperty(this, "phone_number_verified", void 0);
|
|
2247
|
-
_defineProperty(this, "address", void 0);
|
|
2248
|
-
_defineProperty(this, "updated_at", void 0);
|
|
2249
|
-
_defineProperty(this, "sub", void 0);
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2221
|
+
class User {}
|
|
2252
2222
|
|
|
2253
2223
|
function decodeBase64$1(base64, enableUnicode) {
|
|
2254
2224
|
var binaryString = atob(base64);
|
|
@@ -2302,7 +2272,6 @@ class CacheKeyManifest {
|
|
|
2302
2272
|
constructor(cache, clientId) {
|
|
2303
2273
|
this.cache = cache;
|
|
2304
2274
|
this.clientId = clientId;
|
|
2305
|
-
_defineProperty(this, "manifestKey", void 0);
|
|
2306
2275
|
this.manifestKey = this.createManifestKeyFrom(this.clientId);
|
|
2307
2276
|
}
|
|
2308
2277
|
async add(key) {
|
|
@@ -2429,8 +2398,6 @@ const AUTH0_NONCE_ID = "auth0";
|
|
|
2429
2398
|
|
|
2430
2399
|
class DpopStorage {
|
|
2431
2400
|
constructor(clientId) {
|
|
2432
|
-
_defineProperty(this, "clientId", void 0);
|
|
2433
|
-
_defineProperty(this, "dbHandle", void 0);
|
|
2434
2401
|
this.clientId = clientId;
|
|
2435
2402
|
}
|
|
2436
2403
|
getVersion() {
|
|
@@ -2499,7 +2466,6 @@ class DpopStorage {
|
|
|
2499
2466
|
|
|
2500
2467
|
class Dpop {
|
|
2501
2468
|
constructor(clientId) {
|
|
2502
|
-
_defineProperty(this, "storage", void 0);
|
|
2503
2469
|
this.storage = new DpopStorage(clientId);
|
|
2504
2470
|
}
|
|
2505
2471
|
getNonce(id) {
|
|
@@ -2539,8 +2505,6 @@ var TokenType = function(TokenType) {
|
|
|
2539
2505
|
|
|
2540
2506
|
class Fetcher {
|
|
2541
2507
|
constructor(config, hooks) {
|
|
2542
|
-
_defineProperty(this, "config", void 0);
|
|
2543
|
-
_defineProperty(this, "hooks", void 0);
|
|
2544
2508
|
this.hooks = hooks;
|
|
2545
2509
|
this.config = _objectSpread2(_objectSpread2({}, config), {}, {
|
|
2546
2510
|
fetch: config.fetch || (typeof window === "undefined" ? fetch : window.fetch.bind(window))
|
|
@@ -2708,11 +2672,6 @@ class MyAccountApiError extends Error {
|
|
|
2708
2672
|
constructor(_ref) {
|
|
2709
2673
|
let {type: type, status: status, title: title, detail: detail, validation_errors: validation_errors} = _ref;
|
|
2710
2674
|
super(detail);
|
|
2711
|
-
_defineProperty(this, "type", void 0);
|
|
2712
|
-
_defineProperty(this, "status", void 0);
|
|
2713
|
-
_defineProperty(this, "title", void 0);
|
|
2714
|
-
_defineProperty(this, "detail", void 0);
|
|
2715
|
-
_defineProperty(this, "validation_errors", void 0);
|
|
2716
2675
|
this.name = "MyAccountApiError";
|
|
2717
2676
|
this.type = type;
|
|
2718
2677
|
this.status = status;
|
|
@@ -8104,7 +8063,6 @@ class MfaContextManager {
|
|
|
8104
8063
|
constructor() {
|
|
8105
8064
|
let ttlMs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_TTL_MS;
|
|
8106
8065
|
_defineProperty(this, "contexts", new Map);
|
|
8107
|
-
_defineProperty(this, "ttlMs", void 0);
|
|
8108
8066
|
this.ttlMs = ttlMs;
|
|
8109
8067
|
}
|
|
8110
8068
|
set(mfaToken, context) {
|
|
@@ -8142,9 +8100,6 @@ class MfaContextManager {
|
|
|
8142
8100
|
|
|
8143
8101
|
class MfaApiClient {
|
|
8144
8102
|
constructor(authJsMfaClient, auth0Client) {
|
|
8145
|
-
_defineProperty(this, "authJsMfaClient", void 0);
|
|
8146
|
-
_defineProperty(this, "auth0Client", void 0);
|
|
8147
|
-
_defineProperty(this, "contextManager", void 0);
|
|
8148
8103
|
this.authJsMfaClient = authJsMfaClient;
|
|
8149
8104
|
this.auth0Client = auth0Client;
|
|
8150
8105
|
this.contextManager = new MfaContextManager;
|
|
@@ -8258,25 +8213,7 @@ const _excluded = [ "openUrl", "fragment", "appState" ], _excluded2 = [ "url" ],
|
|
|
8258
8213
|
|
|
8259
8214
|
class Auth0Client {
|
|
8260
8215
|
constructor(options) {
|
|
8261
|
-
_defineProperty(this, "transactionManager", void 0);
|
|
8262
|
-
_defineProperty(this, "cacheManager", void 0);
|
|
8263
|
-
_defineProperty(this, "lockManager", void 0);
|
|
8264
|
-
_defineProperty(this, "domainUrl", void 0);
|
|
8265
|
-
_defineProperty(this, "tokenIssuer", void 0);
|
|
8266
|
-
_defineProperty(this, "scope", void 0);
|
|
8267
|
-
_defineProperty(this, "cookieStorage", void 0);
|
|
8268
|
-
_defineProperty(this, "dpop", void 0);
|
|
8269
|
-
_defineProperty(this, "sessionCheckExpiryDays", void 0);
|
|
8270
|
-
_defineProperty(this, "orgHintCookieName", void 0);
|
|
8271
|
-
_defineProperty(this, "isAuthenticatedCookieName", void 0);
|
|
8272
|
-
_defineProperty(this, "nowProvider", void 0);
|
|
8273
|
-
_defineProperty(this, "httpTimeoutMs", void 0);
|
|
8274
|
-
_defineProperty(this, "options", void 0);
|
|
8275
8216
|
_defineProperty(this, "userCache", (new InMemoryCache).enclosedCache);
|
|
8276
|
-
_defineProperty(this, "myAccountApi", void 0);
|
|
8277
|
-
_defineProperty(this, "mfa", void 0);
|
|
8278
|
-
_defineProperty(this, "worker", void 0);
|
|
8279
|
-
_defineProperty(this, "authJsClient", void 0);
|
|
8280
8217
|
_defineProperty(this, "defaultOptions", {
|
|
8281
8218
|
authorizationParams: {
|
|
8282
8219
|
scope: DEFAULT_SCOPE
|