dnsbty / level10

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

Store player ID in a cookie #50

Closed dnsbty closed 3 years ago

dnsbty commented 4 years ago

Rather than store the player ID in the URL, we should store it in a cookie so that you can come back to the game if your battery dies or anything like that and the URL gets corrupted

dnsbty commented 4 years ago

It looks like maybe doing something like this with localStorage could work too, except that it will break if the user is in private mode in Safari: https://thepugautomatic.com/2020/05/persistent-session-data-via-localstorage-in-phoenix-liveview/