mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-17 05:25:53 +00:00
sciter 2fa setting (#6951)
not add qr code text line as it's not selectable, and selectable input will steal the focus. Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -1301,3 +1301,20 @@ pub fn support_remove_wallpaper() -> bool {
|
||||
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
|
||||
return false;
|
||||
}
|
||||
|
||||
pub fn has_valid_2fa() -> bool {
|
||||
let raw = get_option("2fa");
|
||||
crate::auth_2fa::get_2fa(Some(raw)).is_some()
|
||||
}
|
||||
|
||||
pub fn generate2fa() -> String {
|
||||
crate::auth_2fa::generate2fa()
|
||||
}
|
||||
|
||||
pub fn verify2fa(code: String) -> bool {
|
||||
let res = crate::auth_2fa::verify2fa(code);
|
||||
if res {
|
||||
refresh_options();
|
||||
}
|
||||
res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user