From e7c84885d96869b912ab26b10a99cd46a765c566 Mon Sep 17 00:00:00 2001 From: Robert Helewka Date: Sat, 11 Jul 2026 06:21:55 -0400 Subject: [PATCH] Dashboard authenticates: token prompt + bearer on REST/WS/recordings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The UI never sent the bearer token, so with API_TOKEN set every data call 401'd and /ws/events was rejected pre-accept (the 403s in the uvicorn log). The API client now keeps the token in localStorage, attaches Authorization to every request, prompts once on a 401 and retries, and appends ?token= to the WebSocket connect — the page's reconnect loop picks the token up after the first prompt. require_token also accepts a ?token= query parameter (same convention as the WebSocket) because