diff --git a/backend/src/auth.js b/backend/src/auth.js index 56243e5..ffed52b 100644 --- a/backend/src/auth.js +++ b/backend/src/auth.js @@ -5,7 +5,9 @@ const APP_SLUG = process.env.APP_SLUG || 'lights' const secret = new TextEncoder().encode(process.env.CENTRAL_AUTH_SECRET || '') export async function requireAuth(request, reply) { - const token = request.cookies?.hnf_session + // hnf_kiosk_session is the shared back-of-house kiosk session minted by central + // auth (portal /kiosk); its token carries only lights' registered kiosk caps. + const token = request.cookies?.hnf_session || request.cookies?.hnf_kiosk_session if (!token) return reply.status(401).send({ error: 'Not authenticated' }) let payload diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3dd9b47..4046b8d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -8,6 +8,7 @@ import Timeline from './pages/Timeline' import Devices from './pages/Devices' import Log from './pages/Log' import Settings from './pages/Settings' +import Kiosk from './pages/Kiosk' import { can } from './types' function Home() { @@ -18,24 +19,36 @@ function Home() { return
You don't have access to any Lighting pages yet.
Loading…
Kiosk session ended — back to the kiosk home
+Loading…
}No lights set up yet.
} + {locations.map(loc => ( ++ {device.schedules_paused ? 'Its schedule is paused.' : 'Pause this light\'s schedule so it stays as you set it.'} +
+ {device.schedules_paused ? ( + + ) : ( +