Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

Commit eebfdbc

Browse files
committed
bypass automatic session timeout (re: #5439) when proxy auth with custom logout is used
1 parent d3a9f34 commit eebfdbc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎frontend/src/utils/auth.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useAuthStore } from "@/stores/auth";
22
import router from "@/router";
33
import type { JwtPayload } from "jwt-decode";
44
import { jwtDecode } from "jwt-decode";
5-
import { baseURL, noAuth, logoutPage } from "./constants";
5+
import { authMethod, baseURL, noAuth, logoutPage } from "./constants";
66
import { StatusError } from "@/api/utils";
77
import { setSafeTimeout } from "@/api/utils";
88

@@ -18,6 +18,12 @@ export function parseToken(token: string) {
1818
authStore.jwt = token;
1919
authStore.setUser(data.user);
2020

21+
// proxy auth with custom logout subject to unknown external timeout
22+
if (logoutPage !== "/login" && authMethod === "proxy") {
23+
console.warn("idle timeout disabled with proxy auth and custom logout");
24+
return;
25+
}
26+
2127
if (authStore.logoutTimer) {
2228
clearTimeout(authStore.logoutTimer);
2329
}

0 commit comments

Comments
 (0)