cards_against_humanity
cards_against_humanity copied to clipboard
Handle reconnects
Someone who hit back on their browser, and reconnected, was added as a separate player.
If someone was kicked, they shouldn't be able to rejoin though.
Unfortunately that might be hard to reproduce?
Closest scenario I can think of is the player went to join a game, had to "sign up" first, then the sign up was successful and redirected to the game. Then, the player hit back, getting back to the "sign up" form, and submitted that form again which created another player and redirected to the same game (the game URL is stored in a cookie while the user is signing up, to redirect when the sign up is successful).
But if that's the case, there's a bug where someone who is logged in can access the "sign up" page, which I don't believe is possible. Could you try to reproduce these steps?