@tryfinch/react-connect 3.15.0 → 3.15.1
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 +6 -9
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/example/src/App.tsx +3 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,16 +27,13 @@ const App = () => {
|
|
|
27
27
|
const onError = ({ errorMessage, errorType }) => console.error(errorMessage, errorType);
|
|
28
28
|
const onClose = () => console.log('User exited Finch Connect');
|
|
29
29
|
|
|
30
|
+
// Generate a session ID using the /connect/sessions endpoint on the Finch API
|
|
31
|
+
// See the docs here https://developer.tryfinch.com/api-reference/connect/new-session#create-a-new-connect-session
|
|
32
|
+
const sessionId = '';
|
|
33
|
+
|
|
30
34
|
const { open } = useFinchConnect({
|
|
31
|
-
|
|
32
|
-
//
|
|
33
|
-
products: ['company', 'directory'],
|
|
34
|
-
// Check Finch's [documentation](https://developer.tryfinch.com/docs/reference/96f5be9e0ec1a-providers) for the full list of payroll provider IDs
|
|
35
|
-
// payrollProvider: '<payroll-provider-id>',
|
|
36
|
-
// For `sandbox`, omit or use 'false' if in production. Use "finch" or "provider" for sandbox testing, depending on test plan. See Finch's [documentation](https://developer.tryfinch.com/implementation-guide/Test/Testing-Plan) for an overview of Finch and Provider sandboxes.
|
|
37
|
-
// sandbox: false,
|
|
38
|
-
// manual: false,
|
|
39
|
-
// zIndex: 999,
|
|
35
|
+
sessionId,
|
|
36
|
+
// zIndex: 999, // Set this to change the z-index of the Connect iframe, defaults to 999
|
|
40
37
|
onSuccess,
|
|
41
38
|
onError,
|
|
42
39
|
onClose,
|
package/dist/index.es.js
CHANGED
|
@@ -41,7 +41,7 @@ const constructAuthUrl = (connectOptions) => {
|
|
|
41
41
|
if (state)
|
|
42
42
|
authUrl.searchParams.append('state', state);
|
|
43
43
|
// replace with actual SDK version by rollup
|
|
44
|
-
authUrl.searchParams.append('sdk_version', 'react-3.15.
|
|
44
|
+
authUrl.searchParams.append('sdk_version', 'react-3.15.1');
|
|
45
45
|
return authUrl.href;
|
|
46
46
|
};
|
|
47
47
|
const noop = () => {
|
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ const constructAuthUrl = (connectOptions) => {
|
|
|
45
45
|
if (state)
|
|
46
46
|
authUrl.searchParams.append('state', state);
|
|
47
47
|
// replace with actual SDK version by rollup
|
|
48
|
-
authUrl.searchParams.append('sdk_version', 'react-3.15.
|
|
48
|
+
authUrl.searchParams.append('sdk_version', 'react-3.15.1');
|
|
49
49
|
return authUrl.href;
|
|
50
50
|
};
|
|
51
51
|
const noop = () => {
|
package/example/src/App.tsx
CHANGED
|
@@ -13,13 +13,10 @@ const App = () => {
|
|
|
13
13
|
const onError = (value: ErrorEvent) => setResult({ kind: 'error', value });
|
|
14
14
|
const onClose = () => setResult({ kind: 'closed' });
|
|
15
15
|
|
|
16
|
+
const sessionId = '';
|
|
17
|
+
|
|
16
18
|
const { open } = useFinchConnect({
|
|
17
|
-
|
|
18
|
-
products: ['company', 'directory', 'individual', 'employment'],
|
|
19
|
-
// For 'sandbox`, omit or use 'false' if in production. Use "finch" or "provider" for sandbox testing, depending on test plan. See Finch's [documentation](https://developer.tryfinch.com/implementation-guide/Test/Testing-Plan) for an overview of Finch and Provider sandboxes.
|
|
20
|
-
// sandbox: false,
|
|
21
|
-
// payrollProvider: '<payroll-provider-id>',
|
|
22
|
-
//connectionId: '<connection-id>', // Used for reauth of an existing connection
|
|
19
|
+
sessionId,
|
|
23
20
|
onSuccess,
|
|
24
21
|
onError,
|
|
25
22
|
onClose,
|