From 4abca2a7936603c641f84a44519f4fb3a199cf53 Mon Sep 17 00:00:00 2001 From: Markov Date: Mon, 23 Feb 2026 19:00:25 +0100 Subject: [PATCH] fix: BFF sends on_behalf_of in WS auth --- bff/ws_proxy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bff/ws_proxy.py b/bff/ws_proxy.py index a245f79..c71188d 100644 --- a/bff/ws_proxy.py +++ b/bff/ws_proxy.py @@ -3,6 +3,7 @@ import asyncio import json import logging +import secrets from fastapi import APIRouter, WebSocket, WebSocketDisconnect import websockets @@ -32,10 +33,11 @@ async def ws_proxy(ws: WebSocket, token: str = ""): try: async with websockets.connect(TRACKER_WS_URL) as tracker_ws: - # Send auth to tracker on behalf of user + # Auth to tracker with on_behalf_of so Tracker uses user's slug auth_msg = json.dumps({ "type": "auth", "token": TRACKER_TOKEN, + "on_behalf_of": user_slug, }) await tracker_ws.send(auth_msg)