Skip to content

Update auth/query without disconnecting and connecting again #4046

Answered by cgarrovillo
cgarrovillo asked this question in Q&A
Discussion options

You must be logged in to vote

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 did socket.connect() once I have a valid JWT.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cgarrovillo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant