The standard process allows your users to take a photo of either their Passport, National ID or Drivers License. You can customize this by limiting the types of documents you accept (i.e. only Passports) or requesting up to two different documents (i.e. first a Drivers License, then Passport or National ID)
Make your class conform to AuthenteqIdentificationDelegate
protocol
Use your license key and document scan steps configuration to create UIViewController
from Authenteq SDK
Present returned UIViewController
modally
Handle result in your delegate implementation
Please update the below code with your Client ID and Client Secret from your Customer Dashboard. We suggest adding this code to the relevant Storyboard or ViewController.
import AuthenteqFlow​class ExampleViewController: UIViewController {​func identification() {let viewController = AuthenteqFlow.instance.identificationViewController(with: "<YOUR CLIENT ID>",clientSecret: "<YOUR CLIENT SECRET>"documents: [[.driversLicense, .passport, .idCard]],delegate: self)present(viewController, animated: true)}}extension ExampleViewController: AuthenteqIdentificationDelegate {​func authenteqDidFinishIdentification(with result: IdentificationResult) {// Handle resultpresentedViewController?.dismiss(animated: true)}​func authenteqDidFailIdentification(with error: AuthenteqFlowError) {// Handle errorpresentedViewController?.dismiss(animated: true)}}​​
@import AuthenteqFlow;​@interface ExampleViewController: UIViewController <AuthenteqIdentificationDelegate>@end​@implementation ExampleViewController​- (void)identification {UIViewController *viewController =[[AuthenteqFlow instance]identificationViewControllerWith:@"<YOUR CLIENT ID>"clientSecret: @"<YOUR CLIENT SECRET>"documents: @[@[AuthenteqIdDocumentType.driversLicense],@[AuthenteqIdDocumentType.passport,AuthenteqIdDocumentType.idCard]]delegate:self];[self presentViewController:viewController animated:true completion:nil];}​#pragma MARK - AuthenteqIdentificationDelegate​- (void)authenteqDidFinishIdentificationWith:(IdentificationResult *)result {// Handle result[self.presentedViewController dismissViewControllerAnimated:true completion:nil];}​- (void)authenteqDidFailIdentificationWith:(enum AuthenteqFlowError)error {// Handle error[self.presentedViewController dismissViewControllerAnimated:true completion:nil];}​@end
Note: To support multiple documents you may specify as such:
documents: [[.driversLicense], [.passport, .idCard]],