Generate or paste a secret in the UI; agent API prefers DB key over TOKEN_TRAY_SECRET env.
45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
# Media Cluster Token Tray
|
|
|
|
Windows system-tray helper die Viaplay-sessie-tokens vernieuwt en naar de master-api pusht.
|
|
|
|
1. Open **Admin → Instellingen → Admin** → sectie **Token Tray**
|
|
2. Klik **Genereer nieuwe key** en kopieer de key (+ API URL) naar de tray-app
|
|
3. Of zet optioneel `TOKEN_TRAY_SECRET` in `.env` (fallback als er geen DB-key is)
|
|
|
|
Endpoint:
|
|
|
|
- `GET /api/v1/agent/status` — header `X-Tray-Key`
|
|
- `POST /api/v1/agent/viaplay/tokens` — body: `email`, `session`, `accessToken`, optioneel `profileId` / `label` / `persistentLogin`
|
|
|
|
## Lokaal starten
|
|
|
|
PowerShell blokkeert soms `pnpm.ps1`. Gebruik dan **`pnpm.cmd`** (of CMD):
|
|
|
|
```powershell
|
|
cd apps\token-tray
|
|
pnpm.cmd install
|
|
pnpm.cmd run build
|
|
pnpm.cmd run start
|
|
```
|
|
|
|
Of eenmalig voor je user-account:
|
|
|
|
```powershell
|
|
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
|
|
```
|
|
|
|
Daarna werkt gewoon `pnpm install` / `pnpm dev` weer.
|
|
|
|
1. Vul **API URL** + **Tray key** (= `TOKEN_TRAY_SECRET`)
|
|
2. Vul het **zelfde e-mailadres** als het Scripts → Viaplay account
|
|
3. Tray → **Viaplay inloggen / vernieuwen** (CAPTCHA in het venster)
|
|
4. Tray → **Tokens naar server sturen**
|
|
|
|
Configbestand: `%APPDATA%/token-tray/tray-config.json` (Electron `userData`).
|
|
|
|
## MVP-scope
|
|
|
|
- Alleen Viaplay
|
|
- Browserprofiel per account (cookies blijven lokaal)
|
|
- Handmatige push na login + JWT-expiry waarschuwing in tooltip/notificatie
|
|
- Nog geen Odido/F1, nog geen stille background-refresh zonder browser
|