Identification
Explains how to start an identity verification
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)

Implementation

  • Make your class conform to AuthenteqIdentificationDelegate protocol
  • Use your client keys to create a UIViewController from Authenteq SDK
  • Present returned UIViewController modally
  • Handle result in your delegate implementation

Example to Start an Identification

Please update the below code with your Client ID and Client Secret from your Customer Dashboard. To support multiple documents and other flow settings also use the Customer Dashboard.
Flow ID specify which verification flow to use. Flow IDs are defined in the Customer Dashboard, section Verification Flow.
We suggest adding this code to the relevant Storyboard or ViewController.
Swift
Objective-C
1
import AuthenteqFlow
2
3
class ExampleViewController: UIViewController {
4
5
func identification() {
6
let identificationParams = IdentificationParams(
7
clientId: "<YOUR CLIENT ID>",
8
clientSecret: "<YOUR CLIENT SECRET>",
9
flowId: "<flow ID>" // optional
10
)
11
let viewController = AuthenteqFlow.instance.identificationViewController(
12
with: identificationParams,
13
delegate: self
14
)
15
viewController.modalPresentationStyle = .fullScreen
16
present(viewController, animated: true)
17
}
18
}
19
20
extension ExampleViewController: AuthenteqIdentificationDelegate {
21
22
func authenteqDidFinishIdentification(with result: IdentificationResult) {
23
// Handle result
24
presentedViewController?.dismiss(animated: true)
25
}
26
27
func authenteqDidFailIdentification(with error: AuthenteqFlowError) {
28
// Handle error
29
presentedViewController?.dismiss(animated: true)
30
}
31
}
32
33
Copied!
1
@import AuthenteqFlow;
2
3
@interface ExampleViewController: UIViewController <AuthenteqIdentificationDelegate>
4
@end
5
6
@implementation ExampleViewController
7
8
- (void)identification {
9
IdentificationParams *params = [[IdentificationParams alloc]
10
initWithClientId:@"<YOUR CLIENT ID>"
11
clientSecret:@"<YOUR CLIENT SECRET>"
12
flowId:@"<flow ID>"];
13
14
UIViewController *viewController = [[AuthenteqFlow instance]
15
identificationViewControllerWith:params
16
delegate:self];
17
18
viewController.modalPresentationStyle = UIModalPresentationFullScreen;
19
[self presentViewController:viewController animated:true completion:nil];
20
}
21
22
#pragma MARK - AuthenteqIdentificationDelegate
23
24
- (void)authenteqDidFinishIdentificationWith:(IdentificationResult *)result {
25
// Handle result
26
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
27
}
28
29
- (void)authenteqDidFailIdentificationWith:(enum AuthenteqFlowError)error {
30
// Handle error
31
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
32
}
33
34
@end
Copied!

Start an Identification providing authentication Token

Identification can be started by providing the authentication token obtained separately (see section Authentication Token for details).
Compare to the previous example, just replace clientSecret parameter with Token as described in the following example:
Swift
Objective-C
1
import AuthenteqFlow
2
3
class ExampleViewController: UIViewController {
4
5
func identification() {
6
let identificationParams = IdentificationParams(
7
clientId: "<YOUR CLIENT ID>",
8
token: "<AUTHENTICATION TOKEN>"
9
)
10
let viewController = AuthenteqFlow.instance.identificationViewController(
11
with: identificationParams,
12
delegate: self
13
)
14
viewController.modalPresentationStyle = .fullScreen
15
present(viewController, animated: true)
16
}
17
}
18
19
extension ExampleViewController: AuthenteqIdentificationDelegate {
20
21
func authenteqDidFinishIdentification(with result: IdentificationResult) {
22
// Handle result
23
presentedViewController?.dismiss(animated: true)
24
}
25
26
func authenteqDidFailIdentification(with error: AuthenteqFlowError) {
27
// Handle error
28
presentedViewController?.dismiss(animated: true)
29
}
30
}
31
32
Copied!
1
@import AuthenteqFlow;
2
3
@interface ExampleViewController: UIViewController <AuthenteqIdentificationDelegate>
4
@end
5
6
@implementation ExampleViewController
7
8
- (void)identification {
9
UIViewController *viewController =
10
[[AuthenteqFlow instance]
11
identificationViewControllerWith:@"<YOUR CLIENT ID>"
12
token: @"<AUTHENTICATION TOKEN>"
13
delegate:self];
14
[self presentViewController:viewController animated:true completion:nil];
15
}
16
17
#pragma MARK - AuthenteqIdentificationDelegate
18
19
- (void)authenteqDidFinishIdentificationWith:(IdentificationResult *)result {
20
// Handle result
21
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
22
}
23
24
- (void)authenteqDidFailIdentificationWith:(enum AuthenteqFlowError)error {
25
// Handle error
26
[self.presentedViewController dismissViewControllerAnimated:true completion:nil];
27
}
28
29
@end
Copied!