@tryfinch/react-connect 5.0.0 → 5.0.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 +18 -3
- package/dist/index.es.js +2 -1
- package/dist/index.js +1 -1
- package/dist/react.es.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,28 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@tryfinch/react-connect)
|
|
4
4
|
|
|
5
|
-
The SDK for [Finch's](https://
|
|
5
|
+
The SDK for [Finch's](https://developer.tryfinch.com/how-finch-works/quickstart) authorization flow, Finch Connect
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
### React
|
|
10
10
|
|
|
11
|
-
Available on npm
|
|
11
|
+
Available on [npm](https://www.npmjs.com/package/@tryfinch/react-connect):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install @tryfinch/connect
|
|
14
|
+
npm install @tryfinch/react-connect
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
### JavaScript
|
|
18
18
|
|
|
19
19
|
Available via CDN:
|
|
20
|
+
> Note: Since Finch Connect is an iFrame that requires interactivity, the HTML page that is loading the SDK **must be served from a server**. If the page is hosted statically Finch Connect will not work properly.
|
|
20
21
|
|
|
21
22
|
```html
|
|
22
23
|
<script src="https://prod-cdn.tryfinch.com/latest/connect.js"></script>
|
|
23
24
|
```
|
|
24
25
|
|
|
26
|
+
Pin to a specific version (see [npm](https://www.npmjs.com/package/@tryfinch/react-connect) for available versions):
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<script src="https://prod-cdn.tryfinch.com/vX.Y.Z/connect.js"></script>
|
|
30
|
+
```
|
|
31
|
+
|
|
25
32
|
## Usage
|
|
26
33
|
|
|
34
|
+
See the documentation on setting up Finch Connect [here](https://developer.tryfinch.com/implementation-guide/Connect/Create-Account)
|
|
35
|
+
|
|
36
|
+
Example apps are available in the `example` directory of this repo. See their READMEs for how to run them.
|
|
37
|
+
|
|
27
38
|
### React
|
|
28
39
|
|
|
29
40
|
```jsx
|
|
@@ -125,3 +136,7 @@ const App = () => {
|
|
|
125
136
|
</body>
|
|
126
137
|
</html>
|
|
127
138
|
```
|
|
139
|
+
|
|
140
|
+
## Contributing
|
|
141
|
+
|
|
142
|
+
Pull requests in this repo are not routinely reviewed. Do not submit pull requests if you are having issues with Finch Connect. Instead please reach out to our support team at developers@tryfinch.com.
|
package/dist/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ const appendBaseParams = (url) => {
|
|
|
4
4
|
url.searchParams.append('app_type', 'spa');
|
|
5
5
|
url.searchParams.append('sdk_host_url', window.location.origin);
|
|
6
6
|
url.searchParams.append('mode', 'employer');
|
|
7
|
-
url.searchParams.append('sdk_version', 'unified-5.0.
|
|
7
|
+
url.searchParams.append('sdk_version', 'unified-5.0.1');
|
|
8
8
|
};
|
|
9
9
|
const constructAuthUrl = ({ sessionId, state, apiConfig, }) => {
|
|
10
10
|
const BASE_FINCH_CONNECT_URI = 'https://connect.tryfinch.com';
|
|
@@ -189,6 +189,7 @@ const useFinchConnect = (initializeArgs) => {
|
|
|
189
189
|
coreRef.current.destroy();
|
|
190
190
|
}
|
|
191
191
|
isUseFinchConnectInitialized = false;
|
|
192
|
+
isHookMounted.current = false;
|
|
192
193
|
};
|
|
193
194
|
}, []);
|
|
194
195
|
const open = (launchArgs) => {
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
url.searchParams.append('app_type', 'spa');
|
|
9
9
|
url.searchParams.append('sdk_host_url', window.location.origin);
|
|
10
10
|
url.searchParams.append('mode', 'employer');
|
|
11
|
-
url.searchParams.append('sdk_version', 'unified-5.0.
|
|
11
|
+
url.searchParams.append('sdk_version', 'unified-5.0.1');
|
|
12
12
|
};
|
|
13
13
|
const constructAuthUrl = ({ sessionId, state, apiConfig, }) => {
|
|
14
14
|
const BASE_FINCH_CONNECT_URI = 'https://connect.tryfinch.com';
|
package/dist/react.es.js
CHANGED
|
@@ -4,7 +4,7 @@ const appendBaseParams = (url) => {
|
|
|
4
4
|
url.searchParams.append('app_type', 'spa');
|
|
5
5
|
url.searchParams.append('sdk_host_url', window.location.origin);
|
|
6
6
|
url.searchParams.append('mode', 'employer');
|
|
7
|
-
url.searchParams.append('sdk_version', 'unified-5.0.
|
|
7
|
+
url.searchParams.append('sdk_version', 'unified-5.0.1');
|
|
8
8
|
};
|
|
9
9
|
const constructAuthUrl = ({ sessionId, state, apiConfig, }) => {
|
|
10
10
|
const BASE_FINCH_CONNECT_URI = 'https://connect.tryfinch.com';
|
|
@@ -160,6 +160,7 @@ const useFinchConnect = (initializeArgs) => {
|
|
|
160
160
|
coreRef.current.destroy();
|
|
161
161
|
}
|
|
162
162
|
isUseFinchConnectInitialized = false;
|
|
163
|
+
isHookMounted.current = false;
|
|
163
164
|
};
|
|
164
165
|
}, []);
|
|
165
166
|
const open = (launchArgs) => {
|