Enrollment is the process of registering a new user by connecting their facial biometrics to a Keyless account. During this process, a full and unobstructed view of the user's face is required.
let configuration = Keyless.EnrollmentConfiguration.builder.build()Keyless.enroll( enrollmentConfiguration: configuration, onCompletion: { result inswitch result {case .success(let enrollmentSuccess): print("Enrollment finished successfully. UserID: \(enrollmentSuccess.keylessId)")case .failure(let error): print("Enrollment finished with error: \(error.message) } })
final configuration =EnrollmentConfiguration();try {final result =awaitKeyless.enroll(configuration);print("Enrollment finished successfully. UserID: ${result.keylessId}");} catch (error) {print("Enrollment finished with error: $error");}
Enrollment configuration
You can configure the enrollment process with optional parameters in your BiomEnrollConfig() instance or using the builder pattern methods from the EnrollmentConfiguration builder.
Backup data is no longer recommended to perform account recovery use the temporary state. Follow the guide on account recovery.
Keyless can generate backup data that you can use to recover an account.
To create the backup data use the shouldRetrieveBackup method. Once the enrollment succeeds, copy the backup data from the EnrollmentSuccess result, and store it securely.
To recover an account, use the backup parameter more in backup.
Camera Delay
Use cameraDelaySeconds to specify the delay (in seconds) between when the camera preview appears, and when the liveness processing starts.
Custom secret
During enrollment you can specify a custom secret to be saved and encrypted along with the user's biometric data using savingSecret paramter. The custom secret can be anything you can save as an ASCII string, such as a secret that you have provided to the app from the backend, the seed of an OTP protocol, or anything else.
Enrollment Selfie
Using shouldRetrieveEnrollmentSelfie you can retrieve the image that Keyless uses to computes the facial biometrics of the user. The image can be found in the EnrollmentSuccess result as enrollmentSelfie.
You can specify a payload to be added to a JWT signed by Keyless with the jwtSigningInfo parameter, more in JWT signing.
Liveness Settings
Using livenessConfiguration you can configure the liveness security level during enrollment. The possible liveness configuration are under LivenessSettings.LivenessConfiguration :
You can also specify a livenessTimeout (in seconds) to cancel the enrollment if the liveness takes longer than the timeout.
More details on liveness in the dedicated liveness settings section.
Operation info
The parameter operationInfo specifies a customizable unique operation identifier and associated payload stored on the Keyless backend if the enrollment succeeds. Use this to add an extra level of confirmation in your operations.
Details on how to query our backend for stored operations are available on Operations API.
Temporary State
Keyless users can be enrolled via IDV-Bridge, Identity Verification Bridge. As a result of IDV-Bridge enrollment you receive a temporary state useful to register users in your app without undergoing the full enrollment flow.
Use the temporaryState parameter to register users from a temporary state obtained through IDV-Bridge or follow the account recovery guide.