mirror of
https://github.com/djdevin/recflare.git
synced 2026-10-25 23:18:51 -07:00
26270e9c25
* rrs stuff * studio service yay * rrs whitelist * moree studiooooooo fellowwww * rec room studio room loading yay * fixes yay * fix 2 because idk yayuh * Update cdn.app.ts * ccontent length fix? * Preserve content-length and upgrade metadata Return a real zero-filled byte array for CDN HEAD responses so the runtime preserves Content-Length while still sending no payload. In notify, re-create the Request with its original headers, set OWNER_HEADER from the validated token, and forward that Request to hub.fetch to avoid losing WebSocket upgrade metadata (which could trigger 500s in Durable Objects). These changes ensure the editor's size checks and WebSocket upgrades remain reliable. * fix x524234 * shirt thing? * [auth] remove grant table as we already have audit_log for now * rename table to generic device_grant * cleanup/lint --------- Co-authored-by: Devin Zuczek <devin.zuczek@gmail.com>
20 lines
896 B
SQL
20 lines
896 B
SQL
-- Device-login grants (owned by the auth worker). Named generically: Rec Room
|
|
-- Studio is the first device to use it, but any device-code login lands here. Studio
|
|
-- posts POST /connect/deviceauthorization here, then polls /connect/token with
|
|
-- grant_type=urn:ietf:params:oauth:grant-type:device_code. The browser page that
|
|
-- approves the code lives on www (`/device`); this table is only the handshake.
|
|
--
|
|
-- The device_code is a bearer secret until it is consumed, so only its SHA-256
|
|
-- is stored. The user_code is the short code the player sees and types, so it
|
|
-- has to be stored as itself. Kept in sync with STUDIO_DEVICE_SCHEMA_DDL in
|
|
-- src/studio-device.ts.
|
|
|
|
CREATE TABLE IF NOT EXISTS device_grant (
|
|
device_code_hash TEXT PRIMARY KEY,
|
|
user_code TEXT NOT NULL UNIQUE,
|
|
account_id INTEGER,
|
|
status TEXT NOT NULL,
|
|
created_at INTEGER NOT NULL,
|
|
expires_at INTEGER NOT NULL
|
|
);
|