enroll

suspend fun enroll(name: String? = null, identifierHint: String? = null, policy: BiometricCredentialPolicy = BiometricCredentialPolicy.BIOMETRY_CURRENT_SET, promptTitle: String? = null, promptSubtitle: String? = null): ClerkResult<BiometricCredential, ClerkErrorResponse>

Enrolls the current app installation as a biometric credential.

This requires an active or pending Clerk session. The generated private key stays on the device.

Return

A ClerkResult containing the enrolled BiometricCredential on success, or a ClerkErrorResponse on failure.

Parameters

name

A human-readable name stored with the biometric credential.

identifierHint

A local-only user identifier hint for selecting this credential later.

policy

The local authentication policy used to protect the generated private key. Defaults to requiring a strong biometric from the currently enrolled set, without device credential fallback. Adding a new biometric invalidates the key. Other policies can be used for sign-in, but cannot be used for session reverification.

promptTitle

The title shown in the system biometric prompt.

promptSubtitle

The subtitle shown in the system biometric prompt.