@auth0/auth0-spa-js 1.22.3 → 2.0.0-beta.0
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/README.md +50 -41
- package/dist/auth0-spa-js.development.js +996 -4901
- 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 +1768 -5532
- package/dist/lib/auth0-spa-js.cjs.js.map +1 -1
- package/dist/typings/Auth0Client.d.ts +21 -41
- package/dist/typings/Auth0Client.utils.d.ts +26 -0
- package/dist/typings/cache/cache-manager.d.ts +11 -7
- package/dist/typings/cache/shared.d.ts +16 -11
- package/dist/typings/constants.d.ts +0 -7
- package/dist/typings/errors.d.ts +0 -4
- package/dist/typings/global.d.ts +125 -167
- package/dist/typings/index.d.ts +3 -13
- package/dist/typings/transaction-manager.d.ts +1 -1
- package/dist/typings/utils.d.ts +8 -7
- package/dist/typings/version.d.ts +1 -1
- package/package.json +35 -36
- package/src/Auth0Client.ts +407 -562
- package/src/Auth0Client.utils.ts +73 -0
- package/src/cache/cache-localstorage.ts +1 -1
- package/src/cache/cache-manager.ts +58 -29
- package/src/cache/shared.ts +29 -17
- package/src/constants.ts +0 -17
- package/src/errors.ts +10 -14
- package/src/global.ts +132 -183
- package/src/http.ts +0 -5
- package/src/index.ts +15 -14
- package/src/jwt.ts +3 -3
- package/src/storage.ts +1 -1
- package/src/transaction-manager.ts +1 -1
- package/src/utils.ts +37 -42
- package/src/version.ts +1 -1
- package/src/worker/token.worker.ts +4 -3
- package/dist/typings/index.cjs.d.ts +0 -5
- package/dist/typings/user-agent.d.ts +0 -1
- package/src/index.cjs.ts +0 -23
- package/src/user-agent.ts +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MissingRefreshTokenError } from '../errors';
|
|
2
|
+
import { createQueryParams } from '../utils';
|
|
2
3
|
import { WorkerRefreshTokenMessage } from './worker.types';
|
|
3
4
|
|
|
4
5
|
let refreshTokens: Record<string, string> = {};
|
|
@@ -54,10 +55,10 @@ const messageHandler = async ({
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
fetchOptions.body = useFormData
|
|
57
|
-
?
|
|
58
|
+
? createQueryParams({
|
|
58
59
|
...body,
|
|
59
60
|
refresh_token: refreshToken
|
|
60
|
-
})
|
|
61
|
+
})
|
|
61
62
|
: JSON.stringify({
|
|
62
63
|
...body,
|
|
63
64
|
refresh_token: refreshToken
|
|
@@ -122,9 +123,9 @@ const messageHandler = async ({
|
|
|
122
123
|
};
|
|
123
124
|
|
|
124
125
|
// Don't run `addEventListener` in our tests (this is replaced in rollup)
|
|
125
|
-
/* istanbul ignore else */
|
|
126
126
|
if (process.env.NODE_ENV === 'test') {
|
|
127
127
|
module.exports = { messageHandler };
|
|
128
|
+
/* c8 ignore next 4 */
|
|
128
129
|
} else {
|
|
129
130
|
// @ts-ignore
|
|
130
131
|
addEventListener('message', messageHandler);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isIE11: () => boolean;
|
package/src/index.cjs.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import createAuth0Client, {
|
|
2
|
-
Auth0Client,
|
|
3
|
-
GenericError,
|
|
4
|
-
AuthenticationError,
|
|
5
|
-
TimeoutError,
|
|
6
|
-
PopupTimeoutError,
|
|
7
|
-
MfaRequiredError
|
|
8
|
-
} from './index';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @ignore
|
|
12
|
-
*/
|
|
13
|
-
const wrapper = createAuth0Client as any;
|
|
14
|
-
|
|
15
|
-
wrapper.Auth0Client = Auth0Client;
|
|
16
|
-
wrapper.createAuth0Client = createAuth0Client;
|
|
17
|
-
wrapper.GenericError = GenericError;
|
|
18
|
-
wrapper.AuthenticationError = AuthenticationError;
|
|
19
|
-
wrapper.TimeoutError = TimeoutError;
|
|
20
|
-
wrapper.PopupTimeoutError = PopupTimeoutError;
|
|
21
|
-
wrapper.MfaRequiredError = MfaRequiredError;
|
|
22
|
-
|
|
23
|
-
export default wrapper;
|
package/src/user-agent.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const isIE11 = () => /Trident.*rv:11\.0/.test(navigator.userAgent);
|