Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

match on the new messag

Thiago Araujo da Silva2f54868a6bdc
diff --git a/frontend/src/config/request.ts b/frontend/src/config/request.ts
index 5c59cd7f3a..a3ba41bdb3 100644
--- a/frontend/src/config/request.ts
+++ b/frontend/src/config/request.ts
@@ -51,7 +51,10 @@ const resetRedirectingFlag = () => {
let refreshPromise: Promise<string> | null = null;
-const isTokenExpiredError = (message: string) => message.toLowerCase().includes("token expired");
+const isTokenExpiredError = (message: string) => {
+ const lower = message.toLowerCase();
+ return lower.includes("token expired") || lower.includes("session is no longer valid");
+};
apiRequest.interceptors.response.use(
(response) => response,