Session not persisting between Flask and SocketIO #2078
Unanswered
Callmenitin007
asked this question in
Q&A
Replies: 2 comments
-
Please do not write issues on my projects when you have questions about your own application. The issues board is to report bugs. Use the discussion board for questions. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thsi blog article explains the limitations when working with user sessions and Flask-SocketIO, and also provides some ideas on how to work around them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been trying to build a real-time app, but unfortunately, I am not able to work around session management in SocketIO. I will not be pasting my original code; instead, I wrote the code below to help illustrate my issue in fewer lines.
I can set a session key in the /login route and fetch it in the /test route. However, inside SocketIO events, there are no session keys/values. In short, SocketIO seems to be managing its own session keys, but I need both Flask routes and SocketIO to share the same session.
Here is my code:
My client side code
I am on windows machine, so i am not sure if that might be the issue.
Beta Was this translation helpful? Give feedback.
All reactions