having an issue with sessionkeys

For discussion of the Poker Mavens server module and other administration topics
Post Reply
cshrimpt
Posts: 11
Joined: Sun Feb 02, 2020 1:50 pm

having an issue with sessionkeys

Post by cshrimpt »

Hi,

I'm having an issue with sessionkeys where when a user is disconnected or hits the back button on their browser the user can no longer reconnect to their session. I'm assuming if I were to send the same key when the user tries to reestablish the connection it work work the same as if they used a user/password login.

I was thinking of using cookies to save the session key until the user either logs out or is disconnected for more than two minutes. Once that condition is met, I assume the key expires and a new one would be needed.

Is my thinking correct on this?

Also, how long is the key good for before it expires? In other words, if a key is requested but the user doesn't immediately login, how long is the requested key valid? Is it time based, or based on fetching another key?

Thanks,

Craig
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: having an issue with sessionkeys

Post by Kent Briggs »

Session keys are single-use only. Once generated they are held in memory until that player either logs in, has a new key overwrite it, or the server is taken offline. Otherwise there is no time limit. But the key is consumed immediately on login and cannot be re-used. Any attempt to reload the client with a browser refresh button or F5 key causes a client reload, which causes a new login request, which requires a fresh session key. Note that if the client detects a connection drop, it will automatically try to establish a reconnection on its own. That does not require a new session key.
cshrimpt
Posts: 11
Joined: Sun Feb 02, 2020 1:50 pm

Re: having an issue with sessionkeys

Post by cshrimpt »

What's messing me up is I'm getting the invalid/expired message popup making me think that I've lost the session, but if I click the OK button, I see I'm actually still connected.

Anyway to suppress that message if I'm actually still logged in? It will confuse the user.

Craig
cshrimpt
Posts: 11
Joined: Sun Feb 02, 2020 1:50 pm

Re: having an issue with sessionkeys

Post by cshrimpt »

Never mind the previous reply. I think my issue is I'm not sending the key I think I am. Need to do a little more debugging.

Thanks
Post Reply