fix: BFF sends on_behalf_of in WS auth
All checks were successful
Deploy Web Client / deploy (push) Successful in 38s
All checks were successful
Deploy Web Client / deploy (push) Successful in 38s
This commit is contained in:
parent
307027faae
commit
4abca2a793
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user