shenanigans-be / miltydraft

19 stars 18 forks source link

Recovering access #44

Closed stefkuypers closed 2 weeks ago

stefkuypers commented 3 months ago

I've been using the tool for a while now and I notice that people regularly loose access. Today this happened to me as an admin, thereby completely loosing access to the draft. I'm guessing some cookies are lost or maybe this happens when there is a browser update.

I have a suggestion that might not be too hard to implement: generate a unique code for everyone who claims a name and use that as a recovery tool. It puts the responsibility with the user and they need to store it somewhere but this unique key can be stored on the server and thus be a failsafe recovery tool. I'm pretty sure more elaborate solutions exist but since this is a product developed by TI 4 fans and I am well aware that time to work on this might be limited I think a quick and easy solution is better than no solution at all.

MikeMcFall commented 2 months ago

I ran a draft over the last few days and everyone who was using Firefox on Android lost access. Chrome on Android kept access as did my admin access using Firefox on Windows. I would think that my desktop and mobile Firefox settings would be he same regarding cookies, but something seems to be going wrong.

For now I am asking my friends to use Chrome for drafting.

shenanigans-be commented 1 month ago

I ran into this in my own draft, 2 people using Chrome on Android lost their claim. I assume the problem is that localStorage (the storage we're using gets auto-cleared (sometimes?), it's not entirely clear. Possible fixes might be moving to cookies (but they also get automatically cleared by iOS) or Webstorage..

In the meantime: It would be nice if admins can "unclaim" players and that there's some backup way to regain admin access with some secret-ish token thing.

shenanigans-be commented 2 weeks ago

Thanks to the wonderful work done by @adrianocola . This is now fixed!

(I mean: in a perfect world localStorage wouldn't get randomly cleared willy-nilly, but you can't have everything I suppose..)