plaid / react-native-plaid-link-sdk

Plaid Link for React Native
MIT License
174 stars 120 forks source link

Results for iOS and Android differ #47

Closed gfreakcs closed 3 years ago

gfreakcs commented 4 years ago

During selection:

  1. iOS shows all accounts image

  2. Android shows only depository types (checkings, savings) image

onSuccess:

  1. iOS

    {
    "account": {
    "id": "<account ID>",
    "mask": "0000",
    "name": "Plaid Checking",
    "subtype": "checking",
    "type": "depository"
    },
    "account_id": "<account ID>",
    "accounts": [
    {
      "id": "<account ID>",
      "mask": "0000",
      "name": "Plaid Checking",
      "subtype": "checking",
      "type": "depository"
    }
    ],
    "institution": {
    "institution_id": "ins_6",
    "name": "US Bank"
    },
    "link_session_id": "<link session ID>",
    "public_token": "<public token>",
    "request_id": "<request ID>",
    "status": "connected"
    }
  2. Android

    {
    "link_connection_metadata": {
    "accounts": [[Object]],
    "institution_id": "ins_6",
    "institution_name": "US Bank",
    "link_session_id": "<link session ID>",
    "raw_data": {
      "account_id": "<account ID>",
      "account_mask": "0000",
      "account_name": "Plaid Checking",
      "account_subtype": "checking",
      "account_type": "depository",
      "accounts": "[{\"_id\":\"<account ID>\",\"balance\":{\"available\":100,\"currency\":\"USD\",\"current\":110,\"localized\":{\"available\":\"$100.00\",\"current\":\"$110.00\"}},\"meta\":{\"name\":\"Plaid Checking\",\"number\":\"0000\"},\"type\":\"depository\",\"subtype\":\"checking\"}]",
      "institution_id": "ins_6",
      "institution_name": "US Bank",
      "link_session_id": "<link session ID>",
      "public_token": "<public token>"
    }
    },
    "public_token": "<public token>"
    }

<PlaidLink /> variable is the same as default configuration

Is this normal and should we just write code to query for platform?

zsweigart commented 4 years ago

@gfreakcs thanks for the input. We have noted the inconsistencies and will review them for the next release.

eltonbasha commented 4 years ago

@zsweigart Hi when is the next release going to be available? Thank you.

zsweigart commented 4 years ago

The next release is planned for mid-march. This is a current inconsistency between iOS vs web/Android and there are no current plans to patch it so it will remain inconsistent in RN

khazizaj commented 4 years ago

@zsweigart A couple of questions in relation to aiding our own development processes: Will both listed issues remain inconsistent for the next release? The different responses for both platforms can be handled, but the iOS bridge listing all accounts instead of only listing the depository types, does present as a significant issue for our live products. If we could have some feedback on how this might be prioritized, it would be quite helpful towards planning our own product releases; since alternatives need to be taken under consideration if this issue is not addressed promptly. Moreover, if this patch will not be planned as part of your next upcoming rollout, will this issue at least be handled in future iterations?

wkiefer commented 4 years ago

@khazizaj and @gfreakcs — what products are you passing in during initialization?

We'll be adding docs and support for account type filtering in the next release, which will ensure your results are the same on both platforms.

khazizaj commented 4 years ago

Hello, Do you have an approximate date on the release including the fix for account type filtering (discussed above)?

gfreakcs commented 4 years ago

@khazizaj and @gfreakcs — what products are you passing in during initialization?

We'll be adding docs and support for account type filtering in the next release, which will ensure your results are the same on both platforms.

We are passing ['auth', 'identity']

gfreakcs commented 4 years ago

Just checking in if there is a fix for the iOS account filter to just show checking and savings?

jacobparish commented 4 years ago

Will this be fixed anytime soon? Even in the most recent release, the formats are still different, although they differ from what was posted in this issue (in particular, android now has just a "metadata" property instead of "link_connection_metadata")

tbadlov commented 4 years ago

@wkiefer any update on this? It is quite problematic for us to move to your supported SDK given that updates Chase and Wells Fargo are imposing on us to leverage OAuth verification. Any update when will this be addressed?

zsweigart commented 4 years ago

Hi @tbadlov we will be releasing the next version of our native SDKs on 9/21. The react native update will follow on 9/28 which will unify the results between Android and iOS and have full support for OAuth verification. Thank you for your patience

ereio commented 4 years ago

@zsweigart looking forward to this release. We're waiting to integrate on both iOS and Android until the payloads are the same. Any updates on progress?

zoix commented 4 years ago

