mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-21 12:11:06 +03:00
trust this device to skip 2fa (#9012)
* trust this device to skip 2fa Signed-off-by: 21pages <sunboeasy@gmail.com> * Update connection.rs --------- Signed-off-by: 21pages <sunboeasy@gmail.com> Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
@@ -268,7 +268,7 @@ function msgbox(type, title, content, link="", callback=null, height=180, width=
|
||||
view.close();
|
||||
return;
|
||||
}
|
||||
handler.send2fa(res.code);
|
||||
handler.send2fa(res.code, res.trust_this_device || false);
|
||||
msgbox("connecting", "Connecting...", "Logging in...");
|
||||
};
|
||||
} else if (type == "session-login" || type == "session-re-login") {
|
||||
|
||||
@@ -66,9 +66,11 @@ class MsgboxComponent: Reactor.Component {
|
||||
}
|
||||
|
||||
function get2faContent() {
|
||||
var enable_trusted_devices = handler.get_enable_trusted_devices();
|
||||
return <div .form>
|
||||
<div>{translate('enter-2fa-title')}</div>
|
||||
<div .code><input name='code' type='text' .outline-focus /></div>
|
||||
{enable_trusted_devices ? <div><button|checkbox(trust_this_device) {ts}>{translate('Trust this device')}</button></div> : ""}
|
||||
</div>;
|
||||
}
|
||||
|
||||
|
||||
@@ -433,7 +433,8 @@ impl sciter::EventHandler for SciterSession {
|
||||
fn is_port_forward();
|
||||
fn is_rdp();
|
||||
fn login(String, String, String, bool);
|
||||
fn send2fa(String);
|
||||
fn send2fa(String, bool);
|
||||
fn get_enable_trusted_devices();
|
||||
fn new_rdp();
|
||||
fn send_mouse(i32, i32, i32, bool, bool, bool, bool);
|
||||
fn enter(String);
|
||||
|
||||
Reference in New Issue
Block a user