-
Notifications
You must be signed in to change notification settings - Fork 366
/
Copy pathindex.ts
45 lines (38 loc) · 1.33 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import 'core-js/es/string/starts-with';
import 'core-js/es/symbol';
import 'core-js/es/array/from';
import 'core-js/es/typed-array/slice';
import 'core-js/es/array/includes';
import 'core-js/es/string/includes';
import 'core-js/es/set';
import 'promise-polyfill/src/polyfill';
import 'fast-text-encoding';
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
import Auth0Client from './Auth0Client';
import { Auth0ClientOptions } from './global';
import './global';
export * from './global';
/**
* Asynchronously creates the Auth0Client instance and calls `checkSession`.
*
* **Note:** There are caveats to using this in a private browser tab, which may not silently authenticae
* a user on page refresh. Please see [the checkSession docs](https://auth0.github.io/auth0-spa-js/classes/auth0client.html#checksession) for more info.
*
* @param options The client options
* @returns An instance of Auth0Client
*/
export default async function createAuth0Client(options: Auth0ClientOptions) {
const auth0 = new Auth0Client(options);
await auth0.checkSession();
return auth0;
}
export { Auth0Client };
export {
GenericError,
AuthenticationError,
TimeoutError,
PopupTimeoutError,
PopupCancelledError,
MfaRequiredError
} from './errors';
export { ICache, LocalStorageCache, InMemoryCache, Cacheable } from './cache';