I'm using a third party authentication service along with a guard on my on_connect method to handle user authentication against my socket connection. This is working as I had hoped, but I have noticed a couple things I am unsure how to solve.
The first thing is, what is the suggested work flow for handling expiring or expired tokens? The issue I see currently is that I do not see how to replace the token introduced during the connection event with a new one without disconnecting and reconnecting using the new token.
The other thing is, Why does a user that is prevented from getting a connection through the use of raising a ConnectionRefusedError, still get a session id assigned and no notification of the connection failure? To test this I manually created a client using python-socketio, and did an invalid connection attempt and then printed the value of sid.