Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 424 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 424 Bytes

tid-rs

TouchId integration for Rust

Usage

async fn touch_id() {
    let mut ctx = LAContext::new();
    if ctx.can_evaluate_policy(LAPolicy::DeviceOwnerAuthenticationWithBiometrics) {
        ctx.set_localized_cancel_title("Use Another Method");
        ctx.evaluate_policy(
            LAPolicy::DeviceOwnerAuthenticationWithBiometrics,
            "Use TouchId to Unlock Rust",
        ).await;
    }
}