Giter Site home page Giter Site logo

plaid-acc-setup's Introduction

Plaid quickstart

This repository accompanies Plaid's quickstart guide.

Here you'll find full example integration apps using our client libraries:

Plaid quickstart app

Table of contents

1. Clone the repository

Using https:

git clone https://github.com/plaid/quickstart
cd quickstart

Alternatively, if you use ssh:

git clone [email protected]:plaid/quickstart.git
cd quickstart

Special instructions for Windows

Note - because this repository makes use of symbolic links, to run this on a Windows machine, make sure you have checked the "enable symbolic links" box when you download Git to your local machine. Then you can run the above commands to clone the quickstart. Otherwise, you may open your Git Bash terminal as an administrator and use the following command when cloning the project

git clone -c core.symlinks=true https://github.com/plaid/quickstart

2. Set up your environment variables

cp .env.example .env

Copy .env.example to a new file called .env and fill out the environment variables inside. At minimum PLAID_CLIENT_ID and PLAID_SECRET must be filled out. Get your Client ID and secrets from the dashboard: https://dashboard.plaid.com/account/keys

NOTE: .env files are a convenient local development tool. Never run a production application using an environment file with secrets in it.

3. Run the Quickstart

There are two ways to run the various language quickstarts in this repository. You can simply choose to use Docker, or you can run the code directly. If you would like to run the code directly, skip to the Run without Docker section.

Run with Docker

Pre-requisites

  • make available at your command line
  • Docker installed and running on your machine: https://docs.docker.com/get-docker/
  • Your environment variables populated in .env
  • If using Windows, a working Linux installation on Windows 10. If you are using Windows and do not already have WSL or Cygwin configured, we recommend running without Docker.

Running

There are three basic make commands available

  • up: builds and starts the container
  • logs: tails logs
  • stop: stops the container

Each of these should be used with a language argument, which is one of node, python, ruby, java, or go. If unspecified, the default is node.

Start the container
make up language=node

The quickstart backend is now running on http://localhost:8000 and frontend on http://localhost:3000.

If you make changes to one of the server files such as index.js, server.go, etc, or to the .env file, simply run make up language=node again to rebuild and restart the container.

If you experience a Docker connection error when running the command above, try the following:

  • Make sure Docker is running
  • Try running the command prefixed with sudo
View the logs
make logs language=node
Stop the container
make stop language=node

Run without Docker

Pre-requisites

  • The language you intend to use is installed on your machine and available at your command line. This repo should generally work with active LTS versions of each language such as node >= 14, python >= 3.8, ruby >= 2.6, etc.
  • Your environment variables populated in .env
  • npm
  • If using Windows, a command line utility capable of running basic Unix shell commands

1. Running the backend

Once started with one of the commands below, the quickstart will be running on http://localhost:8000 for the backend. Enter the additional commands in step 2 to run the frontend which will run on http://localhost:3000.

Node
$ cd ./node
$ npm ci
$ ./start.sh
Python

⚠️ As python2 has reached its end of life, only python3 is supported.

cd ./python

# If you use virtualenv
# virtualenv venv
# source venv/bin/activate

pip3 install -r requirements.txt
./start.sh

If you get this error message:

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)

You may need to run the following command in your terminal for your particular version of python in order to install SSL certificates:

# examples:
open /Applications/Python\ 3.9/Install\ Certificates.command
# or
open /Applications/Python\ 3.6/Install\ Certificates.command
Ruby
cd ./ruby
bundle
./start.sh
Go
cd ./go
go build
./start.sh
Java
cd ./java
mvn clean package
./start.sh

2. Running the frontend

$ cd ./frontend
$ npm ci
$ npm start

Testing OAuth

Some institutions (primarily in Europe, but a small number in the US) require an OAuth redirect authentication flow, where the end user is redirected to the bank’s website or mobile app to authenticate. For this flow, you should set PLAID_REDIRECT_URI=http://localhost:3000/ in .env. You will also need to register this localhost redirect URI in the Plaid dashboard under Team Settings > API > Allowed redirect URIs.

OAuth flows are only testable in the sandbox environment in this Quickstart app due to an https redirect_uri being required in other environments. Additionally, if you want to use the Payment Initiation product, you will need to contact Sales to get this product enabled.

plaid-acc-setup's People

Contributors

lindawoo-plaid avatar davidzhanghp avatar afh avatar otherchen avatar michaelckelly avatar phoenixy1 avatar pbernasconi avatar deeechun avatar stephenjayakar avatar amytang0 avatar notthefakestephen avatar ravron avatar rayraycano avatar raxod502-plaid avatar jncraton avatar ryandbump avatar stephenkoller avatar toddkerpelman avatar pixeleate avatar zachcutberth avatar blackchestnut avatar brooksvinyard avatar cconeill avatar ghernandez-plaid avatar gipsy86147 avatar jacksiegel avatar jamesrperkins avatar micottis avatar motdotla avatar ryanatallah avatar

Watchers

Miki Saarna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.