What is the best practice for handling sessions and timeout on a C ++ server with MySQL.
My C ++ server generates a session GUID and sends it to the Client-Browser as a Set-Cookie.
Should I ever stand a session?
Should I keep the session GUID in my MySQL user table?
When the user does something, should I update the timestamp in the table or do I need to save the sessions and the last action directly on the C ++ server?
How should I handle the "Stay logged in" session session GUID never expires? (It could be a big security gap)
source share