├── .gitignore
├── README.md
├── nextjs
├── .env.example
├── .gitignore
├── LICENSE
├── README.md
├── next.config.js
├── package.json
├── pnpm-lock.yaml
├── public
│ └── favicon.ico
└── src
│ ├── index.css
│ ├── lib
│ └── plaid.js
│ └── pages
│ ├── _app.jsx
│ ├── api
│ ├── create-link-token.js
│ └── exchange-public-token.js
│ ├── dash.jsx
│ └── index.jsx
├── react
├── .env.example
├── .npmrc
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
├── server.js
└── src
│ ├── App.jsx
│ ├── App.scss
│ ├── index.css
│ └── index.jsx
├── react_native
├── README.md
├── TinyQuickstartReactNative
│ ├── .buckconfig
│ ├── .bundle
│ │ └── config
│ ├── .env.example
│ ├── .eslintrc.js
│ ├── .flowconfig
│ ├── .gitignore
│ ├── .node-version
│ ├── .npmrc
│ ├── .nvmrc
│ ├── .prettierrc.js
│ ├── .ruby-version
│ ├── .watchmanconfig
│ ├── App.tsx
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── __tests__
│ │ └── App-test.js
│ ├── android
│ │ ├── app
│ │ │ ├── _BUCK
│ │ │ ├── build.gradle
│ │ │ ├── build_defs.bzl
│ │ │ ├── debug.keystore
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── tinyquickstartreactnative
│ │ │ │ │ ├── MainActivity.kt
│ │ │ │ │ └── MainApplication.kt
│ │ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── rn_edit_text_material.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ └── settings.gradle
│ ├── app.json
│ ├── babel.config.js
│ ├── components
│ │ ├── HomeScreen.tsx
│ │ ├── SuccessScreen.tsx
│ │ └── style.js
│ ├── index.js
│ ├── ios
│ │ ├── .xcode.env
│ │ ├── Podfile
│ │ ├── Podfile.lock
│ │ ├── TinyQuickstartReactNative.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── TinyQuickstartReactNative.xcscheme
│ │ ├── TinyQuickstartReactNative.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── TinyQuickstartReactNative
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.mm
│ │ │ ├── Images.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ ├── PrivacyInfo.xcprivacy
│ │ │ ├── TinyQuickstartReactNative.entitlements
│ │ │ └── main.m
│ │ └── TinyQuickstartReactNativeTests
│ │ │ ├── Info.plist
│ │ │ └── TinyQuickstartReactNativeTests.m
│ ├── metro.config.js
│ ├── package-lock.json
│ ├── package.json
│ └── server.js
├── android-studio-wipe-data.png
└── xcode-config.png
├── vanilla_js
├── .env.example
├── LICENSE
├── README.md
├── index.html
├── oauth.html
├── package-lock.json
├── package.json
└── server.js
└── vanilla_typescript
├── .env.example
├── README.md
├── package-lock.json
├── package.json
├── src
├── index.html
├── oauth.html
└── server.ts
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
3 | yarn.lock
4 |
5 | vanilla_typescript/dist/*
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # README
2 |
3 | ### Overview
4 |
5 | Welcome to Plaid's Tiny Quickstart! This repo contains five folders: **vanilla_js/**, **vanilla_typescript/**, **nextjs/**, **react/**, and **react_native/**. Each folder contains a minimal full-stack app that implements support end-to-end for one Plaid product endpoint.
6 |
7 | To get started, clone the repository, `cd` into one of the folders, and follow the instructions in the corresponding **README**. Enjoy!
8 |
9 | ```
10 | git clone https://github.com/plaid/tiny-quickstart.git && cd ./tiny-quickstart
11 | ```
12 |
13 | If you're looking for a more fully-featured quickstart, covering more API endpoints, available in more languages, and with explanations of the underlying flows, see the official [Plaid Quickstart](https://www.plaid.com/docs/quickstart).
14 |
--------------------------------------------------------------------------------
/nextjs/.env.example:
--------------------------------------------------------------------------------
1 | # Copy this file to .env and fill out each variable
2 | # NOTE: To use Production, you must set a use case for Link.
3 | # You can do this in the Dashboard under Link -> Link Customization -> Data Transparency:
4 | # https://dashboard.plaid.com/link/data-transparency-v5
5 |
6 | PLAID_CLIENT_ID=
7 | PLAID_SECRET=
8 | PLAID_ENV=sandbox
9 |
--------------------------------------------------------------------------------
/nextjs/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
34 | # typescript
35 | *.tsbuildinfo
36 |
--------------------------------------------------------------------------------
/nextjs/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Plaid
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/nextjs/README.md:
--------------------------------------------------------------------------------
1 | # Tiny Quickstart (Next.js)
2 |
3 | ### Overview
4 |
5 | This is a minimial application that uses [Next.js](https://nextjs.org/) for a React frontend and a Node.js backend.
6 |
7 | After linking a sample bank account, the app retrieves balance information associated with the account and renders it on the `/dash` page.
8 |
9 | If you're looking for a more fully-featured quickstart, covering more API endpoints, available in more languages, and with explanations of the underlying flows, see the official [Plaid Quickstart](https://www.plaid.com/docs/quickstart).
10 |
11 | #### Set up your environment
12 |
13 | Install [Node.js v16+](https://nodejs.dev/learn/how-to-install-nodejs).
14 |
15 | [Install `pnpm`](https://pnpm.io/installation) to follow along with these instructions as written.
16 |
17 | #### Install dependencies
18 |
19 | Ensure you're in the **nextjs/** folder, then install the necessary dependencies:
20 |
21 | ```bash
22 | pnpm install
23 | ```
24 |
25 | #### Equip the app with credentials
26 |
27 | Copy the included **.env.example** to a file called **.env**.
28 |
29 | ```bash
30 | cp .env.example .env
31 | ```
32 |
33 | Fill out the contents of the **.env** file with the [client ID and Sandbox secret in your Plaid dashboard](https://dashboard.plaid.com/team/keys). Don't place quotes (`"`) around the credentials (i.e., `PLAID_CLIENT_ID=adn08a280hqdaj0ad`). Use the "Sandbox" secret when setting the `PLAID_SECRET` variable.
34 |
35 | #### Start the server
36 |
37 | ```bash
38 | pnpm dev
39 | ```
40 |
41 | The app will run on port 3000 and will hot-reload if you make edits.
42 |
--------------------------------------------------------------------------------
/nextjs/next.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @type {import('next').NextConfig}
3 | */
4 | const nextConfig = {
5 | swcMinify: true,
6 | };
7 |
8 | module.exports = nextConfig;
9 |
--------------------------------------------------------------------------------
/nextjs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "dependencies": {
4 | "iron-session": "^6.1.3",
5 | "next": "^12.2.4",
6 | "plaid": "^30.0.0",
7 | "react": "^18.2.0",
8 | "react-dom": "^18.2.0",
9 | "react-plaid-link": "^3.6.1"
10 | },
11 | "scripts": {
12 | "dev": "next",
13 | "build": "next build",
14 | "start": "next start"
15 | },
16 | "packageManager": "pnpm@9.14.2+sha256.06e65a4965baff6d6097f9c8f75c35f6d420974dbc03d775009056a69edfd271",
17 | "pnpm": {
18 | "overrides": {
19 | "postcss@<8.4.31": ">=8.4.31",
20 | "next@>=0.9.9 <13.4.20-canary.13": ">=13.4.20-canary.13",
21 | "cookie@<0.7.0": ">=0.7.0",
22 | "next@>=10.0.0 <14.2.7": ">=14.2.7"
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/nextjs/pnpm-lock.yaml:
--------------------------------------------------------------------------------
1 | lockfileVersion: '9.0'
2 |
3 | settings:
4 | autoInstallPeers: true
5 | excludeLinksFromLockfile: false
6 |
7 | overrides:
8 | postcss@<8.4.31: '>=8.4.31'
9 | next@>=0.9.9 <13.4.20-canary.13: '>=13.4.20-canary.13'
10 | cookie@<0.7.0: '>=0.7.0'
11 | next@>=10.0.0 <14.2.7: '>=14.2.7'
12 |
13 | importers:
14 |
15 | .:
16 | dependencies:
17 | iron-session:
18 | specifier: ^6.1.3
19 | version: 6.3.1(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
20 | next:
21 | specifier: '>=14.2.7'
22 | version: 15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
23 | plaid:
24 | specifier: ^30.0.0
25 | version: 30.0.0
26 | react:
27 | specifier: ^18.2.0
28 | version: 18.3.1
29 | react-dom:
30 | specifier: ^18.2.0
31 | version: 18.3.1(react@18.3.1)
32 | react-plaid-link:
33 | specifier: ^3.6.1
34 | version: 3.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
35 |
36 | packages:
37 |
38 | '@emnapi/runtime@1.3.1':
39 | resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==}
40 |
41 | '@img/sharp-darwin-arm64@0.33.5':
42 | resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==}
43 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
44 |
45 | '@img/sharp-darwin-x64@0.33.5':
46 | resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==}
47 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
48 |
49 | '@img/sharp-libvips-darwin-arm64@1.0.4':
50 | resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==}
51 |
52 | '@img/sharp-libvips-darwin-x64@1.0.4':
53 | resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==}
54 |
55 | '@img/sharp-libvips-linux-arm64@1.0.4':
56 | resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==}
57 |
58 | '@img/sharp-libvips-linux-arm@1.0.5':
59 | resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==}
60 |
61 | '@img/sharp-libvips-linux-s390x@1.0.4':
62 | resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==}
63 |
64 | '@img/sharp-libvips-linux-x64@1.0.4':
65 | resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==}
66 |
67 | '@img/sharp-libvips-linuxmusl-arm64@1.0.4':
68 | resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==}
69 |
70 | '@img/sharp-libvips-linuxmusl-x64@1.0.4':
71 | resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==}
72 |
73 | '@img/sharp-linux-arm64@0.33.5':
74 | resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==}
75 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
76 |
77 | '@img/sharp-linux-arm@0.33.5':
78 | resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==}
79 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
80 |
81 | '@img/sharp-linux-s390x@0.33.5':
82 | resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==}
83 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
84 |
85 | '@img/sharp-linux-x64@0.33.5':
86 | resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==}
87 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
88 |
89 | '@img/sharp-linuxmusl-arm64@0.33.5':
90 | resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==}
91 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
92 |
93 | '@img/sharp-linuxmusl-x64@0.33.5':
94 | resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==}
95 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
96 |
97 | '@img/sharp-wasm32@0.33.5':
98 | resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==}
99 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
100 |
101 | '@img/sharp-win32-ia32@0.33.5':
102 | resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==}
103 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
104 |
105 | '@img/sharp-win32-x64@0.33.5':
106 | resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==}
107 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
108 |
109 | '@next/env@15.0.3':
110 | resolution: {integrity: sha512-t9Xy32pjNOvVn2AS+Utt6VmyrshbpfUMhIjFO60gI58deSo/KgLOp31XZ4O+kY/Is8WAGYwA5gR7kOb1eORDBA==}
111 |
112 | '@next/swc-darwin-arm64@15.0.3':
113 | resolution: {integrity: sha512-s3Q/NOorCsLYdCKvQlWU+a+GeAd3C8Rb3L1YnetsgwXzhc3UTWrtQpB/3eCjFOdGUj5QmXfRak12uocd1ZiiQw==}
114 | engines: {node: '>= 10'}
115 |
116 | '@next/swc-darwin-x64@15.0.3':
117 | resolution: {integrity: sha512-Zxl/TwyXVZPCFSf0u2BNj5sE0F2uR6iSKxWpq4Wlk/Sv9Ob6YCKByQTkV2y6BCic+fkabp9190hyrDdPA/dNrw==}
118 | engines: {node: '>= 10'}
119 |
120 | '@next/swc-linux-arm64-gnu@15.0.3':
121 | resolution: {integrity: sha512-T5+gg2EwpsY3OoaLxUIofmMb7ohAUlcNZW0fPQ6YAutaWJaxt1Z1h+8zdl4FRIOr5ABAAhXtBcpkZNwUcKI2fw==}
122 | engines: {node: '>= 10'}
123 |
124 | '@next/swc-linux-arm64-musl@15.0.3':
125 | resolution: {integrity: sha512-WkAk6R60mwDjH4lG/JBpb2xHl2/0Vj0ZRu1TIzWuOYfQ9tt9NFsIinI1Epma77JVgy81F32X/AeD+B2cBu/YQA==}
126 | engines: {node: '>= 10'}
127 |
128 | '@next/swc-linux-x64-gnu@15.0.3':
129 | resolution: {integrity: sha512-gWL/Cta1aPVqIGgDb6nxkqy06DkwJ9gAnKORdHWX1QBbSZZB+biFYPFti8aKIQL7otCE1pjyPaXpFzGeG2OS2w==}
130 | engines: {node: '>= 10'}
131 |
132 | '@next/swc-linux-x64-musl@15.0.3':
133 | resolution: {integrity: sha512-QQEMwFd8r7C0GxQS62Zcdy6GKx999I/rTO2ubdXEe+MlZk9ZiinsrjwoiBL5/57tfyjikgh6GOU2WRQVUej3UA==}
134 | engines: {node: '>= 10'}
135 |
136 | '@next/swc-win32-arm64-msvc@15.0.3':
137 | resolution: {integrity: sha512-9TEp47AAd/ms9fPNgtgnT7F3M1Hf7koIYYWCMQ9neOwjbVWJsHZxrFbI3iEDJ8rf1TDGpmHbKxXf2IFpAvheIQ==}
138 | engines: {node: '>= 10'}
139 |
140 | '@next/swc-win32-x64-msvc@15.0.3':
141 | resolution: {integrity: sha512-VNAz+HN4OGgvZs6MOoVfnn41kBzT+M+tB+OK4cww6DNyWS6wKaDpaAm/qLeOUbnMh0oVx1+mg0uoYARF69dJyA==}
142 | engines: {node: '>= 10'}
143 |
144 | '@peculiar/asn1-schema@2.3.13':
145 | resolution: {integrity: sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==}
146 |
147 | '@peculiar/json-schema@1.1.12':
148 | resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==}
149 | engines: {node: '>=8.0.0'}
150 |
151 | '@peculiar/webcrypto@1.5.0':
152 | resolution: {integrity: sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==}
153 | engines: {node: '>=10.12.0'}
154 |
155 | '@swc/counter@0.1.3':
156 | resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}
157 |
158 | '@swc/helpers@0.5.13':
159 | resolution: {integrity: sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==}
160 |
161 | '@types/accepts@1.3.7':
162 | resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}
163 |
164 | '@types/body-parser@1.19.5':
165 | resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==}
166 |
167 | '@types/connect@3.4.38':
168 | resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
169 |
170 | '@types/content-disposition@0.5.8':
171 | resolution: {integrity: sha512-QVSSvno3dE0MgO76pJhmv4Qyi/j0Yk9pBp0Y7TJ2Tlj+KCgJWY6qX7nnxCOLkZ3VYRSIk1WTxCvwUSdx6CCLdg==}
172 |
173 | '@types/cookie@0.5.4':
174 | resolution: {integrity: sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==}
175 |
176 | '@types/cookies@0.9.0':
177 | resolution: {integrity: sha512-40Zk8qR147RABiQ7NQnBzWzDcjKzNrntB5BAmeGCb2p/MIyOE+4BVvc17wumsUqUw00bJYqoXFHYygQnEFh4/Q==}
178 |
179 | '@types/express-serve-static-core@4.19.6':
180 | resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==}
181 |
182 | '@types/express@4.17.21':
183 | resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==}
184 |
185 | '@types/http-assert@1.5.6':
186 | resolution: {integrity: sha512-TTEwmtjgVbYAzZYWyeHPrrtWnfVkm8tQkP8P21uQifPgMRgjrow3XDEYqucuC8SKZJT7pUnhU/JymvjggxO9vw==}
187 |
188 | '@types/http-errors@2.0.4':
189 | resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==}
190 |
191 | '@types/keygrip@1.0.6':
192 | resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==}
193 |
194 | '@types/koa-compose@3.2.8':
195 | resolution: {integrity: sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==}
196 |
197 | '@types/koa@2.15.0':
198 | resolution: {integrity: sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==}
199 |
200 | '@types/mime@1.3.5':
201 | resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==}
202 |
203 | '@types/node@17.0.45':
204 | resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==}
205 |
206 | '@types/qs@6.9.17':
207 | resolution: {integrity: sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==}
208 |
209 | '@types/range-parser@1.2.7':
210 | resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==}
211 |
212 | '@types/send@0.17.4':
213 | resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
214 |
215 | '@types/serve-static@1.15.7':
216 | resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==}
217 |
218 | asn1js@3.0.5:
219 | resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==}
220 | engines: {node: '>=12.0.0'}
221 |
222 | asynckit@0.4.0:
223 | resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
224 |
225 | axios@1.7.9:
226 | resolution: {integrity: sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==}
227 |
228 | base64-js@1.5.1:
229 | resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
230 |
231 | buffer@6.0.3:
232 | resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==}
233 |
234 | busboy@1.6.0:
235 | resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
236 | engines: {node: '>=10.16.0'}
237 |
238 | caniuse-lite@1.0.30001686:
239 | resolution: {integrity: sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==}
240 |
241 | client-only@0.0.1:
242 | resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
243 |
244 | color-convert@2.0.1:
245 | resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
246 | engines: {node: '>=7.0.0'}
247 |
248 | color-name@1.1.4:
249 | resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
250 |
251 | color-string@1.9.1:
252 | resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==}
253 |
254 | color@4.2.3:
255 | resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==}
256 | engines: {node: '>=12.5.0'}
257 |
258 | combined-stream@1.0.8:
259 | resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
260 | engines: {node: '>= 0.8'}
261 |
262 | cookie@1.0.2:
263 | resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==}
264 | engines: {node: '>=18'}
265 |
266 | delayed-stream@1.0.0:
267 | resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
268 | engines: {node: '>=0.4.0'}
269 |
270 | detect-libc@2.0.3:
271 | resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
272 | engines: {node: '>=8'}
273 |
274 | follow-redirects@1.15.9:
275 | resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==}
276 | engines: {node: '>=4.0'}
277 | peerDependencies:
278 | debug: '*'
279 | peerDependenciesMeta:
280 | debug:
281 | optional: true
282 |
283 | form-data@4.0.1:
284 | resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==}
285 | engines: {node: '>= 6'}
286 |
287 | ieee754@1.2.1:
288 | resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
289 |
290 | iron-session@6.3.1:
291 | resolution: {integrity: sha512-3UJ7y2vk/WomAtEySmPgM6qtYF1cZ3tXuWX5GsVX4PJXAcs5y/sV9HuSfpjKS6HkTL/OhZcTDWJNLZ7w+Erx3A==}
292 | engines: {node: '>=12'}
293 | peerDependencies:
294 | express: '>=4'
295 | koa: '>=2'
296 | next: '>=14.2.7'
297 | peerDependenciesMeta:
298 | express:
299 | optional: true
300 | koa:
301 | optional: true
302 | next:
303 | optional: true
304 |
305 | iron-webcrypto@0.2.8:
306 | resolution: {integrity: sha512-YPdCvjFMOBjXaYuDj5tiHst5CEk6Xw84Jo8Y2+jzhMceclAnb3+vNPP/CTtb5fO2ZEuXEaO4N+w62Vfko757KA==}
307 |
308 | is-arrayish@0.3.2:
309 | resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==}
310 |
311 | js-tokens@4.0.0:
312 | resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
313 |
314 | loose-envify@1.4.0:
315 | resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
316 | hasBin: true
317 |
318 | mime-db@1.52.0:
319 | resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
320 | engines: {node: '>= 0.6'}
321 |
322 | mime-types@2.1.35:
323 | resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
324 | engines: {node: '>= 0.6'}
325 |
326 | nanoid@3.3.8:
327 | resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==}
328 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
329 | hasBin: true
330 |
331 | next@15.0.3:
332 | resolution: {integrity: sha512-ontCbCRKJUIoivAdGB34yCaOcPgYXr9AAkV/IwqFfWWTXEPUgLYkSkqBhIk9KK7gGmgjc64B+RdoeIDM13Irnw==}
333 | engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
334 | hasBin: true
335 | peerDependencies:
336 | '@opentelemetry/api': ^1.1.0
337 | '@playwright/test': ^1.41.2
338 | babel-plugin-react-compiler: '*'
339 | react: ^18.2.0 || 19.0.0-rc-66855b96-20241106
340 | react-dom: ^18.2.0 || 19.0.0-rc-66855b96-20241106
341 | sass: ^1.3.0
342 | peerDependenciesMeta:
343 | '@opentelemetry/api':
344 | optional: true
345 | '@playwright/test':
346 | optional: true
347 | babel-plugin-react-compiler:
348 | optional: true
349 | sass:
350 | optional: true
351 |
352 | object-assign@4.1.1:
353 | resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
354 | engines: {node: '>=0.10.0'}
355 |
356 | picocolors@1.1.1:
357 | resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
358 |
359 | plaid@30.0.0:
360 | resolution: {integrity: sha512-BO6xny2+jtMYFKu3gl3GycA7lFZL6rTIydbADrYXMlrCJlR+MwJy9R7RU8AyxqE6i6UGrojUm30QIGnZtGXCSg==}
361 | engines: {node: '>=10.0.0'}
362 |
363 | postcss@8.4.31:
364 | resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}
365 | engines: {node: ^10 || ^12 || >=14}
366 |
367 | prop-types@15.8.1:
368 | resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==}
369 |
370 | proxy-from-env@1.1.0:
371 | resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
372 |
373 | pvtsutils@1.3.6:
374 | resolution: {integrity: sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==}
375 |
376 | pvutils@1.1.3:
377 | resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==}
378 | engines: {node: '>=6.0.0'}
379 |
380 | react-dom@18.3.1:
381 | resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
382 | peerDependencies:
383 | react: ^18.3.1
384 |
385 | react-is@16.13.1:
386 | resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
387 |
388 | react-plaid-link@3.6.1:
389 | resolution: {integrity: sha512-nKxFPm9z8NiFCqOczNhhIp5R/xZY5BQ0lcQjkflIzpQ3Bx9Dsq2F1kORse0EU1aYkuGfVCfnySLwXhsu7rJSjQ==}
390 | peerDependencies:
391 | react: ^16.8.0 || ^17.0.0 || ^18.0.0
392 | react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
393 |
394 | react-script-hook@1.7.2:
395 | resolution: {integrity: sha512-fhyCEfXb94fag34UPRF0zry1XGwmVY+79iibWwTqAoOiCzYJQOYTiWJ7CnqglA9tMSV8g45cQpHCMcBwr7dwhA==}
396 | peerDependencies:
397 | react: ^16.8.6 || 17 - 18
398 | react-dom: ^16.8.6 || 17 - 18
399 |
400 | react@18.3.1:
401 | resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
402 | engines: {node: '>=0.10.0'}
403 |
404 | scheduler@0.23.2:
405 | resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
406 |
407 | semver@7.6.3:
408 | resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
409 | engines: {node: '>=10'}
410 | hasBin: true
411 |
412 | sharp@0.33.5:
413 | resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==}
414 | engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
415 |
416 | simple-swizzle@0.2.2:
417 | resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==}
418 |
419 | source-map-js@1.2.1:
420 | resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
421 | engines: {node: '>=0.10.0'}
422 |
423 | streamsearch@1.1.0:
424 | resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
425 | engines: {node: '>=10.0.0'}
426 |
427 | styled-jsx@5.1.6:
428 | resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==}
429 | engines: {node: '>= 12.0.0'}
430 | peerDependencies:
431 | '@babel/core': '*'
432 | babel-plugin-macros: '*'
433 | react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0'
434 | peerDependenciesMeta:
435 | '@babel/core':
436 | optional: true
437 | babel-plugin-macros:
438 | optional: true
439 |
440 | tslib@2.8.1:
441 | resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
442 |
443 | webcrypto-core@1.8.1:
444 | resolution: {integrity: sha512-P+x1MvlNCXlKbLSOY4cYrdreqPG5hbzkmawbcXLKN/mf6DZW0SdNNkZ+sjwsqVkI4A4Ko2sPZmkZtCKY58w83A==}
445 |
446 | snapshots:
447 |
448 | '@emnapi/runtime@1.3.1':
449 | dependencies:
450 | tslib: 2.8.1
451 | optional: true
452 |
453 | '@img/sharp-darwin-arm64@0.33.5':
454 | optionalDependencies:
455 | '@img/sharp-libvips-darwin-arm64': 1.0.4
456 | optional: true
457 |
458 | '@img/sharp-darwin-x64@0.33.5':
459 | optionalDependencies:
460 | '@img/sharp-libvips-darwin-x64': 1.0.4
461 | optional: true
462 |
463 | '@img/sharp-libvips-darwin-arm64@1.0.4':
464 | optional: true
465 |
466 | '@img/sharp-libvips-darwin-x64@1.0.4':
467 | optional: true
468 |
469 | '@img/sharp-libvips-linux-arm64@1.0.4':
470 | optional: true
471 |
472 | '@img/sharp-libvips-linux-arm@1.0.5':
473 | optional: true
474 |
475 | '@img/sharp-libvips-linux-s390x@1.0.4':
476 | optional: true
477 |
478 | '@img/sharp-libvips-linux-x64@1.0.4':
479 | optional: true
480 |
481 | '@img/sharp-libvips-linuxmusl-arm64@1.0.4':
482 | optional: true
483 |
484 | '@img/sharp-libvips-linuxmusl-x64@1.0.4':
485 | optional: true
486 |
487 | '@img/sharp-linux-arm64@0.33.5':
488 | optionalDependencies:
489 | '@img/sharp-libvips-linux-arm64': 1.0.4
490 | optional: true
491 |
492 | '@img/sharp-linux-arm@0.33.5':
493 | optionalDependencies:
494 | '@img/sharp-libvips-linux-arm': 1.0.5
495 | optional: true
496 |
497 | '@img/sharp-linux-s390x@0.33.5':
498 | optionalDependencies:
499 | '@img/sharp-libvips-linux-s390x': 1.0.4
500 | optional: true
501 |
502 | '@img/sharp-linux-x64@0.33.5':
503 | optionalDependencies:
504 | '@img/sharp-libvips-linux-x64': 1.0.4
505 | optional: true
506 |
507 | '@img/sharp-linuxmusl-arm64@0.33.5':
508 | optionalDependencies:
509 | '@img/sharp-libvips-linuxmusl-arm64': 1.0.4
510 | optional: true
511 |
512 | '@img/sharp-linuxmusl-x64@0.33.5':
513 | optionalDependencies:
514 | '@img/sharp-libvips-linuxmusl-x64': 1.0.4
515 | optional: true
516 |
517 | '@img/sharp-wasm32@0.33.5':
518 | dependencies:
519 | '@emnapi/runtime': 1.3.1
520 | optional: true
521 |
522 | '@img/sharp-win32-ia32@0.33.5':
523 | optional: true
524 |
525 | '@img/sharp-win32-x64@0.33.5':
526 | optional: true
527 |
528 | '@next/env@15.0.3': {}
529 |
530 | '@next/swc-darwin-arm64@15.0.3':
531 | optional: true
532 |
533 | '@next/swc-darwin-x64@15.0.3':
534 | optional: true
535 |
536 | '@next/swc-linux-arm64-gnu@15.0.3':
537 | optional: true
538 |
539 | '@next/swc-linux-arm64-musl@15.0.3':
540 | optional: true
541 |
542 | '@next/swc-linux-x64-gnu@15.0.3':
543 | optional: true
544 |
545 | '@next/swc-linux-x64-musl@15.0.3':
546 | optional: true
547 |
548 | '@next/swc-win32-arm64-msvc@15.0.3':
549 | optional: true
550 |
551 | '@next/swc-win32-x64-msvc@15.0.3':
552 | optional: true
553 |
554 | '@peculiar/asn1-schema@2.3.13':
555 | dependencies:
556 | asn1js: 3.0.5
557 | pvtsutils: 1.3.6
558 | tslib: 2.8.1
559 |
560 | '@peculiar/json-schema@1.1.12':
561 | dependencies:
562 | tslib: 2.8.1
563 |
564 | '@peculiar/webcrypto@1.5.0':
565 | dependencies:
566 | '@peculiar/asn1-schema': 2.3.13
567 | '@peculiar/json-schema': 1.1.12
568 | pvtsutils: 1.3.6
569 | tslib: 2.8.1
570 | webcrypto-core: 1.8.1
571 |
572 | '@swc/counter@0.1.3': {}
573 |
574 | '@swc/helpers@0.5.13':
575 | dependencies:
576 | tslib: 2.8.1
577 |
578 | '@types/accepts@1.3.7':
579 | dependencies:
580 | '@types/node': 17.0.45
581 |
582 | '@types/body-parser@1.19.5':
583 | dependencies:
584 | '@types/connect': 3.4.38
585 | '@types/node': 17.0.45
586 |
587 | '@types/connect@3.4.38':
588 | dependencies:
589 | '@types/node': 17.0.45
590 |
591 | '@types/content-disposition@0.5.8': {}
592 |
593 | '@types/cookie@0.5.4': {}
594 |
595 | '@types/cookies@0.9.0':
596 | dependencies:
597 | '@types/connect': 3.4.38
598 | '@types/express': 4.17.21
599 | '@types/keygrip': 1.0.6
600 | '@types/node': 17.0.45
601 |
602 | '@types/express-serve-static-core@4.19.6':
603 | dependencies:
604 | '@types/node': 17.0.45
605 | '@types/qs': 6.9.17
606 | '@types/range-parser': 1.2.7
607 | '@types/send': 0.17.4
608 |
609 | '@types/express@4.17.21':
610 | dependencies:
611 | '@types/body-parser': 1.19.5
612 | '@types/express-serve-static-core': 4.19.6
613 | '@types/qs': 6.9.17
614 | '@types/serve-static': 1.15.7
615 |
616 | '@types/http-assert@1.5.6': {}
617 |
618 | '@types/http-errors@2.0.4': {}
619 |
620 | '@types/keygrip@1.0.6': {}
621 |
622 | '@types/koa-compose@3.2.8':
623 | dependencies:
624 | '@types/koa': 2.15.0
625 |
626 | '@types/koa@2.15.0':
627 | dependencies:
628 | '@types/accepts': 1.3.7
629 | '@types/content-disposition': 0.5.8
630 | '@types/cookies': 0.9.0
631 | '@types/http-assert': 1.5.6
632 | '@types/http-errors': 2.0.4
633 | '@types/keygrip': 1.0.6
634 | '@types/koa-compose': 3.2.8
635 | '@types/node': 17.0.45
636 |
637 | '@types/mime@1.3.5': {}
638 |
639 | '@types/node@17.0.45': {}
640 |
641 | '@types/qs@6.9.17': {}
642 |
643 | '@types/range-parser@1.2.7': {}
644 |
645 | '@types/send@0.17.4':
646 | dependencies:
647 | '@types/mime': 1.3.5
648 | '@types/node': 17.0.45
649 |
650 | '@types/serve-static@1.15.7':
651 | dependencies:
652 | '@types/http-errors': 2.0.4
653 | '@types/node': 17.0.45
654 | '@types/send': 0.17.4
655 |
656 | asn1js@3.0.5:
657 | dependencies:
658 | pvtsutils: 1.3.6
659 | pvutils: 1.1.3
660 | tslib: 2.8.1
661 |
662 | asynckit@0.4.0: {}
663 |
664 | axios@1.7.9:
665 | dependencies:
666 | follow-redirects: 1.15.9
667 | form-data: 4.0.1
668 | proxy-from-env: 1.1.0
669 | transitivePeerDependencies:
670 | - debug
671 |
672 | base64-js@1.5.1: {}
673 |
674 | buffer@6.0.3:
675 | dependencies:
676 | base64-js: 1.5.1
677 | ieee754: 1.2.1
678 |
679 | busboy@1.6.0:
680 | dependencies:
681 | streamsearch: 1.1.0
682 |
683 | caniuse-lite@1.0.30001686: {}
684 |
685 | client-only@0.0.1: {}
686 |
687 | color-convert@2.0.1:
688 | dependencies:
689 | color-name: 1.1.4
690 | optional: true
691 |
692 | color-name@1.1.4:
693 | optional: true
694 |
695 | color-string@1.9.1:
696 | dependencies:
697 | color-name: 1.1.4
698 | simple-swizzle: 0.2.2
699 | optional: true
700 |
701 | color@4.2.3:
702 | dependencies:
703 | color-convert: 2.0.1
704 | color-string: 1.9.1
705 | optional: true
706 |
707 | combined-stream@1.0.8:
708 | dependencies:
709 | delayed-stream: 1.0.0
710 |
711 | cookie@1.0.2: {}
712 |
713 | delayed-stream@1.0.0: {}
714 |
715 | detect-libc@2.0.3:
716 | optional: true
717 |
718 | follow-redirects@1.15.9: {}
719 |
720 | form-data@4.0.1:
721 | dependencies:
722 | asynckit: 0.4.0
723 | combined-stream: 1.0.8
724 | mime-types: 2.1.35
725 |
726 | ieee754@1.2.1: {}
727 |
728 | iron-session@6.3.1(next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
729 | dependencies:
730 | '@peculiar/webcrypto': 1.5.0
731 | '@types/cookie': 0.5.4
732 | '@types/express': 4.17.21
733 | '@types/koa': 2.15.0
734 | '@types/node': 17.0.45
735 | cookie: 1.0.2
736 | iron-webcrypto: 0.2.8
737 | optionalDependencies:
738 | next: 15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
739 |
740 | iron-webcrypto@0.2.8:
741 | dependencies:
742 | buffer: 6.0.3
743 |
744 | is-arrayish@0.3.2:
745 | optional: true
746 |
747 | js-tokens@4.0.0: {}
748 |
749 | loose-envify@1.4.0:
750 | dependencies:
751 | js-tokens: 4.0.0
752 |
753 | mime-db@1.52.0: {}
754 |
755 | mime-types@2.1.35:
756 | dependencies:
757 | mime-db: 1.52.0
758 |
759 | nanoid@3.3.8: {}
760 |
761 | next@15.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
762 | dependencies:
763 | '@next/env': 15.0.3
764 | '@swc/counter': 0.1.3
765 | '@swc/helpers': 0.5.13
766 | busboy: 1.6.0
767 | caniuse-lite: 1.0.30001686
768 | postcss: 8.4.31
769 | react: 18.3.1
770 | react-dom: 18.3.1(react@18.3.1)
771 | styled-jsx: 5.1.6(react@18.3.1)
772 | optionalDependencies:
773 | '@next/swc-darwin-arm64': 15.0.3
774 | '@next/swc-darwin-x64': 15.0.3
775 | '@next/swc-linux-arm64-gnu': 15.0.3
776 | '@next/swc-linux-arm64-musl': 15.0.3
777 | '@next/swc-linux-x64-gnu': 15.0.3
778 | '@next/swc-linux-x64-musl': 15.0.3
779 | '@next/swc-win32-arm64-msvc': 15.0.3
780 | '@next/swc-win32-x64-msvc': 15.0.3
781 | sharp: 0.33.5
782 | transitivePeerDependencies:
783 | - '@babel/core'
784 | - babel-plugin-macros
785 |
786 | object-assign@4.1.1: {}
787 |
788 | picocolors@1.1.1: {}
789 |
790 | plaid@30.0.0:
791 | dependencies:
792 | axios: 1.7.9
793 | transitivePeerDependencies:
794 | - debug
795 |
796 | postcss@8.4.31:
797 | dependencies:
798 | nanoid: 3.3.8
799 | picocolors: 1.1.1
800 | source-map-js: 1.2.1
801 |
802 | prop-types@15.8.1:
803 | dependencies:
804 | loose-envify: 1.4.0
805 | object-assign: 4.1.1
806 | react-is: 16.13.1
807 |
808 | proxy-from-env@1.1.0: {}
809 |
810 | pvtsutils@1.3.6:
811 | dependencies:
812 | tslib: 2.8.1
813 |
814 | pvutils@1.1.3: {}
815 |
816 | react-dom@18.3.1(react@18.3.1):
817 | dependencies:
818 | loose-envify: 1.4.0
819 | react: 18.3.1
820 | scheduler: 0.23.2
821 |
822 | react-is@16.13.1: {}
823 |
824 | react-plaid-link@3.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
825 | dependencies:
826 | prop-types: 15.8.1
827 | react: 18.3.1
828 | react-dom: 18.3.1(react@18.3.1)
829 | react-script-hook: 1.7.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
830 |
831 | react-script-hook@1.7.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
832 | dependencies:
833 | react: 18.3.1
834 | react-dom: 18.3.1(react@18.3.1)
835 |
836 | react@18.3.1:
837 | dependencies:
838 | loose-envify: 1.4.0
839 |
840 | scheduler@0.23.2:
841 | dependencies:
842 | loose-envify: 1.4.0
843 |
844 | semver@7.6.3:
845 | optional: true
846 |
847 | sharp@0.33.5:
848 | dependencies:
849 | color: 4.2.3
850 | detect-libc: 2.0.3
851 | semver: 7.6.3
852 | optionalDependencies:
853 | '@img/sharp-darwin-arm64': 0.33.5
854 | '@img/sharp-darwin-x64': 0.33.5
855 | '@img/sharp-libvips-darwin-arm64': 1.0.4
856 | '@img/sharp-libvips-darwin-x64': 1.0.4
857 | '@img/sharp-libvips-linux-arm': 1.0.5
858 | '@img/sharp-libvips-linux-arm64': 1.0.4
859 | '@img/sharp-libvips-linux-s390x': 1.0.4
860 | '@img/sharp-libvips-linux-x64': 1.0.4
861 | '@img/sharp-libvips-linuxmusl-arm64': 1.0.4
862 | '@img/sharp-libvips-linuxmusl-x64': 1.0.4
863 | '@img/sharp-linux-arm': 0.33.5
864 | '@img/sharp-linux-arm64': 0.33.5
865 | '@img/sharp-linux-s390x': 0.33.5
866 | '@img/sharp-linux-x64': 0.33.5
867 | '@img/sharp-linuxmusl-arm64': 0.33.5
868 | '@img/sharp-linuxmusl-x64': 0.33.5
869 | '@img/sharp-wasm32': 0.33.5
870 | '@img/sharp-win32-ia32': 0.33.5
871 | '@img/sharp-win32-x64': 0.33.5
872 | optional: true
873 |
874 | simple-swizzle@0.2.2:
875 | dependencies:
876 | is-arrayish: 0.3.2
877 | optional: true
878 |
879 | source-map-js@1.2.1: {}
880 |
881 | streamsearch@1.1.0: {}
882 |
883 | styled-jsx@5.1.6(react@18.3.1):
884 | dependencies:
885 | client-only: 0.0.1
886 | react: 18.3.1
887 |
888 | tslib@2.8.1: {}
889 |
890 | webcrypto-core@1.8.1:
891 | dependencies:
892 | '@peculiar/asn1-schema': 2.3.13
893 | '@peculiar/json-schema': 1.1.12
894 | asn1js: 3.0.5
895 | pvtsutils: 1.3.6
896 | tslib: 2.8.1
897 |
--------------------------------------------------------------------------------
/nextjs/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/nextjs/public/favicon.ico
--------------------------------------------------------------------------------
/nextjs/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
15 | .spinner {
16 | margin: 24px auto;
17 | border-radius: 50%;
18 | width: 64px;
19 | height: 64px;
20 | border: 6px solid gray;
21 | border-top: 6px solid gray;
22 | animation: rotating 1.2s infinite cubic-bezier(0.785, 0.135, 0.15, 0.86);
23 | }
24 |
25 | button {
26 | border: 1px solid black;
27 | border-radius: 5px;
28 | background: black;
29 | height: 48px;
30 | width: 155px;
31 | margin-top: 20;
32 | margin-left: 20;
33 | color: white;
34 | font-size: 18px;
35 | }
36 |
37 | @keyframes rotating {
38 | 100% {
39 | transform: rotate(360deg);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/nextjs/src/lib/plaid.js:
--------------------------------------------------------------------------------
1 | import { Configuration, PlaidApi, PlaidEnvironments } from 'plaid';
2 |
3 | const plaidClient = new PlaidApi(
4 | new Configuration({
5 | basePath: PlaidEnvironments[process.env.PLAID_ENV],
6 | baseOptions: {
7 | headers: {
8 | 'PLAID-CLIENT-ID': process.env.PLAID_CLIENT_ID,
9 | 'PLAID-SECRET': process.env.PLAID_SECRET,
10 | 'Plaid-Version': '2020-09-14',
11 | },
12 | },
13 | })
14 | );
15 |
16 | const sessionOptions = {
17 | cookieName: 'myapp_cookiename',
18 | password: 'complex_password_at_least_32_characters_long',
19 | // secure: true should be used in production (HTTPS) but can't be used in development (HTTP)
20 | cookieOptions: {
21 | secure: process.env.NODE_ENV === 'production',
22 | },
23 | };
24 |
25 | export { plaidClient, sessionOptions };
26 |
--------------------------------------------------------------------------------
/nextjs/src/pages/_app.jsx:
--------------------------------------------------------------------------------
1 | import '../index.css';
2 |
3 | export default function MyApp({ Component, pageProps }) {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/nextjs/src/pages/api/create-link-token.js:
--------------------------------------------------------------------------------
1 | import { plaidClient } from '../../lib/plaid';
2 |
3 | export default async function handler(req, res) {
4 | const tokenResponse = await plaidClient.linkTokenCreate({
5 | user: { client_user_id: process.env.PLAID_CLIENT_ID },
6 | client_name: "Plaid's Tiny Quickstart",
7 | language: 'en',
8 | products: ['auth'],
9 | country_codes: ['US'],
10 | redirect_uri: process.env.PLAID_SANDBOX_REDIRECT_URI,
11 | });
12 |
13 | return res.json(tokenResponse.data);
14 | }
15 |
--------------------------------------------------------------------------------
/nextjs/src/pages/api/exchange-public-token.js:
--------------------------------------------------------------------------------
1 | import { withIronSessionApiRoute } from 'iron-session/next';
2 | import { plaidClient, sessionOptions } from '../../lib/plaid';
3 |
4 | export default withIronSessionApiRoute(exchangePublicToken, sessionOptions);
5 |
6 | async function exchangePublicToken(req, res) {
7 | const exchangeResponse = await plaidClient.itemPublicTokenExchange({
8 | public_token: req.body.public_token,
9 | });
10 |
11 | req.session.access_token = exchangeResponse.data.access_token;
12 | await req.session.save();
13 | res.send({ ok: true });
14 | }
15 |
--------------------------------------------------------------------------------
/nextjs/src/pages/dash.jsx:
--------------------------------------------------------------------------------
1 | import { withIronSessionSsr } from 'iron-session/next';
2 | import { plaidClient, sessionOptions } from '../lib/plaid';
3 |
4 | export default function Dashboard({ balance }) {
5 | return Object.entries(balance).map((entry, i) => (
6 |
7 | {JSON.stringify(entry[1], null, 2)}
8 |
9 | ));
10 | }
11 |
12 | export const getServerSideProps = withIronSessionSsr(
13 | async function getServerSideProps({ req }) {
14 | const access_token = req.session.access_token;
15 |
16 | if (!access_token) {
17 | return {
18 | redirect: {
19 | destination: '/',
20 | permanent: false,
21 | },
22 | };
23 | }
24 |
25 | const response = await plaidClient.accountsBalanceGet({ access_token });
26 | return {
27 | props: {
28 | balance: response.data,
29 | },
30 | };
31 | },
32 | sessionOptions
33 | );
34 |
--------------------------------------------------------------------------------
/nextjs/src/pages/index.jsx:
--------------------------------------------------------------------------------
1 | import Router from 'next/router';
2 | import { useState, useEffect, useCallback } from 'react';
3 | import { usePlaidLink } from 'react-plaid-link';
4 |
5 | export default function PlaidLink() {
6 | const [token, setToken] = useState(null);
7 |
8 | useEffect(() => {
9 | const createLinkToken = async () => {
10 | const response = await fetch('/api/create-link-token', {
11 | method: 'POST',
12 | });
13 | const { link_token } = await response.json();
14 | setToken(link_token);
15 | };
16 | createLinkToken();
17 | }, []);
18 |
19 | const onSuccess = useCallback(async (publicToken) => {
20 | await fetch('/api/exchange-public-token', {
21 | method: 'POST',
22 | headers: {
23 | 'Content-Type': 'application/json',
24 | },
25 | body: JSON.stringify({ public_token: publicToken }),
26 | });
27 | Router.push('/dash');
28 | }, []);
29 |
30 | const { open, ready } = usePlaidLink({
31 | token,
32 | onSuccess,
33 | });
34 |
35 | return (
36 |
39 | );
40 | }
41 |
--------------------------------------------------------------------------------
/react/.env.example:
--------------------------------------------------------------------------------
1 | # Copy this file to .env and fill out each variable
2 | # NOTE: To use Production, you must set a use case for Link.
3 | # You can do this in the Dashboard under Link -> Link Customization -> Data Transparency:
4 | # https://dashboard.plaid.com/link/data-transparency-v5
5 |
6 | PLAID_CLIENT_ID=
7 | PLAID_SECRET=
8 | PLAID_ENV=sandbox
9 |
--------------------------------------------------------------------------------
/react/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/react/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Plaid
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/react/README.md:
--------------------------------------------------------------------------------
1 | # README: Tiny Quickstart (React)
2 |
3 | ### Overview
4 |
5 | This is a minimal app that implements Plaid using a React frontend with an Express/Node backend. After linking a sample bank account, the app retrieves balance information associated with the account and renders it on the home page. For reference, frontend code is in **src/App.jsx**, while backend code is in **server.js**.
6 |
7 | If you're looking for a more fully-featured quickstart, covering more API endpoints, available in more languages, and with explanations of the underlying flows, see the official [Plaid Quickstart](https://www.plaid.com/docs/quickstart).
8 |
9 | #### Set up your environment
10 |
11 | This app uses Node 20 and should work with recent versions of Node. You can use a tool such as [nvm](https://github.com/nvm-sh/nvm) to make sure the app uses the target version of Node. For information on installing Node, see [How to install Node.js](https://nodejs.dev/learn/how-to-install-nodejs).
12 |
13 | #### Install dependencies
14 |
15 | Ensure you're in the **react/** folder, then install the necessary dependencies:
16 |
17 | ```bash
18 | npm install
19 | ```
20 |
21 | #### Equip the app with credentials
22 |
23 | Copy the included **.env.example** to a file called **.env**.
24 |
25 | ```bash
26 | cp .env.example .env
27 | ```
28 |
29 | Fill out the contents of the **.env** file with the [client ID and Sandbox secret in your Plaid dashboard](https://dashboard.plaid.com/team/keys). Don't place quotes (`"`) around the credentials (i.e., `PLAID_CLIENT_ID=adn08a280hqdaj0ad`). Use the "Sandbox" secret when setting the `PLAID_SECRET` variable.
30 |
31 | #### Start the server
32 |
33 | ```bash
34 | npm start
35 | ```
36 |
37 | The app will run on port 3000 and will hot-reload if you make edits.
38 |
39 | ### Using the app
40 |
41 | The app allows you to link a sample bank account at an OAuth bank or a non-OAuth bank. For more information on how to link accounts at both types of banks, see the sections below.
42 |
43 | #### Non-OAuth banks
44 |
45 | Most banks returned by Link in the app are non-OAuth banks. When connecting a non-OAuth bank account, use the following sample credentials:
46 |
47 | - Username: `user_good`
48 | - Password: `pass_good`
49 |
50 | If prompted to provide a multi-factor authentication code, use `1234`
51 |
52 | #### OAuth banks
53 |
54 | With OAuth banks, end users temporarily leave Link to authenticate and permission data using the bank's website (or mobile app) instead. Afterward, they're redirected back to Link to complete the Link flow and return control to the application where the account is being linked. In this app, "Platypus OAuth Bank" is an OAuth bank.
55 |
56 | To experience an OAuth flow in this app:
57 |
58 | 1. Navigate to [**Team Settings > API**](https://dashboard.plaid.com/team/api) in your Plaid account.
59 |
60 | 2. In the **Allowed redirect URIs** section, click "Configure".
61 |
62 | 3. Add `http://localhost:3000/oauth` as a redirect URI and save your changes.
63 |
64 | 4. Navigate to the **.env** file in your project directory. Add the following line of code to the end of the file:
65 |
66 | ```bash
67 | PLAID_SANDBOX_REDIRECT_URI=http://localhost:3000/oauth
68 | ```
69 |
70 | 5. Save your changes to the file and restart your local server (i.e., end the current server process and run `npm start` again).
71 |
72 | 6. Navigate to `localhost:3000` and proceed to link an account.
73 |
74 | 7. On the "Select your bank" screen, type "oauth" into the search bar. Select "Platypus OAuth Bank".
75 |
76 | 8. On the next screen, select the first instance of "Platypus OAuth Bank".
77 |
78 | 9. Click "Continue" when prompted. You'll be redirected to the login page for "First Platypus Bank". Click "Sign in" to proceed. Link will connect the account at the OAuth bank, prompt you to continue, and then redirect you back to the home page.
79 |
80 | For more information on OAuth with Plaid, see the [OAuth Guide](https://plaid.com/docs/link/oauth/) in Plaid's documentation.
81 |
82 | ### Troubleshooting
83 |
84 | #### MISSING_FIELDS error
85 |
86 | If you encounter a **MISSING_FIELDS** error, it's possible you did not properly fill out the **.env** file. Be sure to add your client ID and Sandbox secret to the corresponding variables in the file.
87 |
88 | #### OAuth flow fails to start
89 |
90 | Ensure you've added the redirect URI present in the **.env** file as a [configured URI in your Plaid account](https://dashboard.plaid.com/team/api). The two values should be identical.
91 |
--------------------------------------------------------------------------------
/react/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "plaid-hello-world",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "dotenv": "^8.2.0",
7 | "express": "^4.17.1",
8 | "express-session": "^1.17.2",
9 | "npm-run-all": "^4.1.5",
10 | "plaid": "^30.0.0",
11 | "react": "^18.2.0",
12 | "react-dom": "^18.2.0",
13 | "react-plaid-link": "^3.6.1",
14 | "react-scripts": "^5.0.1"
15 | },
16 | "scripts": {
17 | "start": "run-p start-client start-server",
18 | "start-client": "react-scripts start",
19 | "start-server": "nodemon server.js",
20 | "build": "react-scripts build",
21 | "test": "react-scripts test",
22 | "eject": "react-scripts eject"
23 | },
24 | "eslintConfig": {
25 | "extends": [
26 | "react-app",
27 | "react-app/jest"
28 | ]
29 | },
30 | "overrides": {
31 | "svgo": {
32 | "nth-check": ">=2.0.2"
33 | },
34 | "react-scripts": {
35 | "postcss": ">=8.4.31"
36 | }
37 | },
38 | "browserslist": {
39 | "production": [
40 | ">0.2%",
41 | "not dead",
42 | "not op_mini all"
43 | ],
44 | "development": [
45 | "last 1 chrome version",
46 | "last 1 firefox version",
47 | "last 1 safari version"
48 | ]
49 | },
50 | "proxy": "http://localhost:8080",
51 | "devDependencies": {
52 | "nodemon": "^3.1.0",
53 | "npm-run-all": "^4.1.5",
54 | "sass": "^1.49.9",
55 | "@babel/plugin-transform-private-property-in-object": "^7.23.4"
56 | },
57 | "engines": {
58 | "node": ">=16.0.0"
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/react/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react/public/favicon.ico
--------------------------------------------------------------------------------
/react/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 |
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/react/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react/public/logo192.png
--------------------------------------------------------------------------------
/react/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react/public/logo512.png
--------------------------------------------------------------------------------
/react/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/react/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/react/server.js:
--------------------------------------------------------------------------------
1 | /*
2 | server.js – Configures the Plaid client and uses Express to defines routes that call Plaid endpoints in the Sandbox environment.Utilizes the official Plaid node.js client library to make calls to the Plaid API.
3 | */
4 |
5 | require("dotenv").config();
6 | const express = require("express");
7 | const bodyParser = require("body-parser");
8 | const session = require("express-session");
9 | const { Configuration, PlaidApi, PlaidEnvironments } = require("plaid");
10 | const app = express();
11 |
12 | app.use(
13 | // FOR DEMO PURPOSES ONLY
14 | // Use an actual secret key in production
15 | session({ secret: "bosco", saveUninitialized: true, resave: true })
16 | );
17 |
18 | app.use(bodyParser.urlencoded({ extended: false }));
19 | app.use(bodyParser.json());
20 |
21 | // Configuration for the Plaid client
22 | const config = new Configuration({
23 | basePath: PlaidEnvironments[process.env.PLAID_ENV],
24 | baseOptions: {
25 | headers: {
26 | "PLAID-CLIENT-ID": process.env.PLAID_CLIENT_ID,
27 | "PLAID-SECRET": process.env.PLAID_SECRET,
28 | "Plaid-Version": "2020-09-14",
29 | },
30 | },
31 | });
32 |
33 | //Instantiate the Plaid client with the configuration
34 | const client = new PlaidApi(config);
35 |
36 | //Creates a Link token and return it
37 | app.get("/api/create_link_token", async (req, res, next) => {
38 | const tokenResponse = await client.linkTokenCreate({
39 | user: { client_user_id: req.sessionID },
40 | client_name: "Plaid's Tiny Quickstart",
41 | language: "en",
42 | products: ["auth"],
43 | country_codes: ["US"],
44 | redirect_uri: process.env.PLAID_SANDBOX_REDIRECT_URI,
45 | });
46 | res.json(tokenResponse.data);
47 | });
48 |
49 | // Exchanges the public token from Plaid Link for an access token
50 | app.post("/api/exchange_public_token", async (req, res, next) => {
51 | const exchangeResponse = await client.itemPublicTokenExchange({
52 | public_token: req.body.public_token,
53 | });
54 |
55 | // FOR DEMO PURPOSES ONLY
56 | // Store access_token in DB instead of session storage
57 | req.session.access_token = exchangeResponse.data.access_token;
58 | res.json(true);
59 | });
60 |
61 | // Fetches balance data using the Node client library for Plaid
62 | app.get("/api/balance", async (req, res, next) => {
63 | const access_token = req.session.access_token;
64 | const balanceResponse = await client.accountsBalanceGet({ access_token });
65 | res.json({
66 | Balance: balanceResponse.data,
67 | });
68 | });
69 |
70 | app.listen(process.env.PORT || 8080);
71 |
--------------------------------------------------------------------------------
/react/src/App.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect, useCallback } from "react";
2 | import { usePlaidLink } from "react-plaid-link";
3 | import "./App.scss";
4 |
5 | function App(props) {
6 | const [token, setToken] = useState(null);
7 | const [data, setData] = useState(null);
8 | const [loading, setLoading] = useState(true);
9 |
10 | const onSuccess = useCallback(async (publicToken) => {
11 | setLoading(true);
12 | await fetch("/api/exchange_public_token", {
13 | method: "POST",
14 | headers: {
15 | "Content-Type": "application/json",
16 | },
17 | body: JSON.stringify({ public_token: publicToken }),
18 | });
19 | await getBalance();
20 | }, []);
21 |
22 | // Creates a Link token
23 | const createLinkToken = React.useCallback(async () => {
24 | // For OAuth, use previously generated Link token
25 | if (window.location.href.includes("?oauth_state_id=")) {
26 | const linkToken = localStorage.getItem('link_token');
27 | setToken(linkToken);
28 | } else {
29 | const response = await fetch("/api/create_link_token", {});
30 | const data = await response.json();
31 | setToken(data.link_token);
32 | localStorage.setItem("link_token", data.link_token);
33 | }
34 | }, [setToken]);
35 |
36 | // Fetch balance data
37 | const getBalance = React.useCallback(async () => {
38 | setLoading(true);
39 | const response = await fetch("/api/balance", {});
40 | const data = await response.json();
41 | setData(data);
42 | setLoading(false);
43 | }, [setData, setLoading]);
44 |
45 | let isOauth = false;
46 |
47 | const config = {
48 | token,
49 | onSuccess,
50 | };
51 |
52 | // For OAuth, configure the received redirect URI
53 | if (window.location.href.includes("?oauth_state_id=")) {
54 | config.receivedRedirectUri = window.location.href;
55 | isOauth = true;
56 | }
57 | const { open, ready } = usePlaidLink(config);
58 |
59 | useEffect(() => {
60 | if (token == null) {
61 | createLinkToken();
62 | }
63 | if (isOauth && ready) {
64 | open();
65 | }
66 | }, [token, isOauth, ready, open]);
67 |
68 | return (
69 |
70 |
74 |
75 | {!loading &&
76 | data != null &&
77 | Object.entries(data).map((entry, i) => (
78 |
79 | {JSON.stringify(entry[1], null, 2)}
80 |
81 | )
82 | )}
83 |
84 | );
85 | }
86 |
87 | export default App;
--------------------------------------------------------------------------------
/react/src/App.scss:
--------------------------------------------------------------------------------
1 | .spinner {
2 | margin: 24px auto;
3 | border-radius: 50%;
4 | width: 64px;
5 | height: 64px;
6 | border: 6px solid gray;
7 | border-top: 6px solid gray;
8 | animation: rotating 1.2s infinite cubic-bezier(0.785, 0.135, 0.15, 0.86);
9 | }
10 |
11 | button {
12 | border: 1px solid black;
13 | border-radius: 5px;
14 | background: black;
15 | height: 48px;
16 | width: 155px;
17 | margin-top: 20;
18 | margin-left: 20;
19 | color: white;
20 | font-size: 18px;
21 | }
22 |
23 | @keyframes rotating {
24 | 100% {
25 | transform: rotate(360deg);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/react/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/react/src/index.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 | import "./index.css";
4 | import App from "./App";
5 |
6 | ReactDOM.render(
7 |
8 |
9 | ,
10 | document.getElementById("root")
11 | );
12 |
--------------------------------------------------------------------------------
/react_native/README.md:
--------------------------------------------------------------------------------
1 | # README: Tiny Quickstart (React Native)
2 |
3 | ### Overview
4 |
5 | This is a minimal, React Native app that implements Plaid Link and Plaid's Balance product. The app allows you to link a sample bank account and retrieve balance information associated with the account.
6 |
7 | If you're looking for a more fully-featured quickstart, covering more API endpoints, available in more languages, and with explanations of the underlying flows, see the official [Plaid Quickstart](https://www.plaid.com/docs/quickstart).
8 |
9 | ### Running the app
10 |
11 | #### Set up your mobile development environment
12 |
13 | You'll need to set up a mobile development environment to run the app on iOS or Android.
14 |
15 | Follow the environment setup instructions found in the official React Native docs: https://reactnative.dev/docs/environment-setup. You'll specifically need to follow the instructions under "React Native CLI Quickstart". Select your "Development OS" and follow the installation instructions for **both** iOS and Android (under "Target OS").
16 |
17 | #### Install dependencies
18 |
19 | Ensure you're using Node 20; you can run `nvm use` to make sure you are using a compatible version of Node for this project. Next, run `npm install` in the **TinyQuickstartReactNative/** folder.
20 |
21 | Navigate to the **ios/** folder and run `bundle install && pod install` to install all necessary iOS dependencies.
22 |
23 | #### Equip the app with API credentials
24 |
25 | Copy the contents of **.env.example** to a new file called **.env**:
26 |
27 | ```bash
28 | cp .env.example .env
29 | ```
30 |
31 | Fill out **.env** with the [client ID and Sandbox secrets found in your Plaid dashboard](https://dashboard.plaid.com/team/keys). Do not use quotes (`"`) around the credentials (i.e., `PLAID_CLIENT_ID=adn08a280hqdaj0ad`, not `PLAID_CLIENT_ID="adn08a280hqdaj0ad"`). Use the "Sandbox" secret when setting the `PLAID_SECRET` variable.
32 |
33 | #### Configure OAuth
34 |
35 | **iOS**
36 |
37 | Ensure the project has the following configurations set in Xcode:
38 |
39 | 1. Open **TinyQuickstartReactNative** in Xcode.
40 | 2. In the navigator on the left, click on "TinyQuickstartReactNative".
41 | 3. Click "TinyQuickstartReactNative" under "Targets".
42 | 4. Click "Signing & Capabilities".
43 | 5. Under "Signing", set "Team" to "None", and set "Bundle Identifier" to `com.plaid.linkauth.ios.reactnative`.
44 | 6. Under "Associated Domains", add `applinks:cdn-testing.plaid.com` as an entry. If "Associated Domains" isn't present, you'll need to add it as a capability by clicking "+ Capability" (located near the "Signing & Capabilities" tab).
45 |
46 | 
47 |
48 | Configure your redirect URI in the Plaid Dashboard.
49 |
50 | 1. In the ["API" section of the Plaid Dashboard](https://dashboard.plaid.com/team/api), add the following as a redirect URI: `https://cdn-testing.plaid.com/link/v2/stable/sandbox-oauth-a2a-react-native-redirect.html`.
51 |
52 | **Android**
53 |
54 | Configure your Android package name in the Plaid Dashboard.
55 |
56 | 1. In the ["API" section of the Plaid Dashboard](https://dashboard.plaid.com/team/api), add the following as an allowed Android package name: `com.tinyquickstartreactnative`.
57 |
58 | For more information on OAuth with Plaid, see the [OAuth Guide](https://plaid.com/docs/link/oauth/) in Plaid's documentation.
59 |
60 | #### Start the backend server
61 |
62 | In a terminal window, run `node server.js` in the **TinyQuickstartReactNative/** folder. This will run a local server on port 8080.
63 |
64 | #### Run the app
65 |
66 | Open a new terminal window and run one of the following commands in the **TinyQuickstartReactNative/** folder:
67 |
68 | ```bash
69 | # To run on iOS, run this command:
70 | npx react-native run-ios
71 | ```
72 |
73 | ```bash
74 | # To run on Android, run this command:
75 | npx react-native run-android
76 | ```
77 |
78 | Both commands start Metro, build the app, open a simulator/emulator, and launch the app in the simulator/emulator. For iOS, if you encounter an error related to a simulator not being found, you can specify a simulator like so:
79 |
80 | `npx react-native run-ios --simulator="iPhone 14"`
81 |
82 | Alternatively, you can run `npx react-native start` in one terminal window (to start Metro), and run `npm run ios` in a separate terminal window, in case you'd like to decouple these processes.
83 |
84 | To observe OAuth in action, type "oauth" into the search bar when prompted to select a bank. Select "Platypus OAuth Bank". On the next screen, select the first instance of "Platypus OAuth Bank". Click "Continue" when prompted. You'll be redirected to the login page for "First Platypus Bank". Click "Sign in" to proceed. Link will connect the account at the OAuth bank, prompt you to continue, and then redirect you back to the app.
85 |
86 | ### Troubleshooting
87 |
88 | #### MISSING_FIELDS error
89 |
90 | * If you encounter a **MISSING_FIELDS** error, it's possible you did not properly fill out the **.env** file. Be sure to add your client ID and Sandbox secret to the corresponding variables in the file.
91 |
92 | #### Changes you've made aren't reflected in the iOS Simulator or Android emulator
93 |
94 | * Inside of the Metro terminal window, reload Metro by typing the 'R' character.
95 |
96 | * Restart the backend server.
97 |
98 | * Erase all content and settings from the iOS simulator. With the iOS simulator highlighted, click on "Device" in the toolbar. Next, click "Erase All Content and Settings" from the drop-down menu. Restart the simulator and rebuild the app using `npx react-native run-ios`.
99 |
100 | * Wipe all data from the Android emulator. First, quit the Android emulator. Next, open Android studio. In the "Device Manager", wipe data from the corresponding device/emulator by expanding the menu under "Actions" and clicking "Wipe Data". Restart the emulator and rebuild the app using `npx react-native run-android`.
101 |
102 | 
103 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
3 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.env.example:
--------------------------------------------------------------------------------
1 | # Copy this file to .env and fill out each variable
2 | # NOTE: To use Production, you must set a use case for Link.
3 | # You can do this in the Dashboard under Link -> Link Customization -> Data Transparency:
4 | # https://dashboard.plaid.com/link/data-transparency-v5
5 | PLAID_CLIENT_ID=
6 | PLAID_SECRET=
7 | PLAID_ENV=sandbox
8 | PLAID_SANDBOX_REDIRECT_URI=https://cdn-testing.plaid.com/link/v2/stable/sandbox-oauth-a2a-react-native-redirect.html
9 | PLAID_ANDROID_PACKAGE_NAME=com.tinyquickstartreactnative
10 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; Flow doesn't support platforms
12 | .*/Libraries/Utilities/LoadingView.js
13 |
14 | .*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15 |
16 | [untyped]
17 | .*/node_modules/@react-native-community/cli/.*/.*
18 |
19 | [include]
20 |
21 | [libs]
22 | node_modules/react-native/interface.js
23 | node_modules/react-native/flow/
24 |
25 | [options]
26 | emoji=true
27 |
28 | exact_by_default=true
29 |
30 | format.bracket_spacing=false
31 |
32 | module.file_ext=.js
33 | module.file_ext=.json
34 | module.file_ext=.ios.js
35 |
36 | munge_underscores=true
37 |
38 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
39 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
40 |
41 | suppress_type=$FlowIssue
42 | suppress_type=$FlowFixMe
43 | suppress_type=$FlowFixMeProps
44 | suppress_type=$FlowFixMeState
45 |
46 | [lints]
47 | sketchy-null-number=warn
48 | sketchy-null-mixed=warn
49 | sketchy-number=warn
50 | untyped-type-import=warn
51 | nonstrict-import=warn
52 | deprecated-type=warn
53 | unsafe-getters-setters=warn
54 | unnecessary-invariant=warn
55 |
56 | [strict]
57 | deprecated-type
58 | nonstrict-import
59 | sketchy-null
60 | unclear-type
61 | unsafe-getters-setters
62 | untyped-import
63 | untyped-type-import
64 |
65 | [version]
66 | ^0.182.0
67 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | **/.xcode.env.local
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 | *.hprof
33 | .cxx/
34 |
35 | # node.js
36 | #
37 | node_modules/
38 | npm-debug.log
39 | yarn-error.log
40 |
41 | # BUCK
42 | buck-out/
43 | \.buckd/
44 | *.keystore
45 | !debug.keystore
46 |
47 | # fastlane
48 | #
49 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
50 | # screenshots whenever they are needed.
51 | # For more information about the recommended setup visit:
52 | # https://docs.fastlane.tools/best-practices/source-control/
53 |
54 | **/fastlane/report.xml
55 | **/fastlane/Preview.html
56 | **/fastlane/screenshots
57 | **/fastlane/test_output
58 |
59 | # Bundle artifact
60 | *.jsbundle
61 |
62 | # Ruby / CocoaPods
63 | **/Pods/
64 | /vendor/bundle/
65 |
66 | # Yarn
67 | .yarn/*
68 | !.yarn/patches
69 | !.yarn/plugins
70 | !.yarn/releases
71 | !.yarn/sdks
72 | !.yarn/versions
73 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.node-version:
--------------------------------------------------------------------------------
1 | 20
2 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 | registry=https://registry.npmjs.org/
3 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.nvmrc:
--------------------------------------------------------------------------------
1 | v20.11.1
2 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | bracketSameLine: true,
4 | bracketSpacing: false,
5 | singleQuote: true,
6 | trailingComma: 'all',
7 | };
8 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.ruby-version:
--------------------------------------------------------------------------------
1 | 3.3.0
2 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/App.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { NavigationContainer } from '@react-navigation/native';
3 | import { createNativeStackNavigator } from '@react-navigation/native-stack';
4 | import { StatusBar } from 'react-native';
5 | import { SafeAreaProvider } from 'react-native-safe-area-context';
6 | import SuccessScreen from './components/SuccessScreen';
7 | import HomeScreen from './components/HomeScreen';
8 | import { PlaidTheme } from './components/style';
9 |
10 | const Stack = createNativeStackNavigator();
11 |
12 | const App = (): React.ReactElement => {
13 | return (
14 |
15 |
16 |
17 |
18 |
28 |
38 |
39 |
40 |
41 | );
42 | };
43 |
44 | export default App;
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4 | ruby ">= 2.7.0"
5 |
6 | gem 'cocoapods', '>= 1.13'
7 | gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
8 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | CFPropertyList (3.0.6)
5 | rexml
6 | activesupport (7.0.8.1)
7 | concurrent-ruby (~> 1.0, >= 1.0.2)
8 | i18n (>= 1.6, < 2)
9 | minitest (>= 5.1)
10 | tzinfo (~> 2.0)
11 | addressable (2.8.6)
12 | public_suffix (>= 2.0.2, < 6.0)
13 | algoliasearch (1.27.5)
14 | httpclient (~> 2.8, >= 2.8.3)
15 | json (>= 1.5.1)
16 | atomos (0.1.3)
17 | claide (1.1.0)
18 | cocoapods (1.14.3)
19 | addressable (~> 2.8)
20 | claide (>= 1.0.2, < 2.0)
21 | cocoapods-core (= 1.14.3)
22 | cocoapods-deintegrate (>= 1.0.3, < 2.0)
23 | cocoapods-downloader (>= 2.1, < 3.0)
24 | cocoapods-plugins (>= 1.0.0, < 2.0)
25 | cocoapods-search (>= 1.0.0, < 2.0)
26 | cocoapods-trunk (>= 1.6.0, < 2.0)
27 | cocoapods-try (>= 1.1.0, < 2.0)
28 | colored2 (~> 3.1)
29 | escape (~> 0.0.4)
30 | fourflusher (>= 2.3.0, < 3.0)
31 | gh_inspector (~> 1.0)
32 | molinillo (~> 0.8.0)
33 | nap (~> 1.0)
34 | ruby-macho (>= 2.3.0, < 3.0)
35 | xcodeproj (>= 1.23.0, < 2.0)
36 | cocoapods-core (1.14.3)
37 | activesupport (>= 5.0, < 8)
38 | addressable (~> 2.8)
39 | algoliasearch (~> 1.0)
40 | concurrent-ruby (~> 1.1)
41 | fuzzy_match (~> 2.0.4)
42 | nap (~> 1.0)
43 | netrc (~> 0.11)
44 | public_suffix (~> 4.0)
45 | typhoeus (~> 1.0)
46 | cocoapods-deintegrate (1.0.5)
47 | cocoapods-downloader (2.1)
48 | cocoapods-plugins (1.0.0)
49 | nap
50 | cocoapods-search (1.0.1)
51 | cocoapods-trunk (1.6.0)
52 | nap (>= 0.8, < 2.0)
53 | netrc (~> 0.11)
54 | cocoapods-try (1.2.0)
55 | colored2 (3.1.2)
56 | concurrent-ruby (1.2.3)
57 | escape (0.0.4)
58 | ethon (0.16.0)
59 | ffi (>= 1.15.0)
60 | ffi (1.16.3)
61 | fourflusher (2.3.1)
62 | fuzzy_match (2.0.4)
63 | gh_inspector (1.1.3)
64 | httpclient (2.8.3)
65 | i18n (1.14.4)
66 | concurrent-ruby (~> 1.0)
67 | json (2.7.1)
68 | minitest (5.22.3)
69 | molinillo (0.8.0)
70 | nanaimo (0.3.0)
71 | nap (1.1.0)
72 | netrc (0.11.0)
73 | public_suffix (4.0.7)
74 | rexml (3.2.6)
75 | ruby-macho (2.5.1)
76 | typhoeus (1.4.1)
77 | ethon (>= 0.9.0)
78 | tzinfo (2.0.6)
79 | concurrent-ruby (~> 1.0)
80 | xcodeproj (1.23.0)
81 | CFPropertyList (>= 2.3.3, < 4.0)
82 | atomos (~> 0.1.3)
83 | claide (>= 1.0.2, < 2.0)
84 | colored2 (~> 3.1)
85 | nanaimo (~> 0.3.0)
86 | rexml (~> 3.2.4)
87 |
88 | PLATFORMS
89 | ruby
90 |
91 | DEPENDENCIES
92 | activesupport (>= 6.1.7.5, < 7.1.0)
93 | cocoapods (>= 1.13)
94 |
95 | RUBY VERSION
96 | ruby 2.7.5p203
97 |
98 | BUNDLED WITH
99 | 2.1.4
100 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/_BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.tinyquickstartreactnative",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.tinyquickstartreactnative",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply plugin: "org.jetbrains.kotlin.android"
3 | apply plugin: "com.facebook.react"
4 |
5 | /**
6 | * This is the configuration block to customize your React Native Android app.
7 | * By default you don't need to apply any configuration, just uncomment the lines you need.
8 | */
9 | react {
10 | /* Folders */
11 | // The root of your project, i.e. where "package.json" lives. Default is '..'
12 | // root = file("../")
13 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native
14 | // reactNativeDir = file("../node_modules/react-native")
15 | // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
16 | // codegenDir = file("../node_modules/@react-native/codegen")
17 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
18 | // cliFile = file("../node_modules/react-native/cli.js")
19 |
20 | /* Variants */
21 | // The list of variants to that are debuggable. For those we're going to
22 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
23 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
24 | // debuggableVariants = ["liteDebug", "prodDebug"]
25 |
26 | /* Bundling */
27 | // A list containing the node command and its flags. Default is just 'node'.
28 | // nodeExecutableAndArgs = ["node"]
29 | //
30 | // The command to run when bundling. By default is 'bundle'
31 | // bundleCommand = "ram-bundle"
32 | //
33 | // The path to the CLI configuration file. Default is empty.
34 | // bundleConfig = file(../rn-cli.config.js)
35 | //
36 | // The name of the generated asset file containing your JS bundle
37 | // bundleAssetName = "MyApplication.android.bundle"
38 | //
39 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
40 | // entryFile = file("../js/MyApplication.android.js")
41 | //
42 | // A list of extra flags to pass to the 'bundle' commands.
43 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
44 | // extraPackagerArgs = []
45 |
46 | /* Hermes Commands */
47 | // The hermes compiler command to run. By default it is 'hermesc'
48 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
49 | //
50 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
51 | // hermesFlags = ["-O", "-output-source-map"]
52 | }
53 |
54 | /**
55 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
56 | */
57 | def enableProguardInReleaseBuilds = false
58 |
59 | /**
60 | * The preferred build flavor of JavaScriptCore (JSC)
61 | *
62 | * For example, to use the international variant, you can use:
63 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
64 | *
65 | * The international variant includes ICU i18n library and necessary data
66 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
67 | * give correct results when using with locales other than en-US. Note that
68 | * this variant is about 6MiB larger per architecture than default.
69 | */
70 | def jscFlavor = 'org.webkit:android-jsc:+'
71 |
72 | android {
73 | ndkVersion rootProject.ext.ndkVersion
74 | buildToolsVersion rootProject.ext.buildToolsVersion
75 | compileSdk rootProject.ext.compileSdkVersion
76 |
77 | namespace "com.tinyquickstartreactnative"
78 | defaultConfig {
79 | applicationId "com.tinyquickstartreactnative"
80 | minSdkVersion rootProject.ext.minSdkVersion
81 | targetSdkVersion rootProject.ext.targetSdkVersion
82 | versionCode 1
83 | versionName "1.0"
84 | }
85 | signingConfigs {
86 | debug {
87 | storeFile file('debug.keystore')
88 | storePassword 'android'
89 | keyAlias 'androiddebugkey'
90 | keyPassword 'android'
91 | }
92 | }
93 | buildFeatures {
94 | buildConfig = true
95 | }
96 | buildTypes {
97 | debug {
98 | signingConfig signingConfigs.debug
99 | }
100 | release {
101 | // Caution! In production, you need to generate your own keystore file.
102 | // see https://reactnative.dev/docs/signed-apk-android.
103 | signingConfig signingConfigs.debug
104 | minifyEnabled enableProguardInReleaseBuilds
105 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
106 | }
107 | }
108 | }
109 |
110 | dependencies {
111 | // The version of react-native is set by the React Native Gradle Plugin
112 | implementation("com.facebook.react:react-android")
113 |
114 | if (hermesEnabled.toBoolean()) {
115 | implementation("com.facebook.react:hermes-android")
116 | } else {
117 | implementation jscFlavor
118 | }
119 | }
120 |
121 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
122 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/debug.keystore
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
13 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/java/com/tinyquickstartreactnative/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.tinyquickstartreactnative
2 |
3 | import com.facebook.react.ReactActivity
4 | import com.facebook.react.ReactActivityDelegate
5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6 | import com.facebook.react.defaults.DefaultReactActivityDelegate
7 |
8 | class MainActivity : ReactActivity() {
9 |
10 | /**
11 | * Returns the name of the main component registered from JavaScript. This is used to schedule
12 | * rendering of the component.
13 | */
14 | override fun getMainComponentName(): String = "TinyQuickstartReactNative"
15 |
16 | /**
17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19 | */
20 | override fun createReactActivityDelegate(): ReactActivityDelegate =
21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22 | }
23 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/java/com/tinyquickstartreactnative/MainApplication.kt:
--------------------------------------------------------------------------------
1 | package com.tinyquickstartreactnative
2 |
3 | import android.app.Application
4 | import com.facebook.react.PackageList
5 | import com.facebook.react.ReactApplication
6 | import com.facebook.react.ReactHost
7 | import com.facebook.react.ReactNativeHost
8 | import com.facebook.react.ReactPackage
9 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
10 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11 | import com.facebook.react.defaults.DefaultReactNativeHost
12 | import com.facebook.soloader.SoLoader
13 |
14 | class MainApplication : Application(), ReactApplication {
15 |
16 | override val reactNativeHost: ReactNativeHost =
17 | object : DefaultReactNativeHost(this) {
18 | override fun getPackages(): List =
19 | PackageList(this).packages.apply {
20 | // Packages that cannot be autolinked yet can be added manually here, for example:
21 | // add(MyReactNativePackage())
22 | }
23 |
24 | override fun getJSMainModuleName(): String = "index"
25 |
26 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
27 |
28 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
29 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
30 | }
31 |
32 | override val reactHost: ReactHost
33 | get() = getDefaultReactHost(applicationContext, reactNativeHost)
34 |
35 | override fun onCreate() {
36 | super.onCreate()
37 | SoLoader.init(this, false)
38 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
39 | // If you opted-in for the New Architecture, we load the native entry point for this app.
40 | load()
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
22 |
23 |
24 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TinyQuickstartReactNative
3 |
4 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "34.0.0"
6 | minSdkVersion = 23
7 | compileSdkVersion = 34
8 | targetSdkVersion = 34
9 | ndkVersion = "26.1.10909125"
10 | kotlinVersion = "1.9.22"
11 | }
12 | repositories {
13 | google()
14 | mavenCentral()
15 | }
16 | dependencies {
17 | classpath("com.android.tools.build:gradle")
18 | classpath("com.facebook.react:react-native-gradle-plugin")
19 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
20 | }
21 | }
22 |
23 | apply plugin: "com.facebook.react.rootproject"
24 |
25 | allprojects {
26 | gradle.projectsEvaluated {
27 | tasks.withType(JavaCompile) {
28 | options.compilerArgs << "-Xlint:deprecation"
29 | }
30 | }
31 | repositories {
32 | maven {
33 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
34 | url("$rootDir/../node_modules/react-native/android")
35 | }
36 | maven {
37 | // Android JSC is installed from npm
38 | url("$rootDir/../node_modules/jsc-android/dist")
39 | }
40 | mavenCentral {
41 | // We don't want to fetch react-native from Maven Central as there are
42 | // older versions over there.
43 | content {
44 | excludeGroup "com.facebook.react"
45 | }
46 | }
47 | google()
48 | maven { url 'https://www.jitpack.io' }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Use this property to specify which architecture you want to build.
28 | # You can also override it from the CLI using
29 | # ./gradlew -PreactNativeArchitectures=x86_64
30 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
31 |
32 | # Use this property to enable support to the new architecture.
33 | # This will allow you to use TurboModules and the Fabric render in
34 | # your application. You should enable this flag either if you want
35 | # to write custom TurboModules/Fabric components OR use libraries that
36 | # are providing them.
37 | newArchEnabled=false
38 |
39 | # Use this property to enable or disable the Hermes JS engine.
40 | # If set to false, you will be using JSC instead.
41 | hermesEnabled=true
42 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/TinyQuickstartReactNative/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | # This is normally unused
84 | # shellcheck disable=SC2039,SC3045
85 | APP_BASE_NAME=${0##*/}
86 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87 | APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88 |
89 | # Use the maximum available, or set MAX_FD != -1 to use that value.
90 | MAX_FD=maximum
91 |
92 | warn () {
93 | echo "$*"
94 | } >&2
95 |
96 | die () {
97 | echo
98 | echo "$*"
99 | echo
100 | exit 1
101 | } >&2
102 |
103 | # OS specific support (must be 'true' or 'false').
104 | cygwin=false
105 | msys=false
106 | darwin=false
107 | nonstop=false
108 | case "$( uname )" in #(
109 | CYGWIN* ) cygwin=true ;; #(
110 | Darwin* ) darwin=true ;; #(
111 | MSYS* | MINGW* ) msys=true ;; #(
112 | NONSTOP* ) nonstop=true ;;
113 | esac
114 |
115 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
116 |
117 |
118 | # Determine the Java command to use to start the JVM.
119 | if [ -n "$JAVA_HOME" ] ; then
120 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
121 | # IBM's JDK on AIX uses strange locations for the executables
122 | JAVACMD=$JAVA_HOME/jre/sh/java
123 | else
124 | JAVACMD=$JAVA_HOME/bin/java
125 | fi
126 | if [ ! -x "$JAVACMD" ] ; then
127 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
128 |
129 | Please set the JAVA_HOME variable in your environment to match the
130 | location of your Java installation."
131 | fi
132 | else
133 | JAVACMD=java
134 | if ! command -v java >/dev/null 2>&1
135 | then
136 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 | fi
142 |
143 | # Increase the maximum file descriptors if we can.
144 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145 | case $MAX_FD in #(
146 | max*)
147 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148 | # shellcheck disable=SC3045
149 | MAX_FD=$( ulimit -H -n ) ||
150 | warn "Could not query maximum file descriptor limit"
151 | esac
152 | case $MAX_FD in #(
153 | '' | soft) :;; #(
154 | *)
155 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156 | # shellcheck disable=SC3045
157 | ulimit -n "$MAX_FD" ||
158 | warn "Could not set maximum file descriptor limit to $MAX_FD"
159 | esac
160 | fi
161 |
162 | # Collect all arguments for the java command, stacking in reverse order:
163 | # * args from the command line
164 | # * the main class name
165 | # * -classpath
166 | # * -D...appname settings
167 | # * --module-path (only if needed)
168 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
169 |
170 | # For Cygwin or MSYS, switch paths to Windows format before running java
171 | if "$cygwin" || "$msys" ; then
172 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
173 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
174 |
175 | JAVACMD=$( cygpath --unix "$JAVACMD" )
176 |
177 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
178 | for arg do
179 | if
180 | case $arg in #(
181 | -*) false ;; # don't mess with options #(
182 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
183 | [ -e "$t" ] ;; #(
184 | *) false ;;
185 | esac
186 | then
187 | arg=$( cygpath --path --ignore --mixed "$arg" )
188 | fi
189 | # Roll the args list around exactly as many times as the number of
190 | # args, so each arg winds up back in the position where it started, but
191 | # possibly modified.
192 | #
193 | # NB: a `for` loop captures its iteration list before it begins, so
194 | # changing the positional parameters here affects neither the number of
195 | # iterations, nor the values presented in `arg`.
196 | shift # remove old arg
197 | set -- "$@" "$arg" # push replacement arg
198 | done
199 | fi
200 |
201 |
202 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204 |
205 | # Collect all arguments for the java command:
206 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207 | # and any embedded shellness will be escaped.
208 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209 | # treated as '${Hostname}' itself on the command line.
210 |
211 | set -- \
212 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
213 | -classpath "$CLASSPATH" \
214 | org.gradle.wrapper.GradleWrapperMain \
215 | "$@"
216 |
217 | # Stop when "xargs" is not available.
218 | if ! command -v xargs >/dev/null 2>&1
219 | then
220 | die "xargs is not available"
221 | fi
222 |
223 | # Use "xargs" to parse quoted args.
224 | #
225 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
226 | #
227 | # In Bash we could simply go:
228 | #
229 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
230 | # set -- "${ARGS[@]}" "$@"
231 | #
232 | # but POSIX shell has neither arrays nor command substitution, so instead we
233 | # post-process each arg (as a line of input to sed) to backslash-escape any
234 | # character that might be a shell metacharacter, then use eval to reverse
235 | # that process (while maintaining the separation between arguments), and wrap
236 | # the whole thing up as a single "set" statement.
237 | #
238 | # This will of course break if any of these variables contains a newline or
239 | # an unmatched quote.
240 | #
241 |
242 | eval "set -- $(
243 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
244 | xargs -n1 |
245 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
246 | tr '\n' ' '
247 | )" '"$@"'
248 |
249 | exec "$JAVACMD" "$@"
250 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%"=="" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%"=="" set DIRNAME=.
29 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo. 1>&2
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48 | echo. 1>&2
49 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50 | echo location of your Java installation. 1>&2
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo. 1>&2
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62 | echo. 1>&2
63 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64 | echo location of your Java installation. 1>&2
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 0 goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'TinyQuickstartReactNative'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/@react-native/gradle-plugin')
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "TinyQuickstartReactNative",
3 | "displayName": "TinyQuickstartReactNative"
4 | }
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:@react-native/babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/components/HomeScreen.tsx:
--------------------------------------------------------------------------------
1 | import { link } from 'fs';
2 | import React, { useState, useEffect, useCallback } from 'react';
3 | import { Platform, View, Text, StyleSheet, Button } from 'react-native';
4 | import { create, open, dismissLink, LinkSuccess, LinkExit, LinkIOSPresentationStyle, LinkLogLevel } from 'react-native-plaid-link-sdk';
5 |
6 | var styles = require('./style');
7 |
8 | const HomeScreen = ({ navigation }: any) => {
9 | const [linkToken, setLinkToken] = useState(null);
10 | const address = Platform.OS === 'ios' ? 'localhost' : '10.0.2.2';
11 |
12 | const createLinkToken = useCallback(async () => {
13 | await fetch(`http://${address}:8080/api/create_link_token`, {
14 | method: "POST",
15 | headers: {
16 | "Content-Type": "application/json"
17 | },
18 | body: JSON.stringify({ address: address })
19 | })
20 | .then((response) => response.json())
21 | .then((data) => {
22 | setLinkToken(data.link_token);
23 | })
24 | .catch((err) => {
25 | console.log(err);
26 | });
27 | }, [setLinkToken]);
28 |
29 | useEffect(() => {
30 | if (linkToken == null) {
31 | createLinkToken();
32 | } else {
33 | const tokenConfiguration = createLinkTokenConfiguration(linkToken);
34 | create(tokenConfiguration);
35 | }
36 | }, [linkToken]);
37 |
38 | const createLinkTokenConfiguration = (token: string, noLoadingState: boolean = false) => {
39 | return {
40 | token: token,
41 | noLoadingState: noLoadingState,
42 | };
43 | };
44 |
45 | const createLinkOpenProps = () => {
46 | return {
47 | onSuccess: async (success: LinkSuccess) => {
48 | await fetch(`http://${address}:8080/api/exchange_public_token`, {
49 | method: "POST",
50 | headers: {
51 | "Content-Type": "application/json",
52 | },
53 | body: JSON.stringify({ public_token: success.publicToken }),
54 | })
55 | .catch((err) => {
56 | console.log(err);
57 | });
58 | navigation.navigate('Success', success);
59 | },
60 | onExit: (linkExit: LinkExit) => {
61 | console.log('Exit: ', linkExit);
62 | dismissLink();
63 | },
64 | iOSPresentationStyle: LinkIOSPresentationStyle.MODAL,
65 | logLevel: LinkLogLevel.ERROR,
66 | };
67 | };
68 |
69 | const handleOpenLink = () => {
70 | const openProps = createLinkOpenProps();
71 | open(openProps);
72 | };
73 |
74 | return (
75 |
76 |
77 | Tiny Quickstart – React Native
78 |
79 |
80 |
84 |
85 |
86 | );
87 | };
88 |
89 | export default HomeScreen;
90 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/components/SuccessScreen.tsx:
--------------------------------------------------------------------------------
1 | import React, {useState, useEffect, useCallback} from 'react';
2 | import {
3 | Text,
4 | View,
5 | ToastAndroid,
6 | Platform,
7 | Alert,
8 | } from 'react-native';
9 | var styles = require('./style');
10 |
11 | const SuccessScreen = ({ navigation, route }: any) => {
12 | const [data, setData] = useState(null);
13 | const address = Platform.OS === 'ios' ? 'localhost' : '10.0.2.2';
14 |
15 | // Fetch balance data
16 | const getBalance = useCallback(async () => {
17 | await fetch(`http://${address}:8080/api/balance`, {
18 | method: "POST",
19 | headers: {
20 | "Content-Type": "application/json",
21 | },
22 | })
23 | .then((response) => response.json())
24 | .then((data) => {
25 | setData(data);
26 | })
27 | .catch((err) => {
28 | console.log(err);
29 | });
30 | });
31 |
32 | useEffect(() => {
33 | if (data == null) {
34 | getBalance();
35 | }
36 | }, [data])
37 |
38 | return (
39 |
40 |
41 | Balance Response
42 |
43 |
44 |
45 | {
46 | JSON.stringify(data)
47 | }
48 |
49 |
50 |
51 | );
52 | };
53 |
54 | function notifyMessage(msg: string) {
55 | if (Platform.OS === 'android') {
56 | ToastAndroid.show(msg, ToastAndroid.SHORT);
57 | } else {
58 | Alert.alert(msg);
59 | }
60 | }
61 |
62 | export default SuccessScreen;
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/components/style.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export const PlaidTheme = {
4 | dark: false,
5 | colors: {
6 | primary: '#FFFFFF',
7 | background: '#000000',
8 | card: '#FFFFFF',
9 | text: '#000000',
10 | border: '#000000',
11 | notification: '#FFFFFF',
12 | },
13 | };
14 |
15 | var React = require('react-native');
16 |
17 | var {StyleSheet} = React;
18 |
19 | module.exports = StyleSheet.create({
20 | heading: {
21 | alignItems: 'center',
22 | paddingHorizontal: 32,
23 | justifyContent: 'flex-start',
24 | backgroundColor: '#FFFFFF',
25 | paddingBottom: 32,
26 | },
27 | body: {
28 | flex: 1,
29 | paddingHorizontal: 32,
30 | flexDirection: 'column',
31 | alignItems: 'stretch',
32 | justifyContent: 'flex-start',
33 | backgroundColor: '#FFFFFF',
34 | },
35 | baseText: {
36 | fontSize: 16,
37 | marginTop: 8,
38 | color: '#4B4B4B',
39 | textAlign: 'left',
40 | },
41 | titleText: {
42 | fontSize: 28,
43 | fontWeight: 'bold',
44 | textAlign: 'center',
45 | marginTop: 36,
46 | marginHorizontal: 10,
47 | },
48 | bottom: {
49 | flex: 1,
50 | justifyContent: 'flex-end',
51 | backgroundColor: '#FFFFFF',
52 | paddingHorizontal: 32,
53 | paddingBottom: 32,
54 | },
55 | buttonContainer: {
56 | elevation: 4,
57 | backgroundColor: '#000',
58 | width: '100%',
59 | paddingVertical: 16,
60 | paddingHorizontal: 16,
61 | },
62 | buttonText: {
63 | fontSize: 20,
64 | color: '#FFF',
65 | backgroundColor: '#000',
66 | fontWeight: 'bold',
67 | alignSelf: 'center',
68 | textTransform: 'uppercase',
69 | },
70 | });
71 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Resolve react_native_pods.rb with node to allow for hoisting
2 | require Pod::Executable.execute_command('node', ['-p',
3 | 'require.resolve(
4 | "react-native/scripts/react_native_pods.rb",
5 | {paths: [process.argv[1]]},
6 | )', __dir__]).strip
7 |
8 | platform :ios, '14.0'
9 | prepare_react_native_project!
10 |
11 | linkage = ENV['USE_FRAMEWORKS']
12 | if linkage != nil
13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14 | use_frameworks! :linkage => linkage.to_sym
15 | end
16 |
17 | target 'TinyQuickstartReactNative' do
18 | config = use_native_modules!
19 |
20 | use_react_native!(
21 | :path => config[:reactNativePath],
22 | # An absolute path to your application root.
23 | :app_path => "#{Pod::Config.instance.installation_root}/.."
24 | )
25 |
26 | target 'TinyQuickstartReactNativeTests' do
27 | inherit! :complete
28 | # Pods for testing
29 | end
30 |
31 | post_install do |installer|
32 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
33 | react_native_post_install(
34 | installer,
35 | config[:reactNativePath],
36 | :mac_catalyst_enabled => false,
37 | # :ccache_enabled => true
38 | )
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative.xcodeproj/xcshareddata/xcschemes/TinyQuickstartReactNative.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : RCTAppDelegate
5 |
6 | @end
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8 | {
9 | self.moduleName = @"TinyQuickstartReactNative";
10 | // You can add your custom initial props in the dictionary below.
11 | // They will be passed down to the ViewController used by React Native.
12 | self.initialProps = @{};
13 |
14 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
15 | }
16 |
17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18 | {
19 | return [self bundleURL];
20 | }
21 |
22 | - (NSURL *)bundleURL
23 |
24 | {
25 | #if DEBUG
26 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
27 | #else
28 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
29 | #endif
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | TinyQuickstartReactNative
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | arm64
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrivacyAccessedAPITypes
6 |
7 |
8 | NSPrivacyAccessedAPIType
9 | NSPrivacyAccessedAPICategoryFileTimestamp
10 | NSPrivacyAccessedAPITypeReasons
11 |
12 | C617.1
13 |
14 |
15 |
16 | NSPrivacyAccessedAPIType
17 | NSPrivacyAccessedAPICategoryUserDefaults
18 | NSPrivacyAccessedAPITypeReasons
19 |
20 | CA92.1
21 |
22 |
23 |
24 | NSPrivacyAccessedAPIType
25 | NSPrivacyAccessedAPICategorySystemBootTime
26 | NSPrivacyAccessedAPITypeReasons
27 |
28 | 35F9.1
29 |
30 |
31 |
32 | NSPrivacyCollectedDataTypes
33 |
34 | NSPrivacyTracking
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/TinyQuickstartReactNative.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.associated-domains
6 |
7 | applinks:cdn-testing.plaid.com
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNative/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNativeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/ios/TinyQuickstartReactNativeTests/TinyQuickstartReactNativeTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface TinyQuickstartReactNativeTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation TinyQuickstartReactNativeTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/metro.config.js:
--------------------------------------------------------------------------------
1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2 |
3 | /**
4 | * Metro configuration
5 | * https://reactnative.dev/docs/metro
6 | *
7 | * @type {import('metro-config').MetroConfig}
8 | */
9 | const config = {};
10 |
11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config);
12 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "TinyQuickstartReactNative",
3 | "version": "0.0.1",
4 | "private": true,
5 | "engines": {
6 | "node": ">=18"
7 | },
8 | "scripts": {
9 | "android": "react-native run-android",
10 | "ios": "react-native run-ios",
11 | "start": "react-native start",
12 | "test": "jest",
13 | "lint": "eslint ."
14 | },
15 | "dependencies": {
16 | "body-parser": "^1.20.0",
17 | "clean": "^4.0.2",
18 | "dotenv": "^16.0.3",
19 | "express": "^4.18.1",
20 | "express-session": "^1.17.3",
21 | "plaid": "^30.0.0",
22 | "react": "18.2.0",
23 | "react-native": "0.74.6",
24 | "react-native-plaid-link-sdk": "11.13.3",
25 | "react-native-safe-area-context": "4.10.0-rc.1",
26 | "@react-navigation/native-stack": "6.9.26",
27 | "@react-navigation/native": "6.1.17",
28 | "@react-navigation/stack": "6.3.29",
29 | "react-native-screens": "3.30.1",
30 | "react-scripts": "^5.0.1",
31 | "typescript": "5.0.4"
32 | },
33 | "devDependencies": {
34 | "@babel/core": "^7.20.0",
35 | "@babel/preset-env": "^7.20.0",
36 | "@babel/runtime": "^7.20.0",
37 | "@react-native/babel-preset": "0.74.88",
38 | "@react-native/eslint-config": "0.74.88",
39 | "@react-native/metro-config": "0.74.88",
40 | "@react-native/typescript-config": "0.74.88",
41 | "@types/react": "^18.2.6",
42 | "@types/react-test-renderer": "^18.0.0",
43 | "babel-jest": "^29.6.3",
44 | "eslint": "^8.19.0",
45 | "jest": "^29.6.3",
46 | "prettier": "2.8.8",
47 | "react-test-renderer": "18.2.0",
48 | "typescript": "5.0.4"
49 | },
50 | "overrides": {
51 | "@typescript-eslint/typescript-estree": "^5.57.1",
52 | "fork-ts-checker-webpack-plugin": "^6.5.3",
53 | "typescript": "5.0.4",
54 | "react-native-safe-area-context": "4.10.0-rc.1",
55 | "svgo": {
56 | "nth-check": ">=2.0.2"
57 | },
58 | "react-scripts": {
59 | "postcss": ">=8.4.31"
60 | }
61 | },
62 | "jest": {
63 | "preset": "react-native"
64 | },
65 | "proxy": "http://localhost:8080",
66 | "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
67 | }
68 |
--------------------------------------------------------------------------------
/react_native/TinyQuickstartReactNative/server.js:
--------------------------------------------------------------------------------
1 | /*
2 | server.js – Configures the Plaid client and uses Express to defines routes that call Plaid endpoints in the Sandbox environment. Utilizes the official Plaid node.js client library to make calls to the Plaid API.
3 | */
4 |
5 | require('dotenv').config();
6 | const express = require('express');
7 | const bodyParser = require('body-parser');
8 | const session = require('express-session');
9 | const {Configuration, PlaidApi, PlaidEnvironments} = require('plaid');
10 |
11 | const app = express();
12 | const port = 8080;
13 |
14 | app.use(
15 | // FOR DEMO PURPOSES ONLY
16 | // Use an actual secret key in production
17 | session({secret: 'bosco', saveUninitialized: true, resave: true}),
18 | );
19 |
20 | app.use(bodyParser.urlencoded({extended: false}));
21 | app.use(bodyParser.json());
22 |
23 | // Configuration for the Plaid client
24 | const config = new Configuration({
25 | basePath: PlaidEnvironments[process.env.PLAID_ENV],
26 | baseOptions: {
27 | headers: {
28 | 'PLAID-CLIENT-ID': process.env.PLAID_CLIENT_ID,
29 | 'PLAID-SECRET': process.env.PLAID_SECRET,
30 | 'Plaid-Version': '2020-09-14',
31 | },
32 | },
33 | });
34 |
35 | //Instantiate the Plaid client with the configuration
36 | const client = new PlaidApi(config);
37 |
38 | //Creates a Link token and return it
39 | app.post('/api/create_link_token', async (req, res, next) => {
40 | let payload = {};
41 | //Payload if running iOS
42 | if (req.body.address === 'localhost') {
43 | payload = {
44 | user: {client_user_id: req.sessionID},
45 | client_name: 'Plaid Tiny Quickstart - React Native',
46 | language: 'en',
47 | products: ['auth'],
48 | country_codes: ['US'],
49 | redirect_uri: process.env.PLAID_SANDBOX_REDIRECT_URI,
50 | };
51 | } else {
52 | //Payload if running Android
53 | payload = {
54 | user: {client_user_id: req.sessionID},
55 | client_name: 'Plaid Tiny Quickstart - React Native',
56 | language: 'en',
57 | products: ['auth'],
58 | country_codes: ['US'],
59 | android_package_name: process.env.PLAID_ANDROID_PACKAGE_NAME,
60 | };
61 | }
62 | const tokenResponse = await client.linkTokenCreate(payload);
63 | res.json(tokenResponse.data);
64 | });
65 |
66 | // Exchanges the public token from Plaid Link for an access token
67 | app.post('/api/exchange_public_token', async (req, res, next) => {
68 | const exchangeResponse = await client.itemPublicTokenExchange({
69 | public_token: req.body.public_token,
70 | });
71 |
72 | // FOR DEMO PURPOSES ONLY
73 | // Store access_token in DB instead of session storage
74 | req.session.access_token = exchangeResponse.data.access_token;
75 | res.json(true);
76 | });
77 |
78 | // Fetches balance data using the Node client library for Plaid
79 | app.post('/api/balance', async (req, res, next) => {
80 | const access_token = req.session.access_token;
81 | const balanceResponse = await client.accountsBalanceGet({access_token});
82 | res.json({
83 | Balance: balanceResponse.data,
84 | });
85 | });
86 |
87 | app.listen(port, () => {
88 | console.log(`Backend server is running on port ${port}...`);
89 | });
90 |
--------------------------------------------------------------------------------
/react_native/android-studio-wipe-data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/android-studio-wipe-data.png
--------------------------------------------------------------------------------
/react_native/xcode-config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/plaid/tiny-quickstart/4757ba85309ece596d40fce2a35ce4d886613fd1/react_native/xcode-config.png
--------------------------------------------------------------------------------
/vanilla_js/.env.example:
--------------------------------------------------------------------------------
1 | # Copy this file to .env and fill out each variable
2 | # NOTE: To use Production, you must set a use case for Link.
3 | # You can do this in the Dashboard under Link -> Link Customization -> Data Transparency:
4 | # https://dashboard.plaid.com/link/data-transparency-v5
5 |
6 | PLAID_CLIENT_ID=
7 | PLAID_SECRET=
8 | PLAID_ENV=sandbox
--------------------------------------------------------------------------------
/vanilla_js/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Plaid
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vanilla_js/README.md:
--------------------------------------------------------------------------------
1 | # README: Tiny Quickstart (Vanilla JS)
2 |
3 | ### Overview
4 |
5 | This is a minimal app that implements Plaid using a very basic HTML/vanilla JS frontend with an Express/Node backend. After linking a sample bank account, the app retrieves balance information associated with the account and renders it on the home page.
6 |
7 | If you're looking for a more fully-featured quickstart, covering more API endpoints, available in more languages, and with explanations of the underlying flows, see the official [Plaid Quickstart](https://www.plaid.com/docs/quickstart).
8 |
9 | ### Running the app
10 |
11 | #### Set up your environment
12 |
13 | This app uses the latest stable version of Node. At the time of writing, the latest stable version is v18.18.0. It's recommended you use this version of Node to run the app. For information on installing Node, see [How to install Node.js](https://nodejs.dev/learn/how-to-install-nodejs).
14 |
15 | #### Install dependencies
16 |
17 | Ensure you're in the **vanilla_js/** folder, then install the necessary dependencies:
18 |
19 | ```bash
20 | npm install
21 | ```
22 |
23 | #### Equip the app with credentials
24 |
25 | Copy the included **.env.example** to a file called **.env**.
26 |
27 | ```bash
28 | cp .env.example .env
29 | ```
30 |
31 | Fill out the contents of the **.env** file with the [client ID and Sandbox secret in your Plaid dashboard](https://dashboard.plaid.com/team/keys). Don't place quotes (`"`) around the credentials (i.e., `PLAID_CLIENT_ID=adn08a280hqdaj0ad`). Use the "Sandbox" secret when setting the `PLAID_SECRET` variable.
32 |
33 | #### Start the server
34 |
35 | ```bash
36 | npm start
37 | ```
38 |
39 | The app will run on port 8080.
40 |
41 | ### Using the app
42 |
43 | The app allows you to link a sample bank account at an OAuth bank or a non-OAuth bank. For more information on how to link accounts at both types of banks, see the sections below.
44 |
45 | #### Non-OAuth banks
46 |
47 | Most banks returned by Link in the app are non-OAuth banks. When connecting a non-OAuth bank account, use the following sample credentials:
48 |
49 | - Username: `user_good`
50 | - Password: `pass_good`
51 |
52 | If prompted to provide a multi-factor authentication code, use `1234`
53 |
54 | #### OAuth banks
55 |
56 | With OAuth banks, end users temporarily leave Link to authenticate and permission data using the bank's website (or mobile app) instead. Afterward, they're redirected back to Link to complete the Link flow and return control to the application where the account is being linked. In this app, "Platypus OAuth Bank" is an OAuth bank.
57 |
58 | To experience an OAuth flow in this app:
59 |
60 | 1. Navigate to [**Team Settings > API**](https://dashboard.plaid.com/team/api) in your Plaid account.
61 |
62 | 2. In the **Allowed redirect URIs** section, click "Configure".
63 |
64 | 3. Add `http://localhost:8080/oauth` as a redirect URI and save your changes.
65 |
66 | 4. Navigate to the **.env** file in your project directory. Add the following line of code to the end of the file:
67 |
68 | ```bash
69 | PLAID_SANDBOX_REDIRECT_URI=http://localhost:8080/oauth
70 | ```
71 |
72 | 5. Save your changes to the file and restart your local server (i.e., end the current server process and run `npm start` again).
73 |
74 | 6. Navigate to `localhost:8080` and proceed to link an account.
75 |
76 | 7. On the "Select your bank" screen, type "oauth" into the search bar. Select "Platypus OAuth Bank".
77 |
78 | 8. On the next screen, select the first instance of "Platypus OAuth Bank".
79 |
80 | 9. Click "Continue" when prompted. You'll be redirected to the login page for "First Platypus Bank". Click "Sign in" to proceed. Link will connect the account at the OAuth bank, prompt you to continue, and then redirect you back to the home page.
81 |
82 | For more information on OAuth with Plaid, see the [OAuth Guide](https://plaid.com/docs/link/oauth/) in Plaid's documentation.
83 |
84 | ### Troubleshooting
85 |
86 | #### MISSING_FIELDS error
87 |
88 | If you encounter a **MISSING_FIELDS** error, it's possible you did not properly fill out the **.env** file. Be sure to add your client ID and Sandbox secret to the corresponding variables in the file.
89 |
90 | #### OAuth flow fails to start
91 |
92 | Ensure you've added the redirect URI present in the **.env** file as a [configured URI in your Plaid account](https://dashboard.plaid.com/team/api). The two values should be identical.
93 |
--------------------------------------------------------------------------------
/vanilla_js/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
70 |
71 | Plaid | Minimal Quickstart
72 |
73 |
91 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/vanilla_js/oauth.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Plaid | Minimal Quickstart
6 |
7 |
8 |
9 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/vanilla_js/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "plaid-tiny-quickstart",
3 | "version": "1.0.0",
4 | "description": "A minimal quickstart demonstrating Plaid Link, Balances, and OAuth",
5 | "main": "server.js",
6 | "scripts": {
7 | "start": "node server.js",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "author": "Gilberto Hernandez",
11 | "license": "MIT",
12 | "dependencies": {
13 | "body-parser": "^1.19.1",
14 | "dotenv": "^16.0.0",
15 | "express": "^4.17.2",
16 | "express-session": "^1.17.2",
17 | "path": "^0.12.7",
18 | "plaid": "^30.0.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vanilla_js/server.js:
--------------------------------------------------------------------------------
1 | /*
2 | server.js – Configures the Plaid client and uses Express to defines routes that call Plaid endpoints in the Sandbox environment.
3 | Utilizes the official Plaid node.js client library to make calls to the Plaid API.
4 | */
5 |
6 | require("dotenv").config();
7 | const express = require("express");
8 | const bodyParser = require("body-parser");
9 | const session = require("express-session");
10 | const { Configuration, PlaidApi, PlaidEnvironments } = require("plaid");
11 | const path = require("path");
12 | const app = express();
13 |
14 | app.use(
15 | // FOR DEMO PURPOSES ONLY
16 | // Use an actual secret key in production
17 | session({ secret: "bosco", saveUninitialized: true, resave: true })
18 | );
19 |
20 | app.use(bodyParser.urlencoded({ extended: false }));
21 | app.use(bodyParser.json());
22 |
23 | app.get("/", async (req, res) => {
24 | res.sendFile(path.join(__dirname, "index.html"));
25 | });
26 |
27 | app.get("/oauth", async (req, res) => {
28 | res.sendFile(path.join(__dirname, "oauth.html"));
29 | });
30 |
31 | // Configuration for the Plaid client
32 | const config = new Configuration({
33 | basePath: PlaidEnvironments[process.env.PLAID_ENV],
34 | baseOptions: {
35 | headers: {
36 | "PLAID-CLIENT-ID": process.env.PLAID_CLIENT_ID,
37 | "PLAID-SECRET": process.env.PLAID_SECRET,
38 | "Plaid-Version": "2020-09-14",
39 | },
40 | },
41 | });
42 |
43 | //Instantiate the Plaid client with the configuration
44 | const client = new PlaidApi(config);
45 |
46 | //Creates a Link token and return it
47 | app.get("/api/create_link_token", async (req, res, next) => {
48 | const tokenResponse = await client.linkTokenCreate({
49 | user: { client_user_id: req.sessionID },
50 | client_name: "Plaid's Tiny Quickstart",
51 | language: "en",
52 | products: ["auth"],
53 | country_codes: ["US"],
54 | redirect_uri: process.env.PLAID_SANDBOX_REDIRECT_URI,
55 | });
56 | res.json(tokenResponse.data);
57 | });
58 |
59 | // Exchanges the public token from Plaid Link for an access token
60 | app.post("/api/exchange_public_token", async (req, res, next) => {
61 | const exchangeResponse = await client.itemPublicTokenExchange({
62 | public_token: req.body.public_token,
63 | });
64 |
65 | // FOR DEMO PURPOSES ONLY
66 | // Store access_token in DB instead of session storage
67 | req.session.access_token = exchangeResponse.data.access_token;
68 | res.json(true);
69 | });
70 |
71 | // Fetches balance data using the Node client library for Plaid
72 | app.get("/api/data", async (req, res, next) => {
73 | const access_token = req.session.access_token;
74 | const balanceResponse = await client.accountsBalanceGet({ access_token });
75 | res.json({
76 | Balance: balanceResponse.data,
77 | });
78 | });
79 |
80 | // Checks whether the user's account is connected, called
81 | // in index.html when redirected from oauth.html
82 | app.get("/api/is_account_connected", async (req, res, next) => {
83 | return (req.session.access_token ? res.json({ status: true }) : res.json({ status: false}));
84 | });
85 |
86 | app.listen(process.env.PORT || 8080);
87 |
--------------------------------------------------------------------------------
/vanilla_typescript/.env.example:
--------------------------------------------------------------------------------
1 | # Copy this file to .env and fill out each variable
2 | # NOTE: To use Production, you must set a use case for Link.
3 | # You can do this in the Dashboard under Link -> Link Customization -> Data Transparency:
4 | # https://dashboard.plaid.com/link/data-transparency-v5
5 |
6 | PLAID_CLIENT_ID=
7 | PLAID_SECRET=
8 | PLAID_ENV=sandbox
--------------------------------------------------------------------------------
/vanilla_typescript/README.md:
--------------------------------------------------------------------------------
1 | # README: Tiny Quickstart (Vanilla TypeScript)
2 |
3 | ### Overview
4 |
5 | This is a minimal app that implements Plaid using a very basic HTML/vanilla JS frontend with an Express/Node backend running on TypeScript. After linking a sample bank account, the app retrieves balance information associated with the account and renders it on the home page.
6 |
7 | If you're looking for a more fully-featured quickstart, covering more API endpoints, available in more languages, and with explanations of the underlying flows, see the official [Plaid Quickstart](https://www.plaid.com/docs/quickstart).
8 |
9 | ### Running the app
10 |
11 | #### Set up your environment
12 |
13 | This app uses the latest stable version of Node. At the time of writing, the latest stable version is v18.18.0. It's recommended you use this version of Node to run the app. For information on installing Node, see [How to install Node.js](https://nodejs.dev/learn/how-to-install-nodejs).
14 |
15 | #### Install dependencies
16 |
17 | Ensure you're in the **vanilla_typescript/** folder, then install the necessary dependencies:
18 |
19 | ```bash
20 | npm install
21 | ```
22 |
23 | #### Equip the app with credentials
24 |
25 | Copy the included **.env.example** to a file called **.env**.
26 |
27 | ```bash
28 | cp .env.example .env
29 | ```
30 |
31 | Fill out the contents of the **.env** file with the [client ID and Sandbox secret in your Plaid dashboard](https://dashboard.plaid.com/team/keys). Don't place quotes (`"`) around the credentials (i.e., `PLAID_CLIENT_ID=adn08a280hqdaj0ad`). Use the "Sandbox" secret when setting the `PLAID_SECRET` variable.
32 |
33 | #### Start the server
34 |
35 | ```bash
36 | npm run dev
37 | ```
38 |
39 | The app will run the TypeScript version on port 8080. If you want to compile the final product to JavaScript, you can run...
40 |
41 | ```bash
42 | npm run build
43 | ```
44 |
45 | ...followed by...
46 |
47 | ```bash
48 | npm run start
49 | ```
50 |
51 | ### Using the app
52 |
53 | The app allows you to link a sample bank account at an OAuth bank or a non-OAuth bank. For more information on how to link accounts at both types of banks, see the sections below.
54 |
55 | #### Non-OAuth banks
56 |
57 | Most banks returned by Link in the app are non-OAuth banks. When connecting a non-OAuth bank account, use the following sample credentials:
58 |
59 | - Username: `user_good`
60 | - Password: `pass_good`
61 |
62 | If prompted to provide a multi-factor authentication code, use `1234`
63 |
64 | #### OAuth banks
65 |
66 | With OAuth banks, end users temporarily leave Link to authenticate and permission data using the bank's website (or mobile app) instead. Afterward, they're redirected back to Link to complete the Link flow and return control to the application where the account is being linked. In this app, "Platypus OAuth Bank" is an OAuth bank.
67 |
68 | To experience an OAuth flow in this app:
69 |
70 | 1. Navigate to [**Team Settings > API**](https://dashboard.plaid.com/team/api) in your Plaid account.
71 |
72 | 2. In the **Allowed redirect URIs** section, click "Configure".
73 |
74 | 3. Add `http://localhost:8080/oauth` as a redirect URI and save your changes.
75 |
76 | 4. Navigate to the **.env** file in your project directory. Add the following line of code to the end of the file:
77 |
78 | ```bash
79 | PLAID_SANDBOX_REDIRECT_URI=http://localhost:8080/oauth
80 | ```
81 |
82 | 5. Save your changes to the file and restart your local server (i.e., end the current server process and run `npm start` again).
83 |
84 | 6. Navigate to `localhost:8080` and proceed to link an account.
85 |
86 | 7. On the "Select your bank" screen, type "oauth" into the search bar. Select "Platypus OAuth Bank".
87 |
88 | 8. On the next screen, select the first instance of "Platypus OAuth Bank".
89 |
90 | 9. Click "Continue" when prompted. You'll be redirected to the login page for "First Platypus Bank". Click "Sign in" to proceed. Link will connect the account at the OAuth bank, prompt you to continue, and then redirect you back to the home page.
91 |
92 | For more information on OAuth with Plaid, see the [OAuth Guide](https://plaid.com/docs/link/oauth/) in Plaid's documentation.
93 |
94 | ### Troubleshooting
95 |
96 | #### MISSING_FIELDS error
97 |
98 | If you encounter a **MISSING_FIELDS** error, it's possible you did not properly fill out the **.env** file. Be sure to add your client ID and Sandbox secret to the corresponding variables in the file.
99 |
100 | #### OAuth flow fails to start
101 |
102 | Ensure you've added the redirect URI present in the **.env** file as a [configured URI in your Plaid account](https://dashboard.plaid.com/team/api). The two values should be identical.
103 |
--------------------------------------------------------------------------------
/vanilla_typescript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "plaid-tiny-quickstart",
3 | "version": "1.0.0",
4 | "description": "A minimal quickstart demonstrating Plaid Link, Balances, and OAuth",
5 | "main": "dist/server.js",
6 | "scripts": {
7 | "start": "node dist/server.js",
8 | "dev": "ts-node src/server.ts",
9 | "build": "tsc && npm run copy-assets",
10 | "copy-assets": "copyfiles -u 1 src/*.html dist/",
11 | "test": "echo \"Error: no test specified\" && exit 1"
12 | },
13 | "author": "Todd Kerpelman",
14 | "license": "MIT",
15 | "devDependencies": {
16 | "@types/express": "^4.17.18",
17 | "@types/express-session": "^1.17.8",
18 | "@types/node": "^20.6.5",
19 | "copyfiles": "^2.4.1",
20 | "typescript": "^5.2.2"
21 | },
22 | "dependencies": {
23 | "body-parser": "^1.20.2",
24 | "dotenv": "^16.3.1",
25 | "express": "^4.18.2",
26 | "express-session": "^1.17.3",
27 | "path": "^0.12.7",
28 | "plaid": "^30.0.0",
29 | "ts-node": "^10.9.1"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vanilla_typescript/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
71 |
72 | Plaid | Minimal Quickstart
73 |
74 |
75 |
88 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/vanilla_typescript/src/oauth.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
71 |
72 | Plaid | Minimal Quickstart
73 |
74 |
75 |
88 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/vanilla_typescript/src/server.ts:
--------------------------------------------------------------------------------
1 | /*
2 | server.js – Configures the Plaid client and uses Express to defines routes that call Plaid endpoints in the Sandbox environment.
3 | Utilizes the official Plaid node.js client library to make calls to the Plaid API.
4 | */
5 | import dotenv from "dotenv";
6 | import express, {
7 | ErrorRequestHandler,
8 | Request,
9 | Response,
10 | Application,
11 | NextFunction,
12 | } from "express";
13 | import bodyParser from "body-parser";
14 | import session from "express-session";
15 | import {
16 | Configuration,
17 | CountryCode,
18 | LinkTokenCreateRequest,
19 | PlaidApi,
20 | PlaidEnvironments,
21 | PlaidError,
22 | Products,
23 | } from "plaid";
24 | import path from "path";
25 |
26 | dotenv.config();
27 | const app: Application = express();
28 |
29 | // Let's tell TypeScript we're adding a new property to the session
30 | // Again, don't ever do this in production
31 | declare module "express-session" {
32 | interface SessionData {
33 | access_token?: string;
34 | }
35 | }
36 |
37 | app.use(
38 | // FOR DEMO PURPOSES ONLY
39 | // Use an actual secret key in production
40 | session({
41 | secret: "use-a-real-secret-key",
42 | saveUninitialized: true,
43 | resave: true,
44 | })
45 | );
46 |
47 | app.use(bodyParser.urlencoded({ extended: false }));
48 | app.use(bodyParser.json());
49 |
50 | app.get("/", async (_: Request, res: Response) => {
51 | res.sendFile(path.join(__dirname, "index.html"));
52 | });
53 |
54 | app.get("/oauth", async (_: Request, res: Response) => {
55 | res.sendFile(path.join(__dirname, "oauth.html"));
56 | });
57 |
58 | // Configuration for the Plaid client
59 | const environmentName = process.env.PLAID_ENV ?? "sandbox";
60 |
61 | const config = new Configuration({
62 | basePath: PlaidEnvironments[environmentName],
63 | baseOptions: {
64 | headers: {
65 | "PLAID-CLIENT-ID": process.env.PLAID_CLIENT_ID,
66 | "PLAID-SECRET": process.env.PLAID_SECRET,
67 | "Plaid-Version": "2020-09-14",
68 | },
69 | },
70 | });
71 |
72 | //Instantiate the Plaid client with the configuration
73 | const client: PlaidApi = new PlaidApi(config);
74 |
75 | //Creates a Link token and return it
76 | app.get(
77 | "/api/create_link_token",
78 | async (req: Request, res: Response, next: NextFunction) => {
79 | try {
80 | const linkConfigObject: LinkTokenCreateRequest = {
81 | user: { client_user_id: req.sessionID },
82 | client_name: "Plaid's Tiny Quickstart",
83 | language: "en",
84 | products: [Products.Auth],
85 | country_codes: [CountryCode.Us],
86 | redirect_uri: process.env.PLAID_SANDBOX_REDIRECT_URI,
87 | };
88 | const tokenResponse = await client.linkTokenCreate(linkConfigObject);
89 | res.json(tokenResponse.data);
90 | } catch (error) {
91 | next(error);
92 | }
93 | }
94 | );
95 |
96 | // Exchanges the public token from Plaid Link for an access token
97 | app.post(
98 | "/api/exchange_public_token",
99 | async (req: Request, res: Response, next: NextFunction) => {
100 | try {
101 | const exchangeResponse = await client.itemPublicTokenExchange({
102 | public_token: req.body.public_token,
103 | });
104 |
105 | // FOR DEMO PURPOSES ONLY
106 | // Store access_token in DB instead of session storage
107 | req.session.access_token = exchangeResponse.data.access_token;
108 | res.json(true);
109 | } catch (error) {
110 | next(error);
111 | }
112 | }
113 | );
114 |
115 | // Fetches balance data using the Node client library for Plaid
116 | app.get(
117 | "/api/data",
118 | async (req: Request, res: Response, next: NextFunction) => {
119 | try {
120 | const access_token = req.session.access_token ?? "";
121 | const balanceResponse = await client.accountsBalanceGet({
122 | access_token: access_token,
123 | });
124 | res.json({
125 | Balance: balanceResponse.data,
126 | });
127 | } catch (error) {
128 | next(error);
129 | }
130 | }
131 | );
132 |
133 | // Checks whether the user's account is connected, called
134 | // in index.html when redirected from oauth.html
135 | app.get(
136 | "/api/is_account_connected",
137 | async (req: Request, res: Response, next: NextFunction) => {
138 | try {
139 | return req.session.access_token
140 | ? res.json({ status: true })
141 | : res.json({ status: false });
142 | } catch (error) {
143 | next(error);
144 | }
145 | }
146 | );
147 |
148 | type PotentialPlaidError = Error & {
149 | response?: {
150 | data?: any;
151 | };
152 | };
153 |
154 | const errorHandler: ErrorRequestHandler = (
155 | err: PotentialPlaidError,
156 | req: Request,
157 | res: Response,
158 | next: NextFunction
159 | ) => {
160 | console.error(`Received an error for ${req.method} ${req.path}`);
161 | if (err.response) {
162 | const plaidError: PlaidError = err.response.data;
163 | console.error(err.response.data);
164 | res.status(500).send(plaidError);
165 | } else {
166 | console.error(err);
167 | res.status(500).send({
168 | error_code: "OTHER_ERROR",
169 | error_message: "I got some other message on the server.",
170 | });
171 | }
172 | };
173 |
174 | app.use(errorHandler);
175 |
176 | app.listen(process.env.PORT || 8080);
177 |
--------------------------------------------------------------------------------
/vanilla_typescript/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Visit https://aka.ms/tsconfig to read more about this file */
4 |
5 | /* Projects */
6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12 |
13 | /* Language and Environment */
14 | "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16 | // "jsx": "preserve", /* Specify what JSX code is generated. */
17 | // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
18 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26 |
27 | /* Modules */
28 | "module": "commonjs" /* Specify what module code is generated. */,
29 | "rootDir": "./src" /* Specify the root folder within your source files. */,
30 | // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
31 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38 | // "resolveJsonModule": true, /* Enable importing .json files. */
39 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
40 |
41 | /* JavaScript Support */
42 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
43 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
44 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
45 |
46 | /* Emit */
47 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
48 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */
49 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
50 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
51 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
52 | "outDir": "./dist" /* Specify an output folder for all emitted files. */,
53 | // "removeComments": true, /* Disable emitting comments. */
54 | // "noEmit": true, /* Disable emitting files from a compilation. */
55 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
56 | // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
57 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
58 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
59 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
61 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
62 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
63 | // "newLine": "crlf", /* Set the newline character for emitting files. */
64 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
65 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
66 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
67 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
68 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
69 | // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
70 |
71 | /* Interop Constraints */
72 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
73 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
74 | "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
75 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
76 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
77 |
78 | /* Type Checking */
79 | "strict": true /* Enable all strict type-checking options. */,
80 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
81 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
82 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
83 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
84 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
85 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
86 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
87 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
88 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
89 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
90 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
91 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
92 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
93 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
94 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
95 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
96 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
97 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
98 |
99 | /* Completeness */
100 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
101 | "skipLibCheck": true /* Skip type checking all .d.ts files. */
102 | },
103 | "include": [
104 | "src/**/*.ts" // Files to be compiled
105 | ],
106 | "exclude": ["node_modules"]
107 | }
108 |
--------------------------------------------------------------------------------