enroll
suspend fun enroll(name: String? = null, identifierHint: String? = null, policy: BiometricCredentialPolicy = BiometricCredentialPolicy.BIOMETRY_OR_DEVICE_PASSCODE, 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 biometric availability while allowing device credential fallback during authentication.
promptTitle
The title shown in the system biometric prompt.
promptSubtitle
The subtitle shown in the system biometric prompt.