buttonmen-dev/buttonmen — pull request #568 by cgolubi1 (2014-02-20 03:17:46+00:00)
Title: loadPlayerName should generate a new session from the user's cookies if possible

* If a session exists, use it to determine the logged in user
* If not, try to determine a valid session based on the auth_userid and auth_key cookies
* Fixes #98
* Jenkins: http://jenkins.buttonweavers.com:8080/job/buttonmen-cgolubi1/148/

Comments:
* This only handles the issue of users being logged out too soon, it doesn't make any effort to make cookies more unique over time or to restrict them to the correct IP or anything, so it does not address #116.
* I tested this in vagrant by deleting the session files on disk and verifying that new session cookies were regenerated. Assuming i'm right about the issue, that's a good test. If i'm wrong about the underlying issue, then i don't know what would be a good test, other than trying it for awhile and seeing if it's possible to stay logged in.