Fix: Biometric Revision V1

This commit is contained in:
Youwes09
2026-05-10 03:00:08 -05:00
parent f7c5aebf29
commit f05f781b5b
+16 -6
View File
@@ -47,12 +47,22 @@ mod windows_hello {
}
pub fn authenticate(reason: &str) -> Result<(), String> {
nudge_focus(5, 250);
let result = UserConsentVerifier::RequestVerificationAsync(&HSTRING::from(reason))
.and_then(|op| {
nudge_focus(5, 250);
op.get()
})
let reason = reason.to_owned();
let (tx, rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
nudge_focus(5, 250);
let outcome = UserConsentVerifier::RequestVerificationAsync(&HSTRING::from(reason.as_str()))
.and_then(|op| {
nudge_focus(5, 250);
op.get()
});
let _ = tx.send(outcome);
});
let result = rx
.recv()
.map_err(|e| format!("internalError:{e:?}"))?
.map_err(|e| format!("internalError:{e:?}"))?;
match result {