@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
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
}, AsyncGenerator.prototype.return = function(e) {
|
|
142
142
|
return this._invoke("return", e);
|
|
143
143
|
};
|
|
144
|
-
var version = "2.18.
|
|
144
|
+
var version = "2.18.2";
|
|
145
145
|
const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
|
|
146
146
|
const DEFAULT_POPUP_CONFIG_OPTIONS = {
|
|
147
147
|
timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
|
|
@@ -978,9 +978,7 @@
|
|
|
978
978
|
}
|
|
979
979
|
class LegacyLockManager {
|
|
980
980
|
constructor() {
|
|
981
|
-
_defineProperty(this, "lock", void 0);
|
|
982
981
|
_defineProperty(this, "activeLocks", new Set);
|
|
983
|
-
_defineProperty(this, "pagehideHandler", void 0);
|
|
984
982
|
this.lock = new _default;
|
|
985
983
|
this.pagehideHandler = () => {
|
|
986
984
|
this.activeLocks.forEach(key => this.lock.releaseLock(key));
|
|
@@ -1508,9 +1506,6 @@
|
|
|
1508
1506
|
let suffix = arguments.length > 2 ? arguments[2] : undefined;
|
|
1509
1507
|
this.prefix = prefix;
|
|
1510
1508
|
this.suffix = suffix;
|
|
1511
|
-
_defineProperty(this, "clientId", void 0);
|
|
1512
|
-
_defineProperty(this, "scope", void 0);
|
|
1513
|
-
_defineProperty(this, "audience", void 0);
|
|
1514
1509
|
this.clientId = data.clientId;
|
|
1515
1510
|
this.scope = data.scope;
|
|
1516
1511
|
this.audience = data.audience;
|
|
@@ -1586,7 +1581,6 @@
|
|
|
1586
1581
|
constructor(cache, keyManifest, nowProvider) {
|
|
1587
1582
|
this.cache = cache;
|
|
1588
1583
|
this.keyManifest = keyManifest;
|
|
1589
|
-
_defineProperty(this, "nowProvider", void 0);
|
|
1590
1584
|
this.nowProvider = nowProvider || DEFAULT_NOW_PROVIDER;
|
|
1591
1585
|
}
|
|
1592
1586
|
async setIdToken(clientId, idToken, decodedToken) {
|
|
@@ -1758,7 +1752,6 @@
|
|
|
1758
1752
|
this.storage = storage;
|
|
1759
1753
|
this.clientId = clientId;
|
|
1760
1754
|
this.cookieDomain = cookieDomain;
|
|
1761
|
-
_defineProperty(this, "storageKey", void 0);
|
|
1762
1755
|
this.storageKey = "".concat(TRANSACTION_STORAGE_KEY_PREFIX, ".").concat(this.clientId);
|
|
1763
1756
|
}
|
|
1764
1757
|
create(transaction) {
|
|
@@ -2056,30 +2049,7 @@
|
|
|
2056
2049
|
ResponseType["ConnectCode"] = "connect_code";
|
|
2057
2050
|
return ResponseType;
|
|
2058
2051
|
}({});
|
|
2059
|
-
class User {
|
|
2060
|
-
constructor() {
|
|
2061
|
-
_defineProperty(this, "name", void 0);
|
|
2062
|
-
_defineProperty(this, "given_name", void 0);
|
|
2063
|
-
_defineProperty(this, "family_name", void 0);
|
|
2064
|
-
_defineProperty(this, "middle_name", void 0);
|
|
2065
|
-
_defineProperty(this, "nickname", void 0);
|
|
2066
|
-
_defineProperty(this, "preferred_username", void 0);
|
|
2067
|
-
_defineProperty(this, "profile", void 0);
|
|
2068
|
-
_defineProperty(this, "picture", void 0);
|
|
2069
|
-
_defineProperty(this, "website", void 0);
|
|
2070
|
-
_defineProperty(this, "email", void 0);
|
|
2071
|
-
_defineProperty(this, "email_verified", void 0);
|
|
2072
|
-
_defineProperty(this, "gender", void 0);
|
|
2073
|
-
_defineProperty(this, "birthdate", void 0);
|
|
2074
|
-
_defineProperty(this, "zoneinfo", void 0);
|
|
2075
|
-
_defineProperty(this, "locale", void 0);
|
|
2076
|
-
_defineProperty(this, "phone_number", void 0);
|
|
2077
|
-
_defineProperty(this, "phone_number_verified", void 0);
|
|
2078
|
-
_defineProperty(this, "address", void 0);
|
|
2079
|
-
_defineProperty(this, "updated_at", void 0);
|
|
2080
|
-
_defineProperty(this, "sub", void 0);
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2052
|
+
class User {}
|
|
2083
2053
|
function decodeBase64$1(base64, enableUnicode) {
|
|
2084
2054
|
var binaryString = atob(base64);
|
|
2085
2055
|
if (enableUnicode) {
|
|
@@ -2126,7 +2096,6 @@
|
|
|
2126
2096
|
constructor(cache, clientId) {
|
|
2127
2097
|
this.cache = cache;
|
|
2128
2098
|
this.clientId = clientId;
|
|
2129
|
-
_defineProperty(this, "manifestKey", void 0);
|
|
2130
2099
|
this.manifestKey = this.createManifestKeyFrom(this.clientId);
|
|
2131
2100
|
}
|
|
2132
2101
|
async add(key) {
|
|
@@ -2232,8 +2201,6 @@
|
|
|
2232
2201
|
const AUTH0_NONCE_ID = "auth0";
|
|
2233
2202
|
class DpopStorage {
|
|
2234
2203
|
constructor(clientId) {
|
|
2235
|
-
_defineProperty(this, "clientId", void 0);
|
|
2236
|
-
_defineProperty(this, "dbHandle", void 0);
|
|
2237
2204
|
this.clientId = clientId;
|
|
2238
2205
|
}
|
|
2239
2206
|
getVersion() {
|
|
@@ -2301,7 +2268,6 @@
|
|
|
2301
2268
|
}
|
|
2302
2269
|
class Dpop {
|
|
2303
2270
|
constructor(clientId) {
|
|
2304
|
-
_defineProperty(this, "storage", void 0);
|
|
2305
2271
|
this.storage = new DpopStorage(clientId);
|
|
2306
2272
|
}
|
|
2307
2273
|
getNonce(id) {
|
|
@@ -2339,8 +2305,6 @@
|
|
|
2339
2305
|
}(TokenType || {});
|
|
2340
2306
|
class Fetcher {
|
|
2341
2307
|
constructor(config, hooks) {
|
|
2342
|
-
_defineProperty(this, "config", void 0);
|
|
2343
|
-
_defineProperty(this, "hooks", void 0);
|
|
2344
2308
|
this.hooks = hooks;
|
|
2345
2309
|
this.config = _objectSpread2(_objectSpread2({}, config), {}, {
|
|
2346
2310
|
fetch: config.fetch || (typeof window === "undefined" ? fetch : window.fetch.bind(window))
|
|
@@ -2506,11 +2470,6 @@
|
|
|
2506
2470
|
constructor(_ref) {
|
|
2507
2471
|
let {type: type, status: status, title: title, detail: detail, validation_errors: validation_errors} = _ref;
|
|
2508
2472
|
super(detail);
|
|
2509
|
-
_defineProperty(this, "type", void 0);
|
|
2510
|
-
_defineProperty(this, "status", void 0);
|
|
2511
|
-
_defineProperty(this, "title", void 0);
|
|
2512
|
-
_defineProperty(this, "detail", void 0);
|
|
2513
|
-
_defineProperty(this, "validation_errors", void 0);
|
|
2514
2473
|
this.name = "MyAccountApiError";
|
|
2515
2474
|
this.type = type;
|
|
2516
2475
|
this.status = status;
|
|
@@ -7512,7 +7471,6 @@
|
|
|
7512
7471
|
constructor() {
|
|
7513
7472
|
let ttlMs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_TTL_MS;
|
|
7514
7473
|
_defineProperty(this, "contexts", new Map);
|
|
7515
|
-
_defineProperty(this, "ttlMs", void 0);
|
|
7516
7474
|
this.ttlMs = ttlMs;
|
|
7517
7475
|
}
|
|
7518
7476
|
set(mfaToken, context) {
|
|
@@ -7549,9 +7507,6 @@
|
|
|
7549
7507
|
}
|
|
7550
7508
|
class MfaApiClient {
|
|
7551
7509
|
constructor(authJsMfaClient, auth0Client) {
|
|
7552
|
-
_defineProperty(this, "authJsMfaClient", void 0);
|
|
7553
|
-
_defineProperty(this, "auth0Client", void 0);
|
|
7554
|
-
_defineProperty(this, "contextManager", void 0);
|
|
7555
7510
|
this.authJsMfaClient = authJsMfaClient;
|
|
7556
7511
|
this.auth0Client = auth0Client;
|
|
7557
7512
|
this.contextManager = new MfaContextManager;
|
|
@@ -7663,25 +7618,7 @@
|
|
|
7663
7618
|
const _excluded = [ "openUrl", "fragment", "appState" ], _excluded2 = [ "url" ], _excluded3 = [ "cacheMode" ], _excluded4 = [ "federated" ], _excluded5 = [ "openUrl" ], _excluded6 = [ "id_token", "decodedToken" ], _excluded7 = [ "mfaToken" ];
|
|
7664
7619
|
class Auth0Client {
|
|
7665
7620
|
constructor(options) {
|
|
7666
|
-
_defineProperty(this, "transactionManager", void 0);
|
|
7667
|
-
_defineProperty(this, "cacheManager", void 0);
|
|
7668
|
-
_defineProperty(this, "lockManager", void 0);
|
|
7669
|
-
_defineProperty(this, "domainUrl", void 0);
|
|
7670
|
-
_defineProperty(this, "tokenIssuer", void 0);
|
|
7671
|
-
_defineProperty(this, "scope", void 0);
|
|
7672
|
-
_defineProperty(this, "cookieStorage", void 0);
|
|
7673
|
-
_defineProperty(this, "dpop", void 0);
|
|
7674
|
-
_defineProperty(this, "sessionCheckExpiryDays", void 0);
|
|
7675
|
-
_defineProperty(this, "orgHintCookieName", void 0);
|
|
7676
|
-
_defineProperty(this, "isAuthenticatedCookieName", void 0);
|
|
7677
|
-
_defineProperty(this, "nowProvider", void 0);
|
|
7678
|
-
_defineProperty(this, "httpTimeoutMs", void 0);
|
|
7679
|
-
_defineProperty(this, "options", void 0);
|
|
7680
7621
|
_defineProperty(this, "userCache", (new InMemoryCache).enclosedCache);
|
|
7681
|
-
_defineProperty(this, "myAccountApi", void 0);
|
|
7682
|
-
_defineProperty(this, "mfa", void 0);
|
|
7683
|
-
_defineProperty(this, "worker", void 0);
|
|
7684
|
-
_defineProperty(this, "authJsClient", void 0);
|
|
7685
7622
|
_defineProperty(this, "defaultOptions", {
|
|
7686
7623
|
authorizationParams: {
|
|
7687
7624
|
scope: DEFAULT_SCOPE
|