react-native-plaid-link-sdk 12.8.3 → 13.0.0
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/.eslintrc.js +5 -0
- package/.gitattributes +3 -0
- package/.nvmrc +1 -0
- package/CHANGELOG.md +1458 -0
- package/README.md +17 -278
- package/V13_MIGRATION_GUIDE.md +470 -0
- package/android/build.gradle +30 -98
- package/android/src/main/AndroidManifest.xml +1 -8
- package/android/src/main/java/expo/modules/plaidlinksdk/PlaidEmbeddedResultDispatcher.kt +19 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/PlaidResultMappers.kt +217 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/RNPlaidLinkSdkVersion.kt +5 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkModule.kt +183 -0
- package/android/src/main/java/expo/modules/plaidlinksdk/ReactNativePlaidLinkSdkView.kt +69 -0
- package/build/PlaidEmbeddedSearchView.d.ts +12 -0
- package/build/PlaidEmbeddedSearchView.d.ts.map +1 -0
- package/build/PlaidEmbeddedSearchView.js +8 -0
- package/build/PlaidEmbeddedSearchView.js.map +1 -0
- package/{dist/src/Types.d.ts → build/ReactNativePlaidLinkSdk.types.d.ts} +78 -47
- package/build/ReactNativePlaidLinkSdk.types.d.ts.map +1 -0
- package/{dist/build → build}/ReactNativePlaidLinkSdk.types.js +82 -71
- package/build/ReactNativePlaidLinkSdk.types.js.map +1 -0
- package/build/ReactNativePlaidLinkSdkModule.d.ts +16 -0
- package/build/ReactNativePlaidLinkSdkModule.d.ts.map +1 -0
- package/{dist/build → build}/ReactNativePlaidLinkSdkModule.js +1 -1
- package/build/ReactNativePlaidLinkSdkModule.js.map +1 -0
- package/build/index.d.ts +13 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +134 -0
- package/build/index.js.map +1 -0
- package/eslint.config.js +3 -0
- package/expo-module.config.json +9 -0
- package/ios/Frameworks/LinkKit.xcframework/Info.plist +61 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit-Swift.h +327 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Headers/LinkKit.h +22 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.abi.json +53681 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.private.swiftinterface +756 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftinterface +756 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/Modules/module.modulemap +11 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64/LinkKit.framework/_CodeSignature/CodeResources +205 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Headers/LinkKit-Swift.h +650 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Headers/LinkKit.h +22 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.abi.json +52299 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.private.swiftinterface +751 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftinterface +751 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/arm64-apple-ios-macabi.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.abi.json +52299 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.private.swiftinterface +751 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftinterface +751 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/LinkKit.swiftmodule/x86_64-apple-ios-macabi.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Modules/module.modulemap +11 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Resources/Info.plist +59 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/Resources/PrivacyInfo.xcprivacy +32 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-maccatalyst/LinkKit.framework/Versions/A/_CodeSignature/CodeResources +230 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit-Swift.h +650 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Headers/LinkKit.h +22 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Info.plist +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/LinkKit +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.abi.json +53681 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +756 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +756 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +53681 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +756 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +756 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/LinkKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/Modules/module.modulemap +11 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/PrivacyInfo.xcprivacy +32 -0
- package/ios/Frameworks/LinkKit.xcframework/ios-arm64_x86_64-simulator/LinkKit.framework/_CodeSignature/CodeResources +256 -0
- package/ios/ReactNativePlaidLinkSdk.podspec +31 -0
- package/ios/src/PlaidEmbeddedSearchView.swift +101 -0
- package/ios/src/RNPlaidLinkSdkVersion.swift +19 -0
- package/ios/src/ReactNativePlaidLinkSdkModule.swift +555 -0
- package/jest.config.js +21 -0
- package/jest.setup.js +7 -0
- package/package.json +31 -76
- package/scripts/check-package-entrypoints.js +146 -0
- package/scripts/extract-rn-enums.js +49 -0
- package/src/PlaidEmbeddedSearchView.tsx +35 -0
- package/src/ReactNativePlaidLinkSdk.types.ts +894 -0
- package/src/ReactNativePlaidLinkSdkModule.ts +31 -0
- package/src/index.ts +207 -22
- package/tsconfig.json +9 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/android/gradle.properties +0 -31
- package/android/gradlew +0 -174
- package/android/gradlew.bat +0 -89
- package/android/src/main/java/com/plaid/ActivityResultHandler.java +0 -7
- package/android/src/main/java/com/plaid/ActivityResultManager.java +0 -15
- package/android/src/main/java/com/plaid/GlobalFunctions.kt +0 -42
- package/android/src/main/java/com/plaid/PLKEmbeddedView.kt +0 -161
- package/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt +0 -50
- package/android/src/main/java/com/plaid/PlaidModule.kt +0 -291
- package/android/src/main/java/com/plaid/PlaidPackage.java +0 -117
- package/android/src/main/java/com/plaid/gson/PlaidJsonConverter.kt +0 -94
- package/android/src/main/java/com/plaid/gson/RNAccountAdapter.kt +0 -48
- package/android/src/main/java/com/plaid/gson/RNEventMetadataAdapter.kt +0 -49
- package/android/src/main/java/com/plaid/gson/RNLinkInstitutionAdapter.kt +0 -34
- package/android/src/main/res/layout/plk_embedded_view.xml +0 -5
- package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerDelegate.java +0 -35
- package/android/src/paper/java/com/facebook/react/viewmanagers/PLKEmbeddedViewManagerInterface.java +0 -18
- package/android/src/paper/java/com/plaid/NativePlaidLinkModuleAndroidSpec.java +0 -64
- package/android/src/paper/java/com/plaid/NativePlaidLinkModuleiOSSpec.java +0 -59
- package/dist/build/EmbeddedLink/EmbeddedLinkView.d.ts +0 -2
- package/dist/build/EmbeddedLink/EmbeddedLinkView.js +0 -56
- package/dist/build/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
- package/dist/build/EmbeddedLink/EmbeddedLinkView.web.js +0 -2
- package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
- package/dist/build/EmbeddedLink/NativeEmbeddedLinkView.js +0 -3
- package/dist/build/PlaidEmbeddedSearchView.d.ts +0 -2
- package/dist/build/PlaidEmbeddedSearchView.js +0 -25
- package/dist/build/PlaidLink.d.ts +0 -7
- package/dist/build/PlaidLink.js +0 -137
- package/dist/build/ReactNativePlaidLinkSdk.types.d.ts +0 -108
- package/dist/build/ReactNativePlaidLinkSdkModule.d.ts +0 -2
- package/dist/build/ReactNativePlaidLinkSdkView.d.ts +0 -2
- package/dist/build/ReactNativePlaidLinkSdkView.js +0 -7
- package/dist/build/Types.d.ts +0 -108
- package/dist/build/Types.js +0 -462
- package/dist/build/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -2
- package/dist/build/fabric/EmbeddedLinkViewNativeComponent.js +0 -3
- package/dist/build/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -2
- package/dist/build/fabric/NativePlaidLinkModuleAndroid.js +0 -5
- package/dist/build/fabric/NativePlaidLinkModuleiOS.d.ts +0 -2
- package/dist/build/fabric/NativePlaidLinkModuleiOS.js +0 -5
- package/dist/build/fabric/fabricUtils.d.ts +0 -1
- package/dist/build/fabric/fabricUtils.js +0 -2
- package/dist/build/index.d.ts +0 -14
- package/dist/build/index.js +0 -154
- package/dist/scripts/check-package-entrypoints.d.ts +0 -1
- package/dist/scripts/check-package-entrypoints.js +0 -61
- package/dist/src/EmbeddedLink/EmbeddedLinkView.d.ts +0 -13
- package/dist/src/EmbeddedLink/EmbeddedLinkView.js +0 -55
- package/dist/src/EmbeddedLink/EmbeddedLinkView.web.d.ts +0 -1
- package/dist/src/EmbeddedLink/EmbeddedLinkView.web.js +0 -1
- package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.d.ts +0 -2
- package/dist/src/EmbeddedLink/NativeEmbeddedLinkView.js +0 -2
- package/dist/src/PlaidLink.d.ts +0 -34
- package/dist/src/PlaidLink.js +0 -136
- package/dist/src/Types.js +0 -463
- package/dist/src/__tests__/Types.tests.d.ts +0 -1
- package/dist/src/__tests__/Types.tests.js +0 -14
- package/dist/src/fabric/EmbeddedLinkViewNativeComponent.d.ts +0 -15
- package/dist/src/fabric/EmbeddedLinkViewNativeComponent.js +0 -2
- package/dist/src/fabric/NativePlaidLinkModuleAndroid.d.ts +0 -15
- package/dist/src/fabric/NativePlaidLinkModuleAndroid.js +0 -4
- package/dist/src/fabric/NativePlaidLinkModuleiOS.d.ts +0 -15
- package/dist/src/fabric/NativePlaidLinkModuleiOS.js +0 -4
- package/dist/src/fabric/fabricUtils.d.ts +0 -1
- package/dist/src/fabric/fabricUtils.js +0 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -5
- package/ios/PLKEmbeddedView.m +0 -7
- package/ios/PLKEmbeddedView.swift +0 -116
- package/ios/PLKEmbeddedViewComponentView.h +0 -28
- package/ios/PLKEmbeddedViewComponentView.mm +0 -91
- package/ios/PLKEmbeddedViewManager.swift +0 -14
- package/ios/PLKFabricHelpers.h +0 -116
- package/ios/RNLinksdk-Bridging-Header.h +0 -8
- package/ios/RNLinksdk.h +0 -19
- package/ios/RNLinksdk.mm +0 -732
- package/ios/RNPlaidHelper.h +0 -15
- package/ios/RNPlaidHelper.m +0 -33
- package/ios/react_native_plaid_link_sdk.h +0 -2
- package/react-native-plaid-link-sdk.podspec +0 -40
- package/src/EmbeddedLink/EmbeddedLinkView.tsx +0 -95
- package/src/EmbeddedLink/EmbeddedLinkView.web.tsx +0 -5
- package/src/EmbeddedLink/NativeEmbeddedLinkView.tsx +0 -3
- package/src/PlaidLink.tsx +0 -167
- package/src/Types.ts +0 -634
- package/src/__tests__/Types.tests.ts +0 -15
- package/src/fabric/EmbeddedLinkViewNativeComponent.ts +0 -24
- package/src/fabric/NativePlaidLinkModuleAndroid.ts +0 -32
- package/src/fabric/NativePlaidLinkModuleiOS.ts +0 -33
- package/src/fabric/fabricUtils.ts +0 -2
package/README.md
CHANGED
|
@@ -1,300 +1,39 @@
|
|
|
1
1
|
# Plaid React Native SDK
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/plaid/react-native-plaid-link-sdk/blob/master/LICENSE)
|
|
3
|
+
React Native SDK for Plaid Link, built on Expo Modules for the v13 native architecture.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
## API documentation
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
[
|
|
7
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/react-native-plaid-link-sdk/)
|
|
8
|
+
- [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/react-native-plaid-link-sdk/)
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Features
|
|
14
|
-
|
|
15
|
-
The SDK provides:
|
|
16
|
-
|
|
17
|
-
- A PlaidLink functional component.
|
|
18
|
-
- A function to open Link.
|
|
19
|
-
- A hook to handle [onEvent](https://plaid.com/docs/link/react-native/#onevent) callbacks.
|
|
20
|
-
- A function to dismiss link on iOS.
|
|
10
|
+
## Migration guides
|
|
21
11
|
|
|
22
|
-
|
|
12
|
+
- [v13 migration guide](./V13_MIGRATION_GUIDE.md)
|
|
23
13
|
|
|
24
|
-
|
|
14
|
+
## Installation
|
|
25
15
|
|
|
26
|
-
|
|
16
|
+
### Expo projects
|
|
27
17
|
|
|
28
|
-
|
|
18
|
+
Install the package and run the app in a development build or another custom native runtime. Expo Go cannot load custom native modules.
|
|
29
19
|
|
|
30
20
|
```sh
|
|
31
|
-
npm install
|
|
21
|
+
npm install react-native-plaid-link-sdk
|
|
32
22
|
```
|
|
33
23
|
|
|
34
|
-
###
|
|
24
|
+
### Bare React Native projects
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
Bare React Native apps must install and configure the [`expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before using this SDK.
|
|
37
27
|
|
|
38
28
|
```sh
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Android Setup
|
|
43
|
-
|
|
44
|
-
- Android 5.0 (API level 21) and above.
|
|
45
|
-
- Your `compileSdkVersion` must be `33`.
|
|
46
|
-
- Android gradle plugin `4.x` and above.
|
|
47
|
-
|
|
48
|
-
AutoLinking should handle all of the Android setup.
|
|
49
|
-
|
|
50
|
-
Remember to register your Android package name in the [Dashboard](https://dashboard.plaid.com/developers/api). This is required in order to connect to OAuth institutions (which includes most major banks).
|
|
51
|
-
|
|
52
|
-
### React Native Setup
|
|
53
|
-
|
|
54
|
-
- To initialize `PlaidLink`, you will need to first create a `link_token` at [/link/token/create](https://plaid.com/docs/api/link/#linktokencreate). Check out our [QuickStart guide](https://plaid.com/docs/quickstart/#introduction) for additional API information.
|
|
55
|
-
|
|
56
|
-
#### Version >= 11.6.0
|
|
57
|
-
|
|
58
|
-
Starting from version `11.6.0`, we introduced the ability to preload part of the Link experience. You can initiate the preloading process by invoking the `create` function.
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
function createLinkTokenConfiguration(
|
|
62
|
-
token: string,
|
|
63
|
-
noLoadingState: boolean = false,
|
|
64
|
-
): LinkTokenConfiguration {
|
|
65
|
-
return {
|
|
66
|
-
token: token,
|
|
67
|
-
// Hides native activity indicator if true.
|
|
68
|
-
noLoadingState: noLoadingState,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const tokenConfiguration = createLinkTokenConfiguration("#GENERATED_LINK_TOKEN#");
|
|
73
|
-
create(tokenConfiguration);
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
After calling `create`, you can subsequently invoke the `open` function. Note that maximizing the delay between these two calls will reduce latency for your users by allowing Link more time to load.
|
|
77
|
-
|
|
78
|
-
```typescript
|
|
79
|
-
function createLinkOpenProps(): LinkOpenProps {
|
|
80
|
-
return {
|
|
81
|
-
onSuccess: (success: LinkSuccess) => {
|
|
82
|
-
// User was able to successfully link their account.
|
|
83
|
-
console.log('Success: ', success);
|
|
84
|
-
},
|
|
85
|
-
onExit: (linkExit: LinkExit) => {
|
|
86
|
-
// User exited Link session. There may or may not be an error depending on what occured.
|
|
87
|
-
console.log('Exit: ', linkExit);
|
|
88
|
-
dismissLink();
|
|
89
|
-
},
|
|
90
|
-
// MODAL or FULL_SCREEEN presentation on iOS. Defaults to MODAL.
|
|
91
|
-
iOSPresentationStyle: LinkIOSPresentationStyle.MODAL,
|
|
92
|
-
logLevel: LinkLogLevel.ERROR,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const openProps = createLinkOpenProps();
|
|
97
|
-
open(openProps);
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
#### Version < 11.6.0
|
|
101
|
-
|
|
102
|
-
In versions prior to `11.6.0`, you can open a link by calling the `openLink` function.
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
// Create PlaidLinkProps from the provided token string.
|
|
106
|
-
function makeLinkTokenProps(token: string): PlaidLinkProps {
|
|
107
|
-
return {
|
|
108
|
-
tokenConfig: {
|
|
109
|
-
token: token,
|
|
110
|
-
logLevel: LinkLogLevel.ERROR,
|
|
111
|
-
// Hides native activity indicator if true.
|
|
112
|
-
noLoadingState: false,
|
|
113
|
-
},
|
|
114
|
-
onSuccess: (success: LinkSuccess) => {
|
|
115
|
-
// User was able to successfully link their account.
|
|
116
|
-
console.log('Success: ', success);
|
|
117
|
-
success.metadata.accounts.forEach(it => console.log('accounts', it));
|
|
118
|
-
},
|
|
119
|
-
onExit: (linkExit: LinkExit) => {
|
|
120
|
-
// User exited Link session. There may or may not be an error depending on what occured.
|
|
121
|
-
console.log('Exit: ', linkExit);
|
|
122
|
-
dismissLink();
|
|
123
|
-
},
|
|
124
|
-
// MODAL or FULL_SCREEEN presentation on iOS. Defaults to MODAL.
|
|
125
|
-
iOSPresentationStyle: LinkIOSPresentationStyle.MODAL,
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const linkTokenProps = makeLinkTokenProps("#GENERATED_LINK_TOKEN#");
|
|
130
|
-
openLink(linkTokenProps);
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
#### OAuth requirements
|
|
134
|
-
|
|
135
|
-
:warning: All integrations must use version 9.0.0 or later of the React Native SDK (requires version 4.1.0 or later of the iOS LinkKit SDK) to maintain support for Chase OAuth on iOS.
|
|
136
|
-
|
|
137
|
-
##### Android OAuth Requirements
|
|
138
|
-
|
|
139
|
-
###### Register your app package name
|
|
140
|
-
1. Log into your [Plaid Dashboard](https://dashboard.plaid.com/developers/api) and navigate to the API page under the Developers tab.
|
|
141
|
-
2. Next to Allowed Android package names click "Configure" then "Add New Android Package Name".
|
|
142
|
-
3. Enter your package name, for example `com.plaid.example`.
|
|
143
|
-
4. Click "Save Changes", you may be prompted to re-enter your password.
|
|
144
|
-
|
|
145
|
-
##### iOS OAuth Requirements
|
|
146
|
-
|
|
147
|
-
For iOS OAuth to work, specific requirements must be met.
|
|
148
|
-
1. Redirect URIs must be [registered](https://plaid.com/docs/link/ios/#register-your-redirect-uri), and set up as [universal links](https://developer.apple.com/documentation/xcode/supporting-associated-domains).
|
|
149
|
-
2. Your native iOS application, must be configured with your associated domain. See your iOS [set up universal links](https://plaid.com/docs/link/ios/#set-up-universal-links) for more information.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
##### Link Token OAuth Requirements
|
|
153
|
-
|
|
154
|
-
- On iOS you must configure your `link_token` with a [redirect_uri](https://plaid.com/docs/api/link/#link-token-create-request-redirect-uri) to support OAuth. When creating a `link_token` for initializing Link on Android, `android_package_name` must be specified and `redirect_uri` must be left blank.
|
|
155
|
-
|
|
156
|
-
- On Android you must configure your `link_token` with an [android_package_name](https://plaid.com/docs/api/link/#link-token-create-request-android-package-name) to support OAuth. When creating a `link_token` for initializing Link on iOS, `android_package_name` must be left blank and `redirect_uri` should be used instead.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
#### To receive onEvent callbacks:
|
|
160
|
-
|
|
161
|
-
The React Native Plaid module emits `onEvent` events throughout the account linking process — see [details here](https://plaid.com/docs/link/react-native/#onevent). To receive these events in your React Native app, use the `usePlaidEmitter` hook in react functional components:
|
|
162
|
-
|
|
163
|
-
```javascript
|
|
164
|
-
usePlaidEmitter((event: LinkEvent) => {
|
|
165
|
-
console.log(event)
|
|
166
|
-
})
|
|
29
|
+
npm install react-native-plaid-link-sdk
|
|
30
|
+
npx pod-install
|
|
167
31
|
```
|
|
168
32
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
The `destroy()` method clears state and resources from a previously opened session.
|
|
172
|
-
It's especially useful if you're seeing unexpected behavior when calling `create()` multiple times — for example, if the phone number isn't submitting properly after multiple `create()` calls.
|
|
173
|
-
|
|
174
|
-
#### Problem scenario:
|
|
175
|
-
```ts
|
|
176
|
-
create(tokenConfiguration1)
|
|
177
|
-
create(tokenConfiguration2)
|
|
178
|
-
submit(phoneNumber) // <-- might not submit correctly
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
#### Solution:
|
|
182
|
-
```ts
|
|
183
|
-
create(tokenConfiguration1)
|
|
184
|
-
async () => {
|
|
185
|
-
try {
|
|
186
|
-
await destroy(); // Clear previous session state
|
|
187
|
-
create(tokenConfiguration2);
|
|
188
|
-
submit(phoneNumber);
|
|
189
|
-
} catch (e) {
|
|
190
|
-
console.error('Error during flow:', e);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
By calling destroy() before the second create(), you ensure a clean state, preventing issues like failed phone number submissions.
|
|
196
|
-
|
|
197
|
-
## Upgrading
|
|
198
|
-
|
|
199
|
-
Plaid releases updates to the SDK approximately every few months. For the best user experience, we recommend using the latest version of the SDK.
|
|
200
|
-
|
|
201
|
-
Major SDK versions are released annually. SDK versions are supported for two years; with each major SDK release, Plaid will stop officially supporting any previous SDK versions that are more than two years old.
|
|
202
|
-
|
|
203
|
-
While these older versions are expected to continue to work without disruption, Plaid will not provide assistance with unsupported SDK versions.
|
|
204
|
-
|
|
205
|
-
## Migration guides
|
|
206
|
-
|
|
207
|
-
11.x->12.x:
|
|
208
|
-
- Removed the `PlaidLink` component and `openLink` function, which were deprecated in version 11.6.0. If you are using this method of opening Link, replace it with the new process that uses `create` and then `open`. For sample code, see [Version 11.6](https://github.com/plaid/react-native-plaid-link-sdk?tab=readme-ov-file#version--1160) or the [Plaid React Native Link docs](https://plaid.com/docs/link/react-native).
|
|
209
|
-
- Also see [Version compatibility table](#version-compatibility) for required toolchain updates.
|
|
210
|
-
9.x/10.x-> 11.x: See [React Native SDK 11 Migration Guide](https://github.com/plaid/react-native-plaid-link-sdk/blob/master/v11-migration-guide.md)
|
|
211
|
-
|
|
212
|
-
If migrating from older versions, see the [docs](https://plaid.com/docs/link/react-native/#migration-guides) for more information.
|
|
213
|
-
|
|
214
|
-
## Version compatibility
|
|
215
|
-
|
|
216
|
-
| Plaid SDK Version | Min React Native Version | Android SDK | Android Min Version | Android Compile Version| iOS SDK | iOS Min Version | Status |
|
|
217
|
-
|-------------------|--------------------------|-------------|---------------------|------------------------|---------|-----------------|-------------------------------|
|
|
218
|
-
| 12.8.3 | * | [5.5.1+] | 21 | 34 | >=6.4.3 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
219
|
-
| 12.8.2 | * | [5.5.1+] | 21 | 34 | >=6.4.3 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
220
|
-
| 12.8.1 | * | [5.5.2+] | 21 | 34 | >=6.4.3 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
221
|
-
| 12.8.0 | * | [5.5.1+] | 21 | 34 | >=6.4.3 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
222
|
-
| 12.7.0 | * | [5.5.0+] | 21 | 34 | >=6.4.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
223
|
-
| 12.6.1 | * | [5.4.0+] | 21 | 34 | >=6.4.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
224
|
-
| 12.6.0 | * | [5.4.0+] | 21 | 34 | >=6.4.1 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
225
|
-
| 12.5.3 | * | [5.3.4+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
226
|
-
| 12.5.2 | * | [5.3.3+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
227
|
-
| 12.5.1 | * | [5.3.2+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
228
|
-
| 12.5.0 | * | [5.3.2+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
229
|
-
| 12.4.0 | * | [5.3.0+] | 21 | 34 | >=6.4.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
230
|
-
| 12.3.2 | * | [5.2.0+] | 21 | 34 | >=6.3.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
231
|
-
| 12.3.1 | * | [5.2.0+] | 21 | 34 | >=6.3.1 | 14.0 | **Deprecated** |
|
|
232
|
-
| 12.3.0 | * | [5.2.0+] | 21 | 34 | >=6.3.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
233
|
-
| 12.2.1 | * | [5.1.1+] | 21 | 34 | >=6.2.1 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
234
|
-
| 12.2.0 | * | [5.1.1+] | 21 | 34 | >=6.2.1 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
235
|
-
| 12.1.1 | * | [5.0.0+] | 21 | 34 | >=6.1.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
236
|
-
| 12.1.0 | * | [5.0.0+] | 21 | 34 | >=6.1.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
237
|
-
| 12.0.3 | * | [5.0.0+] | 21 | 34 | >=6.0.4 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
238
|
-
| 12.0.2 | * | [5.0.0+] | 21 | 34 | >=6.0.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
239
|
-
| 12.0.1 | * | [5.0.0+] | 21 | 34 | >=6.0.2 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
240
|
-
| 12.0.0 | * | [5.0.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 16.1.0 |
|
|
241
|
-
| 12.0.0-beta.3 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 15.3.0 |
|
|
242
|
-
| 12.0.0-beta.2 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | Active, supports Xcode 15.3.0 |
|
|
243
|
-
| 12.0.0-beta.1 | * | [4.4.0+] | 21 | 34 | >=6.0.0 | 14.0 | **Deprecated** |
|
|
244
|
-
| 11.13.3 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
245
|
-
| 11.13.2 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
246
|
-
| 11.13.1 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
247
|
-
| 11.13.0 | * | [4.6.1+] | 21 | 34 | >=5.6.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
248
|
-
| 11.12.1 | * | [4.6.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
249
|
-
| 11.12.0 | * | [4.6.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
250
|
-
| 11.11.2 | * | [4.5.1+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
251
|
-
| 11.11.1 | * | [4.5.1+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
252
|
-
| 11.11.0 | * | [4.5.0+] | 21 | 34 | >=5.6.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
253
|
-
| 11.10.3 | * | [4.4.2+] | 21 | 34 | >=5.5.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
254
|
-
| 11.10.2 | * | [4.3.1+] | 21 | 34 | >=5.5.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
255
|
-
| 11.10.1 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
256
|
-
| 11.10.0 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
257
|
-
| 11.9.0 | * | [4.3.1+] | 21 | 34 | >=5.5.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
258
|
-
| 11.8.2 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
259
|
-
| 11.8.1 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
260
|
-
| 11.8.0 | * | [4.3.1+] | 21 | 34 | >=5.4.2 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
261
|
-
| 11.7.1 | * | [4.3.0+] | 21 | 34 | >=5.4.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
262
|
-
| 11.7.0 | * | [4.3.0+] | 21 | 34 | >=5.4.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
263
|
-
| 11.6.0 | * | [4.2.0+] | 21 | 34 | >=5.3.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
264
|
-
| 11.5.2 | * | [4.1.1+] | 21 | 34 | >=5.2.1 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
265
|
-
| 11.5.1 | * | [4.1.1+] | 21 | 34 | >=5.2.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
266
|
-
| 11.5.0 | * | [4.1.1+] | 21 | 34 | >=5.2.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
267
|
-
| 11.4.0 | * | [4.1.1+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
268
|
-
| 11.3.0 | * | [4.0.0+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
269
|
-
| ~11.2.0~ | * | [4.1.0+] | 21 | 34 | >=5.1.0 | 14.0 | **Deprecated** |
|
|
270
|
-
| 11.1.0 | * | [4.0.0+] | 21 | 34 | >=5.1.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
271
|
-
| 11.0.3 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
272
|
-
| 11.0.2 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
273
|
-
| 11.0.1 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
274
|
-
| 11.0.0 | * | [4.0.0+] | 21 | 34 | >=5.0.0 | 14.0 | Active, supports Xcode 15.0.1 |
|
|
275
|
-
| 10.13.0 | >= 0.66.0 | [3.14.3+] | 21 | 33 | >=4.7.2 | 11.0 | Active, supports Xcode 14 |
|
|
276
|
-
| 10.12.0 | >= 0.66.0 | [3.14.3+] | 21 | 33 | >=4.7.1 | 11.0 | Active, supports Xcode 14 |
|
|
277
|
-
| 10.11.0 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.1 | 11.0 | Active, supports Xcode 14 |
|
|
278
|
-
| ~10.10.0~ | >= 0.66.0 | [3.14.2+] | 21 | 33 | >=4.7.1 | 11.0 | **Deprecated** |
|
|
279
|
-
| 10.9.1 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
|
|
280
|
-
| 10.9.0 | >= 0.66.0 | [3.14.1+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
|
|
281
|
-
| 10.8.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.7.0 | 11.0 | Active, supports Xcode 14 |
|
|
282
|
-
| 10.7.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
|
|
283
|
-
| 10.6.4 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
|
|
284
|
-
| 10.6.3 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Active, supports Xcode 14 |
|
|
285
|
-
| 10.6.2 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Deprecated, supports Xcode 14 |
|
|
286
|
-
| 10.6.0 | >= 0.66.0 | [3.14.0+] | 21 | 33 | >=4.6.4 | 11.0 | Deprecated, supports Xcode 14 |
|
|
287
|
-
| 10.5.0 | >= 0.66.0 | [3.13.2+] | 21 | 33 | >=4.5.1 | 11.0 | Deprecated, supports Xcode 14 |
|
|
288
|
-
| 10.4.0 | >= 0.66.0 | [3.13.2+] | 21 | 33 | >=4.4.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
289
|
-
| 10.3.0 | >= 0.66.0 | [3.12.1+] | 21 | 33 | >=4.3.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
290
|
-
| 10.2.0 | >= 0.66.0 | [3.12.0+] | 21 | 33 | >=4.3.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
291
|
-
| 10.1.0 | >= 0.66.0 | [3.11.0+] | 21 | 33 | >=4.2.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
292
|
-
| 10.0.0 | >= 0.66.0 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
293
|
-
| 9.1.0 | >= 0.65.3 | [3.13.2+] | 21 | 33 | >=4.4.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
294
|
-
| 9.0.1 | >= 0.65.3 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
295
|
-
| 9.0.0 | >= 0.65.3 | [3.10.1+] | 21 | 33 | >=4.1.0 | 11.0 | Deprecated, supports Xcode 14 |
|
|
33
|
+
### Platform setup
|
|
296
34
|
|
|
35
|
+
Configure Android package names, iOS bundle identifiers, and OAuth redirect settings in the Plaid Dashboard for the environments your app supports.
|
|
297
36
|
|
|
298
37
|
## Contributing
|
|
299
38
|
|
|
300
|
-
|
|
39
|
+
Issues and pull requests are welcome in this repository.
|