dnsbty / level10

Phoenix LiveView multiplayer card game
https://level10.games
MIT License
72 stars 2 forks source link

[FEATURE] #93

Open cwarrencoderedsafety opened 2 years ago

cwarrencoderedsafety commented 2 years ago

Not sure if this is a bug, but noticed that if the user is using iOS Safari and a day passes, they are unable to rejoin the game.

Would be nice feature if there was a way to register and join with any device, but I believe the intent is for the user to be able to rejoin using their current username.

dnsbty commented 2 years ago

Nice find! The server currently assigns a randomly generated UUID to each player, and so they need to have the same user ID in place to be able to rejoin the game. Currently, this relies on Phoenix LiveView's form state restoration if the websocket is disconnected, but I think storing the player information in localStorage or a cookie instead would be a better route forward and would probably fix the bug. Would you be interested in contributing a PR for that?