Fix: Biometric Revision V1

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