From 2bc587900babaf993a71dadd32fef9c7f3c1ab5d Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Mon, 13 Jul 2026 11:53:05 +0000 Subject: [PATCH] Add shared device inactivity timeout to AuthGate --- frontend/src/components/AuthGate.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/components/AuthGate.tsx b/frontend/src/components/AuthGate.tsx index b5483cb..b509d78 100644 --- a/frontend/src/components/AuthGate.tsx +++ b/frontend/src/components/AuthGate.tsx @@ -1,6 +1,13 @@ import { useEffect, useState, createContext, useContext } from 'react' import type { User } from '../types' +const SHARED_TIMEOUT_MS = 10 * 60 * 1000 + +function isSharedDevice() { + return document.cookie.split(';').some(c => c.trim() === 'hnf_shared_device=1') +} + + interface AuthCtx { user: User } const Ctx = createContext(null)