Skip to main content

Enrolment

Enrolment captures the user's face and creates their biometric template on your MobbID server. This template is the reference against which every later verification and identification is compared. If the user is already enrolled, the template is updated with the new capture.

Before you begin
  • The SDK is initialised and the face engine is built, with liveness enabled.
  • The user exists on your MobbID server. Create it from your backend with Create a user, unless Mobbeel has configured your application to create users automatically on enrolment.

Start the enrolment​

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

extension ViewController: MIDEnrollmentListener {
func onEnrollmentFinished(result: MIDEnrollmentListenerResult, data: MIDEnrollmentData?, errorOccurred: MIDError?) {
guard result != .error else {
// The enrolment could not be completed: offer the user a retry
return
}
// Enrolment completed: send the operation ID to your backend
}
}
ParameterDescription
.enrollmentRuns an enrolment.
MIDEnrollmentParameters(userId:)Identifier of the user to enrol. Use the same identifier as in your own system.
MIDEnrollmentListenerReceives the outcome, the enrolment data and, if the operation fails, the error.

Handle the result​

  • Completed: the user's template has been created or updated. Send the operation identifier to your backend and record the enrolment once it has been confirmed.
  • Error: errorOccurred describes the cause. Offer the user a new attempt and, if the error persists, an alternative channel.

Recommendations​

  • Enrol under good conditions. Even lighting and a frontal, uncovered face produce a better template and fewer rejections later on.
  • Bind the enrolment to a verified identity. In digital onboarding, enrol the user immediately after verifying their identity document, for example with MobbScan.
  • Keep liveness enabled, so that nobody can enrol a photo or a video of another person.

Next step​

Authenticate the user against their enrolment with Verification.