Shared LiveKit Token API
Multi-app voice tokens. POST /api/livekit-token with JSON:
{
"appId": "chaka",
"roomCode": "1234",
"name": "PlayerName"
}Requires header Authorization: Bearer <Firebase ID token> for that app's Firebase project. Server verifies the user is in that app's RTDB path (default rooms/{roomCode}/players).
LiveKit room is namespaced as {appId}_{roomCode} so games cannot collide. Returns { url, token, appId, roomName, roomCode, identity }.
Register apps via VOICE_APPS and {APP}_FIREBASE_* env vars (see .env.example).