onfido-sdk-ui icon indicating copy to clipboard operation
onfido-sdk-ui copied to clipboard

Issues with document types and country selection

Open pedrotorchio opened this issue 2 years ago • 7 comments

What was the expected behaviour?

image

For country selection to appear after a document selection, only if its required (if no country was specified and not passport)

What happened instead?

1)

Using same options as documented in "Example of Document step configurations with preselected documents where Country Selection will still be displayed" image

"documentTypes": {
          "passport": true,
          "driving_licence": true,
          "national_identity_card": true
}

I get the country selection first image And then the options image

2)

Using the options for our own use case, where driving licence may only be Australian and therefore no country selection is expected

documentTypes: {
            "passport": true,
            "driving_licence": { country: "AUS" },
},

Still get a country selection for all countries before seeing the options image

3)

This is the weirdest imo. If I configure document types to two documents with country "AUS", then dropdown still shows first, but with a single option for "Australia". If Passport type doesn't care about country, then why the difference?

documentTypes: {
            "driving_licence": { country: "AUS" },
            "national_identity_card": { country: "AUS" }
},

image

Version info:

  • Onfido SDK v8.3.0
  • OS Macos 12.5
  • Browser Chrome 104.0.5112.79
  • Device Chrome device tool
  • Node v16.15.1
  • Framework or relevant dependencies (if applicable) VueJS wraps the onfido sdk just to call the Onfido.init method

Integration configuration:

 const documentStep = {
        type: "document",
        options: {
          documentTypes: { 
            "driving_licence": { country: "AUS" },
            "national_identity_card": { country: "AUS" }
          },
          forceCrossDevice: this.useMobileDevice,
          useLiveDocumentCapture: this.getConfigValue(
            "enableLiveDocumentCapture"
          ),
          uploadFallback: true,
        },
};

const selfieStep = {
        type: "face",
        options: {
          requestedVariant: this.getConfigValue("useLiveness")
            ? "video"
            : "photo",
        },
};

const welcomeStep = {
        type: "welcome",
        options: {
          title: this.getConfigValue("welcomeScreen.title"),
          descriptions: this.getConfigValue("welcomeScreen.content"),
          nextButton: this.getConfigValue("welcomeScreen.ctaText"),
        },
};

Steps to reproduce:

I believe by just following the documented approach you'll get the same issues

Reproducible demo:

Your own jsFiddle seems to be in disagreement with your documentation and displays country selection first.

But here's one for number 3 above

pedrotorchio avatar Aug 17 '22 01:08 pedrotorchio

@pedrotorchio I'm just another Onfido customer, who also found this configuration a bit confusing...

But for your case. Let's say I'm an Australian citizen. Then I should get the option to select either Passport or Driver's License. Right?

But if I'm Japanese my only option should be to verify my identity by using my passport. Correct?

If so, Onfido would always have to display the country select dropdown I believe. How would they otherwise know if they should display just the passport option (or skip selection all together) or give the option to pick either passport or driver's license (for Aussies only)?

In your second example you're not allowing passports. Only driver's license and ID card. And for both only Australia. So Australia is the only available choice. So this is a configuration for which I think Onfido should skip the country selection screen.

TobbeLundberg avatar Aug 18 '22 06:08 TobbeLundberg

Hi @pedrotorchio

I recommend you to use the most updated documentation about Document Screen. https://github.com/onfido/onfido-sdk-ui#document

  1. If had "driving_licence" and "national_identity_card" on your code, so Issuing Country Selection will be displayed. That is the designed behaviour.
  2. That is expected as well. If documentTypes only includes one document type with a country value, users will not see the document selection screen and instead will be taken directly to the capture screen. @TobbeLundberg gave a good very good example. 3)I agree that would be a better design if we were skipping the Issuing Country Selection, as you had already specified the same country for the document types. I'm reaching out to our internal team to confirm that design and I'll get back to you as soon as possible.

onfido-website-team avatar Aug 24 '22 00:08 onfido-website-team

Hey @TobbeLundberg, I appreciate your reply and appologise for not getting back to this issue sooner. Yout point is valid if we are accepting foreign passports, but in our case we only accept Australian citizens and we want them to be requested for their Australian passport and Australian DL without going through a country selection.

pedrotorchio avatar Aug 24 '22 01:08 pedrotorchio

@onfido-website-team so there's no way to restrict the Onfido SDK to a single country then? That's mainly what we're trying to do at the moment and thought that would be possible for a combination of Passport (no country specified) and Driving licence (AUS).

pedrotorchio avatar Aug 24 '22 01:08 pedrotorchio

Hey, I'm looking at a similar situation and just wanted to check something:

I am upgrading from the Web SDK V6 -> V8 and noticed the Country Select has been moved before the DocType select. We haven't changed any code, other than the package version.

We accept any Driving Licence or any Passport Is it possible to have the previous behaviour where Country select would only be asked if they pick Driving Licence? e.g. image

I was also trying to find these changes in the Changelog or Migration guide, but all I could find is:

6.19.0 -> 6.20.0
Change in UX flow for Proof of Address Step
Proof of Address step now has an Issuing Country Selection screen before the Document Type Selection screen.

We however, do not use Proof of Address Thanks

finppp avatar Aug 24 '22 11:08 finppp

Hi pedrotorchio

For the latest release, that is the designed behaviour. The issuing_country screen will be shown first, regardless you have specified the country (Australia). The dropdown selection button will display Australia only.

Our Engineer team is aware of this behaviour, and they will review it. However, we don’t have an estimated time for a change.

I do apologize for the inconvenience caused.

Kind regards, Onfido Support

onfido-website-team avatar Sep 08 '22 12:09 onfido-website-team

Hi finppp 

For the latest release, this is designed behaviour. As I wrote to Pedro above. I understood your user case, and I’m passing it to our Product Manager and Engineers. However, we don’t have an estimated time for a new change.

This change happened on released 8.3.0 02 Aug 2022 https://github.com/onfido/onfido-sdk-ui/releases/tag/8.3.0 “Public: Collect country of residence before other profile data”

I do apologize for the inconvenience caused.

Kind regards, Onfido Support

onfido-website-team avatar Sep 08 '22 12:09 onfido-website-team