♻️(all) stop relying on cookies for the lobby flow

The lobby system relied on cookies to identify the participant
across the wait/enter cycle, which does not work in an iframe
context where our cookies are dropped.

Simplify the lobby behavior:

* The POST request that enters the lobby now returns the
  participant id in the response.
* The frontend passes that id back on subsequent requests to keep a
  sticky session while trying to enter the room.

This moves a bit more logic to the frontend but should be a
transparent refactoring, without decreasing the security of the
lobby flow.
This commit is contained in:
lebaudantoine
2026-08-03 14:20:56 +02:00
parent ab9bdeef94
commit 702680e919
11 changed files with 398 additions and 345 deletions
+2 -5
View File
@@ -616,13 +616,10 @@ class RoomViewSet(
participant, livekit = lobby_service.request_entry(
room=room,
request=request,
user=request.user,
**serializer.validated_data,
)
response = drf_response.Response({**participant.to_dict(), "livekit": livekit})
lobby_service.prepare_response(response, participant.id)
return response
return drf_response.Response({**participant.to_dict(), "livekit": livekit})
@decorators.action(
detail=True,