1.0.2 • Published 5 years ago

ember-plaid-link v1.0.2

Weekly downloads
104
License
MIT
Repository
-
Last release
5 years ago

ember-plaid-link

Plaid's drop-in Link module as an Ember component.

Installation

# From within your ember-cli project
ember install ember-plaid-link

Configuration

// config/environment.js
ENV['ember-plaid'] = {
  clientName: 'REQUIRED',
  product: 'auth',
  key: 'test_key',
  env: 'tartan'
};

Check the Link Docs for all of the parameter options.

The script tag adding Plaid JS will be automatically added to the body of the HTML. To disable this option, you can add scriptTag: false to ember-plaid.

Usage

<PlaidLink action='processPlaidToken'>

{{!-- Or --}}

{{PlaidLink @action='processPlaidToken'}}Verify Bank Account{{/plaid-link}}

Once a user has successfully onboarded via Plaid Link, the provided action will be called with the public_token passed as the sole argument. From there, you should follow the instructions for exchanging the public_token for an access_token.

Once you have the public_token, you can use it to initialize plaid-link component in "update mode". Update mode allows the user to update Plaid when they change their online-banking credentials or MFA.

<PlaidLink 
  @action=(fn this.processPlaidToken) 
  @token={{this.public_token}}>

{{!-- Or --}}

<PlaidLink 
  @action='processPlaidToken' 
  @token=$public_token>Verify Bank Account</PlaidLink>