lijim / monks-and-mages

Monks and Mages is a TCG-game built on React and socket.io
https://www.monksandmages.com
MIT License
17 stars 0 forks source link

Chore: switch away from socket.id as source of truth #426

Closed lijim closed 1 year ago

lijim commented 1 year ago

Problem:

Solution: The socket.io documentation recommends not using socket.id as the source of truth, as it is ephemeral. They recommend an approach with using socket.auth, as well as some middleware to handle persistent sessions. https://socket.io/get-started/private-messaging-part-2/

The work here is simply to switch the whole app away from socket.id-based helpers - no work yet to make sessions persistent, but this just lays the groundwork for that