forked from auth0/auth0-spa-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.ts
55 lines (47 loc) · 1.26 KB
/
constants.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
46
47
48
49
50
51
52
53
54
55
import { PopupConfigOptions } from './global';
/**
* @ignore
*/
export const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
/**
* @ignore
*/
export const DEFAULT_POPUP_CONFIG_OPTIONS: PopupConfigOptions = {
timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
};
/**
* @ignore
*/
export const DEFAULT_SILENT_TOKEN_RETRY_COUNT = 3;
/**
* @ignore
*/
export const CLEANUP_IFRAME_TIMEOUT_IN_SECONDS = 2;
/**
* @ignore
*/
export const DEFAULT_FETCH_TIMEOUT_MS = 10000;
export const CACHE_LOCATION_MEMORY = 'memory';
export const CACHE_LOCATION_LOCAL_STORAGE = 'localstorage';
export const MISSING_REFRESH_TOKEN_ERROR_MESSAGE =
'The web worker is missing the refresh token';
/**
* @ignore
*/
export const DEFAULT_SCOPE = '';
/**
* A list of errors that can be issued by the authorization server which the
* user can recover from by signing in interactively.
* https://openid.net/specs/openid-connect-core-1_0.html#AuthError
* @ignore
*/
export const RECOVERABLE_ERRORS = [
'login_required',
'consent_required',
'interaction_required',
'account_selection_required',
// Strictly speaking the user can't recover from `access_denied` - but they
// can get more information about their access being denied by logging in
// interactively.
'access_denied'
];