verify_login, but not eable yet

This commit is contained in:
rustdesk
2025-02-14 16:39:09 +08:00
parent 263bbfc66f
commit 8f545491a2
3 changed files with 35 additions and 1 deletions

View File

@@ -1358,7 +1358,8 @@ function logout() {
}
function refreshCurrentUser() {
if (!handler.get_local_option("access_token")) return;
var token = handler.get_local_option("access_token");
if (!token) { return; }
abLoading = true;
abError = "";
app.update();
@@ -1370,6 +1371,10 @@ function refreshCurrentUser() {
handleAbError(data.error);
return;
}
if (!handler.verify_login(data.verifier, token)) {
handleAbError("Please update your self-hosting server Pro to latest version");
return;
}
set_local_user_info(data);
myIdMenu.update();
getAb();