Persistent sid #1146
-
I was looking for a way to have persistent I tried to understand how would this be possible using the server provided by |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
I'm interested in this because I have some data that I fetch during client:
server:
but it raises I can workaround it by dealing with a storage manually, but I'm wondering whether there's something that I'm missing. |
Beta Was this translation helpful? Give feedback.
-
As a comparison, here's the code of the TS server of the engine where it would be easier to overwrite and apply the logic that I mentioned since it accepts the request. |
Beta Was this translation helpful? Give feedback.
-
Though, do I understand correctly from the code that even if a non-in-memory manager such as Redis is used, the user session is still persistend in-memory only? |
Beta Was this translation helpful? Give feedback.
-
Persistent SIDs are not possible. This is true for the JS and the Python versions of the server. The tutorial you are reading implements a persistent session and user IDs as part of the application. This has nothing to do with the socket
Yes, it is possible. Forget about the When a client connects, it should authenticate. In your tutorial, the client authenticates by passing these made-up Session IDs that reference data stored in the application's session store. In a more production-ready case authentication would be done with a token or API Key. Either way, your server-side |
Beta Was this translation helpful? Give feedback.
Persistent SIDs are not possible. This is true for the JS and the Python versions of the server.
The tutorial you are reading implements a persistent session and user IDs as part of the application. This has nothing to do with the socket
sid
value, which is always unique and does not persist.Yes, it is possible. Forget about the
sid
value and the user session feature provided by this package, and manage your own sessions, like your tutorial does. I think you are misunderstanding how this tutorial does this…