Code Monkey home page Code Monkey logo

Comments (9)

viceroypenguin avatar viceroypenguin commented on June 13, 2024 2

All -

You can see how Link Tokens are implemented by viewing the demo project here.

Steps are:

  1. Generate a Link token from the code behind, as seen here. It is a basic request that uses your developer credentials and information about which products, country, and language you wish to offer to users.
  2. Once generated, you pass that as the token field in the configs to the Plaid javascript app, as seen here. This allows the user's browser window to make a separate connection to Plaid that is authenticated via the token under the developer's account. The user then identifies bank and logs in.
  3. On success, you will be given a public token, as seen here, which you then pass to the server. In the code behind, you use that public token to immediately convert to an access token here. In this demo app, for convenience, we return the access token for developer use. In a real application, the access token should be treated as a secure value, and encrypted and stored for private use.
  4. The public token is then used for the rest of the APIs to identify both which user as well as which developer is making the call.
  5. Occasionally, the public token will need to be refreshed. This is done via an update token, which you can also see in the demo app.

Hope this helps you both, @richardvaldiviesomacias and @Ackara.

NB: @richardvaldiviesomacias this has already been implemented in the Going.Plaid fork of this library. You may find it easier to switch there to continue work.

from plaid.net.

Ackara avatar Ackara commented on June 13, 2024

Look at the Plaid.Link project it has a working example.
https://github.com/Ackara/Plaid.NET/tree/master/tests/Plaid.Link

You will have to create a file called 'secrets.json' with the object at the root of the project where the .sln file is

plaid
{
secret: ""
client_id: ""
public_key: ""
}

from plaid.net.

richardvaldiviesomacias avatar richardvaldiviesomacias commented on June 13, 2024

I was trying that example, but it did not run. I am using a Mac (Just FYI). I got the following error:

  Sassin.targets(25, 5): [MSB4018] The "CompileSassFiles" task failed unexpectedly.
System.ComponentModel.Win32Exception (0x80004005): ApplicationName='cmd', CommandLine='/c node "/Users/richard.valdivieso/.nuget/packages/sassin/0.0.19-rc/build/tools/0.0.19.0/compiler.js" "/Users/richard.valdivieso/development/Plaid.NET/tests/Plaid.Link/wwwroot/stylesheets/app.scss" "" "" "" true true true', CurrentDirectory='', Native error= Cannot find the specified file
  at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0029f] in <6e2cf641cb334436a164a308cb6331a9>:0 
  at System.Diagnostics.Process.Start () [0x0003a] in <6e2cf641cb334436a164a308cb6331a9>:0 
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
  at Acklann.Sassin.NodeJS.Execute (System.String command, System.Boolean doNotWait) [0x0001a] in <17f49b2192eb4ab490a365ea011e3008>:0 
  at Acklann.Sassin.SassCompiler.Compile (System.String sassFilePath, Acklann.Sassin.CompilerOptions options) [0x000da] in <17f49b2192eb4ab490a365ea011e3008>:0 
  at Acklann.Sassin.MSBuild.CompileSassFiles.Execute () [0x000d6] in <17f49b2192eb4ab490a365ea011e3008>:0 
  at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <b3c54f1f8f8043b7804a5a23260e4fc5>:0 
  at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x002a9] in <b3c54f1f8f8043b7804a5a23260e4fc5>:0 

from plaid.net.

richardvaldiviesomacias avatar richardvaldiviesomacias commented on June 13, 2024

Look at the Plaid.Link project it has a working example.
https://github.com/Ackara/Plaid.NET/tree/master/tests/Plaid.Link

You will have to create a file called 'secrets.json' with the object at the root of the project where the .sln file is

plaid
{
secret: ""
client_id: ""
public_key: ""
}

About this JSON file. The public key value is something that Plaid should generate, right?

from plaid.net.

Ackara avatar Ackara commented on June 13, 2024

Yes, all three values comes from plaid when you signup.

About the build error you're right It will only work on windows.
I forgot about Mac users.
The error occur because the msbuild task that I use to compile my sass files failed.
It uses cmd which is the command-line for windows hence it failed on your mac.

I suggest you forget building and just look at the code:

checkout these files:
https://github.com/Ackara/Plaid.NET/blob/master/tests/Plaid.Link/Pages/Index.cshtml.cs
https://github.com/Ackara/Plaid.NET/blob/master/tests/Plaid.Link/wwwroot/scripts/page/IndexPage.ts

from plaid.net.

richardvaldiviesomacias avatar richardvaldiviesomacias commented on June 13, 2024

Apparently, public_key is deprecated in favor of link_token. Still trying to figure out how this works.

from plaid.net.

thesuavehog avatar thesuavehog commented on June 13, 2024

It's not trivial...

You need to use a JAVASCRIPT implementation to launch the Plaid Link flow which is a CSS/JS UX built by Plaid. When that flow completes, you will get a token.

I added a bunch of data structures for parsing the Plaid link responses and metadata here: https://github.com/viceroypenguin/Going.Plaid.NET/tree/master/src/Plaid/Link

But the key is you need a webpage loaded in a browser so you can trigger the Plaid Link flow and then send a token back to your server. There is no way to do the Link flow programatically.

from plaid.net.

richardvaldiviesomacias avatar richardvaldiviesomacias commented on June 13, 2024

Thanks, @viceroypenguin I will take a look.

from plaid.net.

umerfarooq381 avatar umerfarooq381 commented on June 13, 2024

Though this issue is closed but the problem I am facing is near to this question.

I need to authenticate users' accounts using plaid API in .NET web application. I was struggling to integrate this project in my .NET 4.7 web application but I could not do so. Then I just included the Plaid.Link project in my solution and ran in the new instance in visual studio, it ran in the browser and created a local link. i.e. https://localhost:44359/. I then used it's link in my project and hit that link to create a flow to generate access link eventually. The project stores access link and access link in plaid_access_token.tmp in temp folder step by step. I understand Access token can be used after the completion of the flow to call other API end points. below screenshots are attached for all the steps.

Step 1:
plaid 1

Step 2:
plaid 2

Step 3:
plaid 3

Step 4:
plaid 4

Step 5:
plaid 5

Step 6:
plaid 6

I have 2 questions/ problems right now.
1- What I am doing is right or there is another better way of doings things? if yes, what steps should I follow.
2- When I run the project using above steps, it shows blue screens at the start and end of the flow. And in second step there is "Example uses Plaid to link your bank". How to avoid blue screen and change text at picture number two attached?

from plaid.net.

Related Issues (20)

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.