Skip to content

Commit

Permalink
Scan passport once (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
mludowise-stripe authored Mar 31, 2022
1 parent 76d8294 commit 7b454fa
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,12 @@ extension DocumentCaptureViewController: AVCaptureVideoDataOutputSampleBufferDel
@available(iOSApplicationExtension, unavailable)
extension DocumentCaptureViewController: IdentityDataCollecting {
var collectedFields: Set<VerificationPageFieldType> {
return Set([.idDocumentFront]).union(documentType.hasBack ? [.idDocumentBack] : [])
// Note: Always include the document back, even if the document type
// doesn't have a back. The initial VerificationPage request is made
// before the user selects which document type they've selected, so it
// will always include the back. Including `idDocumentBack` here ensures
// that the user isn't erroneously prompted to scan their document twice.
return [.idDocumentFront, .idDocumentBack]
}
}

Expand Down

0 comments on commit 7b454fa

Please sign in to comment.