【问题标题】:Display custom user name and password modal dialog with Plaid Link使用 Plaid Link 显示自定义用户名和密码模式对话框
【发布时间】:2016-09-04 02:37:10
【问题描述】:

我正在使用 Plaid Link 及其 custom integration,到目前为止,我能够提取机构列表。这很棒,因为我不必对机构列表进行硬编码,并且可以为选择机构显示自定义模式对话框。

现在下一步是让用户输入他们的凭据,以便我通过onSuccess 回调获得public_tokenmetadata。 Plaid Link 希望我使用传入的所选机构的类型致电linkHandler.open,它会显示 Plaid 模式对话框,允许用户输入他们的凭据并确认。然后调用onSuccess 回调。

但是如果我想让用户通过自定义模式输入他们的用户名和密码怎么办。是否有类似linkHandler.auth(userName, password) 的东西会导致onSuccess 以类似的方式被调用,但不显示我无法设置样式的模态对话框?

这是 sn-p,但它基本上是从文档中复制粘贴的,所以这并不奇怪:

let plaidLink = Plaid.create({
  env: "tartan",
  clientName: "",
  key: "blahblahblah", // A correct public key.
  product: "auth",
  onLoad: () => {
    console.debug("onLoad");
  },
  onSuccess: (publicToken, metadata) => {
    console.debug("onSuccess");
  },
  onExit: () => {
    console.debug("onExit");
  }
});

// Don't want this!
//plaidLink.open("bofa"); 

// Want this, this is cool, but can I get the same for the credential dialog?
console.debug("institutions", plaidLink.institutions);

【问题讨论】:

    标签: javascript plaid


    【解决方案1】:

    恐怕您正在寻找的功能目前在 Plaid Link 中不存在,并且可能不会在不久的将来实现。这是因为 Link 是专门为处理每家银行所拥有的相当复杂的流程和可能性范围而构建的。

    对于像 Wells Fargo 这样的简单集成,不需要 MFA 问题或答案,您的建议可能会奏效。

    Plaid.auth('wells', userName, password)
    

    但是对于像ChaseBank of America 这样的其他机构,它们都有各种各样的MFA 问题,流程会更加复杂,并且无法通过一个方法调用来实现。

    Plaid.auth('chase', userName, password)
    Plaid.mfaDevice('chase', device)
    Plaid.mfaCode('chase', code)
    Plaid.handleMfaError('chase', error)
    // ...
    

    如果您确实想向用户显示自定义模式,您可以选择构建自己的 Plaid API 实现。然而,Plaid Link 可以为您处理所有这些复杂性,我强烈建议您使用它来确保您的用户拥有出色的用户体验。 Plaid 团队积极维护 Link,因此它不断改进,新功能也经常发布。

    【讨论】:

    • 感谢您的回答。我希望按照您的建议重新设计使用 Plaid API 的当前实现。我们真的很想在我们的团队中使用 Plaid Link,所以我们决定放弃自定义模态设计,以便能够集成它。谢谢你的回答。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-31
    相关资源
    最近更新 更多