Enhanced SmartSelfie™ Enrollment And Authentication

Perform an Enhanced SmartSelfie™ Verification

Enhanced SmartSelfie™ provides an advanced liveness tool for capturing your users.

Enhanced SmartSelfie™ Enrollment and Authentication

SmartSelfie™ Authentication is exposed as a flow which performs the following high level steps:

  1. Displays instructions to the user

  2. Requests camera permissions (if not already granted)

  3. Captures and saves Liveness and Selfie images

  4. Submits the job to the Smile ID API

  5. Delivers the result back to the caller

If you are registering a user for the first time, you should use SmileID.SmartSelfieEnrollmentEnhanced

SmileID.SmartSelfieEnrollmentEnhanced(
    userId = "user-id-here"
) { result ->
    when(result) {
        is SmileIDResult.Error -> {
            // There was an error (could be denied camera permissions, network errors, etc)
            Timber.e(result.throwable)
        }
        is SmileIDResult.Success -> {
            val (selfieFile, livenessFiles, apiResponse) = result.data
            // use the response here
        }
    }
}

If you are authenticating a previously registered user, you should use SmileID.SmartSelfieAuthenticationEnhanced

SmileID.SmartSelfieAuthenticationEnhanced(
    userId = "user-id-here"
) { result ->
    when(result) {
        is SmileIDResult.Error -> {
            // There was an error (could be denied camera permissions, network errors, etc)
            Timber.e(result.throwable)
        }
        is SmileIDResult.Success -> {
            val (selfieFile, livenessFiles, apiResponse) = result.data
            // use the response here
        }
    }
}

Arguments

userId

The user ID to associate with the SmartSelfie™ Registration. Most often, this will correspond to a unique User ID within your own system. (If not provided at time of Registration, a random user ID will be generated. This field is required for Authentication)

allowNewEnroll

Allows a partner to enroll the same user id again

showAttribution

Whether to show the Smile ID attribution or not on the Instructions screen

showInstructions

Whether to deactivate capture screen's instructions for SmartSelfie.

extraPartnerParams

Custom values specific to partners passed as an immutable map

colorScheme

typography

onResult (Android)

Callback to be invoked when the SmartSelfie™ Registration is complete. The result itself is a SmileIDResult which can either be a SmileIDResult.Success or SmileIDResult.Error

delegate (iOS)

This is the delegate object that is notifed when there is a result from the SmartSelfie™ flow. This class has to conform to SmartSelfieResultDelegate and implement the delegate methods func didSucceed(selfieImage: Data, livenessImages: [Data], jobStatusResponse: JobStatusReponse) and func didError(error: Error)

Last updated

Was this helpful?