landakram / plaid-cli

A CLI tool for working with the Plaid API. Link accounts and pull transactions from the command line.
MIT License
39 stars 11 forks source link

Use link tokens instead of public key for linking/relinking accounts #2

Closed jdormit closed 3 years ago

jdormit commented 3 years ago

This is an attempt at resolving #1 - using link tokens instead of public keys to access the Plaid API. I basically followed the template you suggested - updating the plaid-go dependency to the latest version and changing the link and relink flows to use the new link token methods. I don't have much Go experience, so any feedback is welcome.

I had to break out a totally separate relink method in the linker, since in the new flow relinking doesn't return anything on success - the access token the app previously had just stays valid. This made the linker more verbose than it was before, but I couldn't think of a better way to represent the new logic.

Let me know what you think!

landakram commented 3 years ago

@jdormit, I went ahead and made the revisions. Thank you so much for your contributions!

jdormit commented 3 years ago

Thanks @landakram! Sorry I didn't get to it sooner - my schedule got a bit crazy.

landakram commented 3 years ago

@jdormit, no worries at all. Do let me know if you end up working on a ledger-cli integration. Would love to help out.

jdormit commented 3 years ago

I will definitely let you know! It'll likely be a few weeks before I can get back to it.