Update auth/query without disconnecting and connecting again #4046
-
I'm trying to update the This seems like an anti-pattern to me. Is there a better way to approach credentials? Such that I can use a server-side socket middleware to verify credentials? (not engine middleware) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I am the anti-pattern. I was starting the connection before I got/generated a JWT. instead, I initialized the socket.io-client instance with the option |
Beta Was this translation helpful? Give feedback.
I am the anti-pattern.
I was starting the connection before I got/generated a JWT. instead, I initialized the socket.io-client instance with the option
autoConnect: false
, and didsocket.connect()
once I have a valid JWT.