Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
docs([issue-4901]): finish auth gate path updates
Adam Eivy5181408b71aa
diff --git a/client/src/services/apiCore.js b/client/src/services/apiCore.jsindex 4e53f2098c..9ef835b9ef 100644--- a/client/src/services/apiCore.js+++ b/client/src/services/apiCore.js@@ -7,7 +7,7 @@ export const API_BASE = '/api'; // exported for sub-modules that use fetch() dir// only need the id don't drag this module's React import along with it.export { PORTOS_APP_ID } from '../lib/appIdentity.js';-// Bounce to /login when the auth gate (server: lib/authGate.js) rejects a+// Bounce to /login when the auth gate (server: services/authGate.js) rejects a// request with 401 + AUTH_REQUIRED. Shared by request() AND the streaming-fetch// helpers (apiLocalLlm.streamLocalLlmTest, etc.) that bypass request() to read a// stream body but must still honor session expiry — otherwise a session that@@ -47,7 +47,7 @@ export async function request(endpoint, options = {}) {if (!response.ok) {const error = await response.json().catch(() => ({ error: 'Request failed' }));const errorMessage = error.error || `HTTP ${response.status}`;- // Auth gate (server: lib/authGate.js) returns 401 with code AUTH_REQUIRED+ // Auth gate (server: services/authGate.js) returns 401 with code AUTH_REQUIRED// for any /api request without a valid session. Bounce to /login so the// user can re-authenticate; skip if we're already there.maybeRedirectToLogin(response, error);diff --git a/client/src/services/socket.js b/client/src/services/socket.jsindex cee1ede15e..dfc8739106 100644--- a/client/src/services/socket.js+++ b/client/src/services/socket.js@@ -24,7 +24,7 @@ socket.on('disconnect', () => {});socket.on('connect_error', (err) => {- // Auth gate rejected the handshake (server: lib/authGate.js socketAuthGate).+ // Auth gate rejected the handshake (server: services/authGate.js socketAuthGate).// Bounce to /login so the user can sign back in; skip if already there.if (err?.data?.code === 'AUTH_REQUIRED' && typeof window !== 'undefined') {if (!window.location.pathname.startsWith('/login')) {