@zsweigart - I know you guys are working hard with the next update. We just made a different implementation for Android and it's now on the stores. It would be helpful if you guys can please let us know the exact date when this release is going to happen, so we can remove our implementation and have the same callback for iOS and Android beforehand; otherwise the Plaid integration for Android will fail for us and other people who made the same. Thanks!

amytang0 commented 4 years ago

Sorry for the delay, 6.0.2 should have the same payloads in onSuccess and onExit. For onEvent, Android is still returning a json object for event names, but is otherwise returning the same payload. We will flatten this object in the next release

zoix commented 4 years ago

Thanks @amytang0 - We are using the version 6.0.2-rc4 and can confirm that the response is still different. As mentioned, we made a different implementation (basically a parser) for Android.

Please let us know when the next release is available so we can check again :-)

amytang0 commented 4 years ago

Hey would you mind sharing the differing results? Thanks!

On Tue, Oct 13, 2020, 12:09 PM AGAMA notifications@github.com wrote:

Thanks @amytang0 https://github.com/amytang0 - We are using the version 6.0.2-rc4 and can confirm that the response is still different. As mentioned, we made a different implementation (basically a parser) for Android.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/plaid/react-native-plaid-link-sdk/issues/47#issuecomment-707950045, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGSZZMD6HI7HFXLN3HNFQLSKSQXDANCNFSM4KPR7WBQ .

zoix commented 4 years ago

Hi @amytang0 - It seems that you guys are currently working on the output, two days ago the structure and issues were different:

Because the previous reasons, we did not use metadata_json and instead we used metadata.accounts and metadata.institution, and in the outputs you can see that as of today, these two are still different:

iOS

{
   "public_token":"<public token>",
   "metadata":{
      "metadata_json":{
         "institution":{
            "name":"RBC Royal Bank",
            "institution_id":"ins_39"
         },
         "account":{
            "id":"gyZd8g9r48iB8nEzKByeFv8Pnwz9WeigRXVwQ",
            "name":"Plaid Checking",
            "type":"depository",
            "subtype":"checking",
            "mask":"0000"
         },
         "account_id":"gyZd8g9r48iB8nEzKByeFv8Pnwz9WeigRXVwQ",
         "accounts":[
            {
               "id":"gyZd8g9r48iB8nEzKByeFv8Pnwz9WeigRXVwQ",
               "name":"Plaid Checking",
               "mask":"0000",
               "type":"depository",
               "subtype":"checking"
            }
         ],
         "link_session_id":"<link session id>",
         "public_token":"<public token>"
      },
      "link_session_id":"<link session id>",
      "accounts":[
         {
            "type":"depository",
            "id":"gyZd8g9r48iB8nEzKByeFv8Pnwz9WeigRXVwQ",
            "verification_status":"",
            "mask":"",
            "name":"Plaid Checking",
            "subtype":"checking"
         }
      ],
      "institution":{
         "name":"RBC Royal Bank",
         "institution_id":"ins_39"
      }
   }
}

Android:

{
   "public_token":"<public token>",
   "metadata":{
      "metadata_json":{
         "institution":{
            "name":"RBC Royal Bank",
            "institution_id":"ins_39"
         },
         "account":{
            "id":"JJL9l5qMjwC39K1kj74Au9qJVN6Dz3TdLGwaR",
            "name":"Plaid Checking",
            "type":"depository",
            "subtype":"checking",
            "mask":"0000"
         },
         "account_id":"JJL9l5qMjwC39K1kj74Au9qJVN6Dz3TdLGwaR",
         "accounts":[
            {
               "id":"JJL9l5qMjwC39K1kj74Au9qJVN6Dz3TdLGwaR",
               "name":"Plaid Checking",
               "mask":"0000",
               "type":"depository",
               "subtype":"checking"
            }
         ],
         "link_session_id":"<link session id>",
         "public_token":"<public token>"
      },
      "link_session_id":"<link session id>",
      "institution":{
         "institution_name":"RBC Royal Bank",
         "institution_id":"ins_39"
      },
      "accounts":[
         {
            "subtype":{
               "json":"checking",
               "account_type":{
                  "json":"depository"
               }
            },
            "mask":"0000",
            "name":"Plaid Checking",
            "id":"JJL9l5qMjwC39K1kj74Au9qJVN6Dz3TdLGwaR"
         }
      ]
   }
}

Since now metadata_json is inside metadata for both iOS and Android, and for iOS we could parsed it properly, we are going to change the implementation and use metadata_json only.

If anything else comes up, I will let you know!