From 4d972f2eada8c3c281000afef45a839a03e9daa7 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 21 Jun 2025 05:06:05 +0200 Subject: [PATCH] handle login failure when revalidating authz --- static/webui/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/webui/script.js b/static/webui/script.js index 5f693041..74d399b5 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -61,7 +61,11 @@ function openWebSocket() { if ("auth_fail" in msg) { auth_pending = false; logout(); - alert(loc(msg.auth_fail.isRegister ? "code_regFail" : "code_loginFail")); + if (single.getCurrentPath() == "/webui/") { + alert(loc(msg.auth_fail.isRegister ? "code_regFail" : "code_loginFail")); + } else { + single.loadRoute("/webui/"); + } } if ("logged_out" in msg) { sendAuth();