mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
2fa for unattended access
This commit is contained in:
@@ -92,6 +92,8 @@ pub const LOGIN_MSG_DESKTOP_SESSION_NOT_READY_PASSWORD_WRONG: &str =
|
||||
"Desktop session not ready, password wrong";
|
||||
pub const LOGIN_MSG_PASSWORD_EMPTY: &str = "Empty Password";
|
||||
pub const LOGIN_MSG_PASSWORD_WRONG: &str = "Wrong Password";
|
||||
pub const LOGIN_MSG_2FA_WRONG: &str = "Wrong 2FA Code";
|
||||
pub const REQUIRE_2FA: &'static str = "2FA Required";
|
||||
pub const LOGIN_MSG_NO_PASSWORD_ACCESS: &str = "No Password Access";
|
||||
pub const LOGIN_MSG_OFFLINE: &str = "Offline";
|
||||
pub const LOGIN_SCREEN_WAYLAND: &str = "Wayland login screen is not supported";
|
||||
@@ -2561,6 +2563,10 @@ pub fn handle_login_error(
|
||||
lc.write().unwrap().password = Default::default();
|
||||
interface.msgbox("re-input-password", err, "Do you want to enter again?", "");
|
||||
true
|
||||
} else if err == LOGIN_MSG_2FA_WRONG || err == REQUIRE_2FA {
|
||||
lc.write().unwrap().password = Default::default();
|
||||
interface.msgbox("input-2fa", err, "", "");
|
||||
true
|
||||
} else if LOGIN_ERROR_MAP.contains_key(err) {
|
||||
if let Some(msgbox_info) = LOGIN_ERROR_MAP.get(err) {
|
||||
interface.msgbox(
|
||||
|
||||
Reference in New Issue
Block a user