Persist room session even if browser is refreshed
-
Whenever the page is refreshed in the client browser, the room session is destroyed.
Is there a way to persist the session even if the browser client is refreshed?
Thanks.
-
Hi @codestitch, to allow the client to reconnect to the room he was previously connected with, you'd need to use
allowReconnection()
: https://docs.colyseus.io/server/room/#allowreconnection-client-seconds
-
Oh, cool!!! Thanks for the quick response @endel .
A million appreciation.
-
Hi @endel , @codestitch , side-note, beside the allowReconnection I though some additional will be required to make it work, like express-session or so? https://www.npmjs.com/package/express-session
Here is the related topic: https://discuss.colyseus.io/topic/139/persistent-sessions/4- I think https://github.com/endel/colyseus-express-session this is what you need @codestitch
-
This post is deleted!