Add shared device inactivity timeout to AuthGate

This commit is contained in:
jtricerolph 2026-07-13 11:53:05 +00:00
parent 13ab682b23
commit 3641ab0e6d

View file

@ -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<AuthCtx | null>(null)