a5581569681eb2ab93fe3c8048d75b0eb9636c70
Auth is Supabase end to end and always was: the backend verifies access tokens asymmetrically against the project's published JWKS and holds no signing key of its own, and `requireUser` wants that token in `Authorization: Bearer`. Nothing about that needed changing. What was wrong is only here. The two REST calls forwarded `useRequestHeaders(["cookie"])`, which is what you do when a Nuxt server is proxying a browser's request - and this app sets `ssr: false` so the same static bundle can serve the browser and the Tauri shell. There is no server to forward anything, so the header arrived empty and every call should have been getting a flat 401. The token was to hand the whole time. `stores/telemetry.ts` has been reading `session.access_token` for its socket since it was written; the REST side simply never did. `useApiFetch` is now the one way this app calls the backend, and it reads the token inside the fetcher rather than capturing it at setup, because supabase-js refreshes the session in the background about once an hour - a captured token would work until it quietly stopped. With no session it omits the header entirely rather than sending an empty Bearer, which the backend rejects with a message about the header's shape and reads like a client bug; getting the user a session is the Supabase module's redirect's job. The socket keeps using a `?token=` query parameter, which is not an inconsistency: a browser WebSocket cannot set request headers. `nuxt typecheck` clean.
continuum-app
Operator console for the Continuum print farm platform. A single Nuxt 3 SPA
(apps/web) shared between the browser and a Tauri 2 desktop shell
(apps/desktop), plus a shared component library (packages/ui).
Layout
apps/
web/ Nuxt 3 SPA (ssr: false) - Supabase auth, Pinia telemetry store
desktop/ Tauri 2 shell wrapping apps/web's static build
packages/
ui/ Shared Vue components: PrinterCard, TemperatureGraph, WebRTCStreamView
Getting started
pnpm install
cp .env.example apps/web/.env
pnpm dev:web # browser dev server on :3000
pnpm dev:desktop # Tauri dev shell (requires Rust toolchain)
apps/web builds as a static SPA so the exact same apps/web/.output/public
bundle is served in the browser and embedded into the Tauri desktop app.
Languages
Vue
76.7%
TypeScript
22.4%
Rust
0.9%