SquireTournamentServices/SquireCore

[Dev]: Improved WS connection endpoint

TylerBloom opened this issue · 1 comments

Unmet Need:

Because a request to open a websocket uses a non-HTTP different protocol, browsers do not send cookies with the initial request. This is a problem since we can not load a user's session when they establish a connection.

Solution:

The most straightforward solution is to require clients to send their session token as the first message over the connection. From there, we can load the session and forward the connection to the gathering hall (as usual). The client can still expect the first message to be a tournament unless the session lookup fails, in which can we send an error and close the connection.

Closed by dacb5b1