From cfef2879b51781914e36c949ff8899222e2a53bf Mon Sep 17 00:00:00 2001 From: Edgar Story Date: Tue, 12 Nov 2024 09:12:21 +0000 Subject: [PATCH] Add function to check if fido2 device needs a PIN --- Xcodes/Backend/AppState.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Xcodes/Backend/AppState.swift b/Xcodes/Backend/AppState.swift index 1d66305..a99b6e7 100644 --- a/Xcodes/Backend/AppState.swift +++ b/Xcodes/Backend/AppState.swift @@ -409,6 +409,15 @@ class AppState: ObservableObject { } } } + + func fido2DeviceNeedsPin() -> Bool { + do { + return try fido2.deviceHasPin() + } catch { + authError = error + return true + } + } func cancelSecurityKeyAssertationRequest() { self.fido2.cancel()