5 ms·
Ask HN: How to maintain session along with Websockets?
I am using Flask, Gevent and Websocket for python. How can I use flask session inside the Websocket connection? Rather how will I know that this websocket connection was initiated by this user? If i pass a username as token then anyone can access it with other username also ! Any idea about how that can be solved? I am using
* Flask
* Flask-Login
* SQLAlchemy
Any help?
- stephenblum 12y agoHi Sub, you are asking for security question I believe. You need to make sure you pass an unpredictable "session" token.
- mjhea0 12y agohttps://www.youtube.com/watch?v=tqu9y4iqKVI https://www.youtube.com/watch?v=tqu9y4iqKVI