From a43bf63aab9e984320ac883747b94e39974bd1b4 Mon Sep 17 00:00:00 2001 From: Edgar Story Date: Tue, 12 Nov 2024 09:12:44 +0000 Subject: [PATCH] Add function to check if a FIDO2 device is even connected --- Xcodes/Backend/AppState.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Xcodes/Backend/AppState.swift b/Xcodes/Backend/AppState.swift index a99b6e7..6ea6bc5 100644 --- a/Xcodes/Backend/AppState.swift +++ b/Xcodes/Backend/AppState.swift @@ -410,6 +410,10 @@ class AppState: ObservableObject { } } + func fido2DeviceIsPresent() -> Bool { + fido2.hasDeviceAttached() + } + func fido2DeviceNeedsPin() -> Bool { do { return try fido2.deviceHasPin()