Skip to content

Commit cfef287

Browse files
Add function to check if fido2 device needs a PIN
1 parent 36424a7 commit cfef287

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Xcodes/Backend/AppState.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,15 @@ class AppState: ObservableObject {
409409
}
410410
}
411411
}
412+
413+
func fido2DeviceNeedsPin() -> Bool {
414+
do {
415+
return try fido2.deviceHasPin()
416+
} catch {
417+
authError = error
418+
return true
419+
}
420+
}
412421

413422
func cancelSecurityKeyAssertationRequest() {
414423
self.fido2.cancel()

0 commit comments

Comments
 (0)