enroll

suspend fun enroll(deviceName: String? = null, identifierHint: String? = null, policy: TrustedDevicePolicy = TrustedDevicePolicy.BIOMETRY_OR_DEVICE_PASSCODE, promptTitle: String? = null, promptSubtitle: String? = null): ClerkResult<TrustedDevice, ClerkErrorResponse>

Enrolls the current app installation as a biometric trusted device.

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

Return

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

Parameters

deviceName

A human-readable device name stored with the trusted-device 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.