authenticate

actual suspend fun authenticate(title: String, subtitle: String, cancelLabel: String): BiometricResult(source)

Shows the system biometric prompt and suspends until the user resolves it.

Cancelling the calling coroutine dismisses the prompt.

Parameters

title

headline of the prompt. Android shows it verbatim; iOS has no title slot and falls back to it as the reason when subtitle is blank.

subtitle

the "why are you asking" line. On iOS this is localizedReason, which the system alert always shows — pass something meaningful.

cancelLabel

text of the escape hatch (Android's negative button, iOS's cancel title).

expect suspend fun authenticate(title: String, subtitle: String = "", cancelLabel: String = "Cancel"): BiometricResult(source)

Shows the system biometric prompt and suspends until the user resolves it.

Cancelling the calling coroutine dismisses the prompt.

Parameters

title

headline of the prompt. Android shows it verbatim; iOS has no title slot and falls back to it as the reason when subtitle is blank.

subtitle

the "why are you asking" line. On iOS this is localizedReason, which the system alert always shows — pass something meaningful.

cancelLabel

text of the escape hatch (Android's negative button, iOS's cancel title).

actual suspend fun authenticate(title: String, subtitle: String, cancelLabel: String): BiometricResult(source)

Shows the system biometric prompt and suspends until the user resolves it.

Cancelling the calling coroutine dismisses the prompt.

Parameters

title

headline of the prompt. Android shows it verbatim; iOS has no title slot and falls back to it as the reason when subtitle is blank.

subtitle

the "why are you asking" line. On iOS this is localizedReason, which the system alert always shows — pass something meaningful.

cancelLabel

text of the escape hatch (Android's negative button, iOS's cancel title).