Skip to main content

Verification (1:1)

Verification answers the question "Is this person who they claim to be?". The SDK captures the face with passive liveness and MobbID compares it with the template of a single user (1:1). It is the operation behind biometric login, payment authorisation and transaction signing.

Before you begin

Start the verification​

faceSDK.start(recognitionMode: .verification,
parameters: MIDVerificationParameters(userId: "user-0001"),
operationListener: self)

extension ViewController: MIDVerificationListener {
func onVerificationFinished(result: MIDVerificationListenerResult, data: MIDVerificationData?, errorOccurred: MIDError?) {
guard result != .error else {
// The verification could not be completed: offer the user a retry
return
}
// Show the outcome and send the operation ID to your backend
}
}
ParameterDescription
.verificationRuns a 1:1 verification.
MIDVerificationParameters(userId:)Identity claimed by the user: the identifier of the enrolled user.
MIDVerificationListenerReceives the outcome, the verification data and, if the operation fails, the error.

Handle the result​

  • Verified: the face matches the user's enrolment and the liveness check has been passed. Confirm the result in your backend before granting access.
  • Not verified: the face does not match, or liveness has not been passed. Let the user try again and, after a limited number of attempts, offer an alternative authentication method.
  • Error: errorOccurred describes the cause, such as a network failure or an expired token.

Recommendations​

  • Take the decision in your backend. The outcome received by the app drives the user interface only. See Operation result.
  • Limit the number of attempts per session to discourage brute-force attempts.
  • Request the token right before the verification, so that it is valid for the whole operation.

Next step​

Validate the outcome on your server with Operation result.