mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Fix: Biometric Revision V1
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user