feat(webui): handle auth via websocket #2226

Merged
Sainan merged 4 commits from webui-auth-redux into main 2025-06-21 07:26:44 -07:00
Showing only changes of commit 4d972f2ead - Show all commits

View File

@ -61,7 +61,11 @@ function openWebSocket() {
if ("auth_fail" in msg) { if ("auth_fail" in msg) {
auth_pending = false; auth_pending = false;
logout(); logout();
if (single.getCurrentPath() == "/webui/") {
alert(loc(msg.auth_fail.isRegister ? "code_regFail" : "code_loginFail")); alert(loc(msg.auth_fail.isRegister ? "code_regFail" : "code_loginFail"));
} else {
single.loadRoute("/webui/");
}
} }
if ("logged_out" in msg) { if ("logged_out" in msg) {
sendAuth(); sendAuth();