@quiltt/react-native 4.5.0 → 4.5.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/CHANGELOG.md +10 -0
- package/README.md +88 -4
- package/dist/index.js +1 -1
- package/package.json +15 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @quiltt/react-native
|
|
2
2
|
|
|
3
|
+
## 4.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#389](https://github.com/quiltt/quiltt-js/pull/389) [`a6a2a7e`](https://github.com/quiltt/quiltt-js/commit/a6a2a7ea94c7204a69b53f191ee738bcdc520a10) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Upgrade React versions across all projects
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`a6a2a7e`](https://github.com/quiltt/quiltt-js/commit/a6a2a7ea94c7204a69b53f191ee738bcdc520a10)]:
|
|
10
|
+
- @quiltt/react@4.5.1
|
|
11
|
+
- @quiltt/core@4.5.1
|
|
12
|
+
|
|
3
13
|
## 4.5.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
`@quiltt/react-native` provides React Native Components for integrating Quiltt Connector into React Native and Expo applications.
|
|
7
7
|
|
|
8
|
+
For general project information and contributing guidelines, see the [main repository README](../../README.md).
|
|
9
|
+
|
|
8
10
|
## Installation
|
|
9
11
|
|
|
10
12
|
`@quiltt/react-native` expects `react`, `react-native`,`react-native-webview`, `base-64` and `react-native-url-polyfill` as peer dependencies.
|
|
@@ -12,15 +14,15 @@
|
|
|
12
14
|
With `npm`:
|
|
13
15
|
|
|
14
16
|
```shell
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
npm install base-64 react-native-webview react-native-url-polyfill
|
|
18
|
+
npm install @quiltt/react-native
|
|
17
19
|
```
|
|
18
20
|
|
|
19
21
|
With `yarn`:
|
|
20
22
|
|
|
21
23
|
```shell
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
yarn add base-64 react-native-webview react-native-url-polyfill
|
|
25
|
+
yarn add @quiltt/react-native
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
With `pnpm`:
|
|
@@ -76,3 +78,85 @@ export const App = () => {
|
|
|
76
78
|
|
|
77
79
|
export default App
|
|
78
80
|
```
|
|
81
|
+
|
|
82
|
+
### Handling OAuth Deep Links
|
|
83
|
+
|
|
84
|
+
When users authenticate with financial institutions, they'll be redirected back to your app via a deep link. You need to listen for these deep links and pass them to the `QuilttConnector` to complete the OAuth flow.
|
|
85
|
+
|
|
86
|
+
**Platform Note:** This deep link handling is primarily needed for **Android**, where OAuth flows typically open in an external browser. On **iOS**, the OAuth flow usually stays within the app's web view, so this fallback mechanism may not be necessary. However, implementing it ensures consistent behavior across both platforms.
|
|
87
|
+
|
|
88
|
+
#### Example with Deep Link Handling
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { useEffect, useRef } from 'react'
|
|
92
|
+
import { Linking, View } from 'react-native'
|
|
93
|
+
import { QuilttProvider } from '@quiltt/react'
|
|
94
|
+
import { QuilttConnector } from '@quiltt/react-native'
|
|
95
|
+
import type { ConnectorSDKCallbackMetadata, QuilttConnectorHandle } from '@quiltt/react-native'
|
|
96
|
+
|
|
97
|
+
export const ConnectorScreen = () => {
|
|
98
|
+
const connectorRef = useRef<QuilttConnectorHandle>(null)
|
|
99
|
+
|
|
100
|
+
const sessionToken = '<TOKEN_OBTAINED_FROM_THE_SERVER>'
|
|
101
|
+
const oauthRedirectUrl = 'https://myapp.com/quiltt/callback'
|
|
102
|
+
|
|
103
|
+
// Listen for deep links and handle OAuth callbacks
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
const subscription = Linking.addEventListener('url', (event) => {
|
|
106
|
+
console.log('Deep link received:', event.url)
|
|
107
|
+
|
|
108
|
+
// Check if this is an OAuth callback for Quiltt
|
|
109
|
+
if (event.url.includes('quiltt-connect/callback') || event.url.includes('quiltt/callback')) {
|
|
110
|
+
console.log('Processing Quiltt OAuth callback')
|
|
111
|
+
connectorRef.current?.handleOAuthCallback(event.url)
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
return () => subscription.remove()
|
|
116
|
+
}, [])
|
|
117
|
+
|
|
118
|
+
const handleExitSuccess = (metadata: ConnectorSDKCallbackMetadata) => {
|
|
119
|
+
console.log('Successfully created connection!', {
|
|
120
|
+
connectionId: metadata.connectionId,
|
|
121
|
+
})
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<QuilttProvider token={sessionToken}>
|
|
126
|
+
<View style={{ flex: 1 }}>
|
|
127
|
+
<QuilttConnector
|
|
128
|
+
ref={connectorRef}
|
|
129
|
+
connectorId="<CONNECTOR_ID>"
|
|
130
|
+
oauthRedirectUrl={oauthRedirectUrl}
|
|
131
|
+
onExitSuccess={handleExitSuccess}
|
|
132
|
+
/>
|
|
133
|
+
</View>
|
|
134
|
+
</QuilttProvider>
|
|
135
|
+
)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export default ConnectorScreen
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Important Notes:**
|
|
142
|
+
|
|
143
|
+
- The `ref` prop is required when handling OAuth callbacks
|
|
144
|
+
- The deep link URL pattern should match your `oauthRedirectUrl` configuration
|
|
145
|
+
- Make sure your app is properly configured to handle deep links (see [React Native Linking documentation](https://reactnative.dev/docs/linking))
|
|
146
|
+
|
|
147
|
+
## Typescript support
|
|
148
|
+
|
|
149
|
+
`@quiltt/react-native` is written in Typescript and ships with its own type definitions, as well as the type definitions from `@quiltt/core`.
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE.md) file for more information.
|
|
154
|
+
|
|
155
|
+
## Contributing
|
|
156
|
+
|
|
157
|
+
For information on how to contribute to this project, please refer to the [repository contributing guidelines](../../CONTRIBUTING.md).
|
|
158
|
+
|
|
159
|
+
## Related Packages
|
|
160
|
+
|
|
161
|
+
- [`@quiltt/core`](../core#readme) - Essential functionality and types
|
|
162
|
+
- [`@quiltt/react`](../react#readme) - React components and hooks
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { URL } from 'react-native-url-polyfill';
|
|
|
9
9
|
import { WebView } from 'react-native-webview';
|
|
10
10
|
import { generateStackTrace, makeBacktrace, getCauses } from '@honeybadger-io/core/build/src/util';
|
|
11
11
|
|
|
12
|
-
var version = "4.5.
|
|
12
|
+
var version = "4.5.1";
|
|
13
13
|
|
|
14
14
|
// Custom Error Reporter to avoid hooking into or colliding with a client's Honeybadger singleton
|
|
15
15
|
const notifier = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiltt/react-native",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"description": "React Native Components for Quiltt Connector",
|
|
5
5
|
"homepage": "https://github.com/quiltt/quiltt-js/tree/main/packages/react-native#readme",
|
|
6
6
|
"repository": {
|
|
@@ -30,29 +30,30 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@honeybadger-io/core": "6.6.0",
|
|
32
32
|
"lodash.debounce": "4.0.8",
|
|
33
|
-
"@quiltt/
|
|
34
|
-
"@quiltt/
|
|
33
|
+
"@quiltt/react": "4.5.1",
|
|
34
|
+
"@quiltt/core": "4.5.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@biomejs/biome": "2.
|
|
37
|
+
"@biomejs/biome": "2.3.8",
|
|
38
38
|
"@types/base-64": "1.0.2",
|
|
39
39
|
"@types/lodash.debounce": "4.0.9",
|
|
40
|
-
"@types/node": "22.
|
|
41
|
-
"@types/react": "
|
|
40
|
+
"@types/node": "22.19.2",
|
|
41
|
+
"@types/react": "19.2.7",
|
|
42
42
|
"base-64": "1.0.0",
|
|
43
|
-
"bunchee": "6.6.
|
|
44
|
-
"react": "
|
|
45
|
-
"react-native": "0.
|
|
46
|
-
"react-native-url-polyfill": "
|
|
47
|
-
"react-native-webview": "13.
|
|
48
|
-
"
|
|
49
|
-
"
|
|
43
|
+
"bunchee": "6.6.2",
|
|
44
|
+
"react": "19.2.3",
|
|
45
|
+
"react-native": "0.81.5",
|
|
46
|
+
"react-native-url-polyfill": "3.0.0",
|
|
47
|
+
"react-native-webview": "13.15.0",
|
|
48
|
+
"react-test-renderer": "19.2.3",
|
|
49
|
+
"rimraf": "6.1.2",
|
|
50
|
+
"typescript": "5.9.3"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
53
|
"base-64": "^1.0.0",
|
|
53
54
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
54
55
|
"react-native": ">=0.72.0",
|
|
55
|
-
"react-native-url-polyfill": "^
|
|
56
|
+
"react-native-url-polyfill": "^3.0.0",
|
|
56
57
|
"react-native-webview": ">=13.0.0"
|
|
57
58
|
},
|
|
58
59
|
"tags": [
|