@strivacity/sdk-react 4.0.0-beta.0 → 4.0.0-beta.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/README.md +71 -23
- package/dist/components.cjs +1 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.mjs +1 -1
- package/dist/components.mjs.map +1 -1
- package/dist/errors.cjs +1 -2
- package/dist/errors.mjs +1 -2
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +1 -2
- package/dist/index.mjs +1 -2
- package/dist/storages.cjs +1 -1
- package/dist/storages.mjs +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +5 -28
- package/dist/types.mjs +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +2 -2
- package/dist/assets/rolldown-runtime.cjs +0 -1
- package/dist/assets/rolldown-runtime.mjs +0 -1
- package/dist/errors.cjs.map +0 -1
- package/dist/errors.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/testing/tests/components.spec.tsx +0 -146
- package/testing/tests/errors.spec.ts +0 -10
- package/testing/tests/guard.spec.tsx +0 -119
- package/testing/tests/hooks.spec.tsx +0 -418
- package/testing/tests/index.spec.ts +0 -105
- package/testing/tests/storages.spec.ts +0 -10
- package/testing/tests/utils.spec.ts +0 -10
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { test, expect } from 'vitest';
|
|
2
|
-
import * as index from '../../src/index';
|
|
3
|
-
|
|
4
|
-
test('should export the correct things', () => {
|
|
5
|
-
const expectedExports = [
|
|
6
|
-
'createBaseFlow',
|
|
7
|
-
'createEmbeddedFlow',
|
|
8
|
-
'createNativeFlow',
|
|
9
|
-
'createPopupFlow',
|
|
10
|
-
'createRedirectFlow',
|
|
11
|
-
'popupCallbackHandler',
|
|
12
|
-
'popupUrlHandler',
|
|
13
|
-
'redirectCallbackHandler',
|
|
14
|
-
'redirectUrlHandler',
|
|
15
|
-
'BACKCHANNEL_LOGOUT_EVENT',
|
|
16
|
-
'ConfigurationError',
|
|
17
|
-
'DEFAULT_COOKIE_MAX_AGE',
|
|
18
|
-
'DISALLOWED_PROXY_HEADERS',
|
|
19
|
-
'FallbackError',
|
|
20
|
-
'InternalError',
|
|
21
|
-
'NetworkError',
|
|
22
|
-
'OidcError',
|
|
23
|
-
'PopupBlockedError',
|
|
24
|
-
'PopupClosedError',
|
|
25
|
-
'ProtocolError',
|
|
26
|
-
'RETURN_TO_COOKIE',
|
|
27
|
-
'ServerError',
|
|
28
|
-
'SessionExpiredError',
|
|
29
|
-
'UnsupportedFlowError',
|
|
30
|
-
'assertWebAuthnCredential',
|
|
31
|
-
'buildAuthorizationUrl',
|
|
32
|
-
'buildCookieString',
|
|
33
|
-
'buildEndSessionUrl',
|
|
34
|
-
'createDefaultLogging',
|
|
35
|
-
'createHttpClient',
|
|
36
|
-
'createSession',
|
|
37
|
-
'createState',
|
|
38
|
-
'createWebAuthnCredential',
|
|
39
|
-
'decodeBase64URL',
|
|
40
|
-
'decodeJwt',
|
|
41
|
-
'decryptString',
|
|
42
|
-
'defaultOptions',
|
|
43
|
-
'encodeBase64URL',
|
|
44
|
-
'encryptString',
|
|
45
|
-
'exchangeCode',
|
|
46
|
-
'fetchFlowEntry',
|
|
47
|
-
'finalizeLoginSession',
|
|
48
|
-
'flushSetCookies',
|
|
49
|
-
'generateCodeChallenge',
|
|
50
|
-
'generateCodeVerifier',
|
|
51
|
-
'generateJwt',
|
|
52
|
-
'generateRandomHex',
|
|
53
|
-
'getDefaultFlowState',
|
|
54
|
-
'getDiscoveryDocument',
|
|
55
|
-
'getSDKOptions',
|
|
56
|
-
'getServerSDKOptions',
|
|
57
|
-
'injectScript',
|
|
58
|
-
'isSessionExpired',
|
|
59
|
-
'loadSession',
|
|
60
|
-
'parseCookieHeader',
|
|
61
|
-
'parseState',
|
|
62
|
-
'proxyResponse',
|
|
63
|
-
'pushSetCookie',
|
|
64
|
-
'refreshToken',
|
|
65
|
-
'revokeToken',
|
|
66
|
-
'serializeCookie',
|
|
67
|
-
'serializeSession',
|
|
68
|
-
'serializeState',
|
|
69
|
-
'submitLoginForm',
|
|
70
|
-
'throwHttpError',
|
|
71
|
-
'throwTokenEndpointError',
|
|
72
|
-
'timestamp',
|
|
73
|
-
'toSafeRedirect',
|
|
74
|
-
'unflattenObject',
|
|
75
|
-
'verifyIdToken',
|
|
76
|
-
'verifyJwt',
|
|
77
|
-
'StyAuthProvider',
|
|
78
|
-
'STRIVACITY_SDK',
|
|
79
|
-
'useNativeLoginContext',
|
|
80
|
-
'useStrivacity',
|
|
81
|
-
'useNativeLogin',
|
|
82
|
-
'withAuthGuard',
|
|
83
|
-
'COOKIE_CHUNK_SIZE',
|
|
84
|
-
'COOKIE_CONTEXT',
|
|
85
|
-
'createCacheAPIStorage',
|
|
86
|
-
'createEncryptedCookieStorage',
|
|
87
|
-
'createIndexedDBStorage',
|
|
88
|
-
'createLocalStorage',
|
|
89
|
-
'createMemoryStorage',
|
|
90
|
-
'createServerMemoryStorage',
|
|
91
|
-
'createServerStateStorage',
|
|
92
|
-
'createSessionIdCookieStorage',
|
|
93
|
-
'createSessionStorage',
|
|
94
|
-
'createWorkerStorage',
|
|
95
|
-
'handleWorkerStorageRequests',
|
|
96
|
-
'AlgorithmTypeList',
|
|
97
|
-
'GrantTypeList',
|
|
98
|
-
'ResponseModeList',
|
|
99
|
-
'ResponseTypeList',
|
|
100
|
-
'SubjectTypeList',
|
|
101
|
-
'TokenEndpointAuthMethodList',
|
|
102
|
-
];
|
|
103
|
-
|
|
104
|
-
expect(Object.keys(index)).toEqual(expectedExports);
|
|
105
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { test, expect } from 'vitest';
|
|
2
|
-
import * as reactStorages from '../../src/storages';
|
|
3
|
-
import * as coreStorages from '@strivacity/sdk-core/storages';
|
|
4
|
-
|
|
5
|
-
test('re-exports storages from the core sdk', () => {
|
|
6
|
-
const coreKeys = Object.keys(coreStorages);
|
|
7
|
-
|
|
8
|
-
expect(coreKeys.length).toBeGreaterThan(0);
|
|
9
|
-
expect(Object.keys(reactStorages).sort()).toEqual(coreKeys.sort());
|
|
10
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { test, expect } from 'vitest';
|
|
2
|
-
import * as reactUtils from '../../src/utils';
|
|
3
|
-
import * as coreUtils from '@strivacity/sdk-core/utils';
|
|
4
|
-
|
|
5
|
-
test('re-exports utility from the core sdk', () => {
|
|
6
|
-
const coreKeys = Object.keys(coreUtils);
|
|
7
|
-
|
|
8
|
-
expect(coreKeys.length).toBeGreaterThan(0);
|
|
9
|
-
expect(Object.keys(reactUtils).sort()).toEqual(coreKeys.sort());
|
|
10
|
-
});
|