Add shared device inactivity timeout to AuthGate

This commit is contained in:
jtricerolph 2026-07-13 11:53:05 +00:00
parent dde41bc5d1
commit e4152b183b

View file

@ -2,6 +2,13 @@ import { createContext, useContext, useEffect, useState } from 'react'
import type { ReactNode } 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)