Enrollment
During the enrollment, the user's face is processed and the provided token is securely stored in the Keyless network. In the process a unique user identifier is also generated.
Depending on your application logic, you can choose to use different tokens. This could be a secret that you have provided to the app from the backend, the seed of an OTP protocol, or anything else. If you only need to know just the result of the authentication (success/failed), you can provide any constant value as token.
Android
iOS
1
Keyless.enroll(
2
activity = yourActivity,
3
customToken = "Your custom token",
4
onProgress = { progress ->
5
Log.d("KeylessSDK", "Enrollment progress: " + progress)
6
},
7
onCompletion = { result ->
8
Log.d("KeylessSDK", "Enrollment result: " + result)
9
})
Copied!
1
Keyless.enroll(
2
customToken: "Your custom token",
3
onProgress: { progress in
4
print("Enrollment progress: \(progress)")
5
},
6
onCompletion: { error in
7
if let error = error {
8
print("Enrollment finished with error: \(error.message)")
9
} else {
10
print("Enrollment finished successfully. UserID: \(Keyless.internalId)")
11
}
12
})
Copied!
​
Last modified 1mo ago
Export as PDF
Copy link