As far as I know, on phoenix.js, the params sent to the server on reconnect are the same when we call connect. Is there an option to update the params for reconnect? My usecase is the following:
User visits website as anonymous
Server responds with a temp id which is saved on cookie
For the next visits, the user reads the cookie and sends the value on connect.
The current reconnect approach works fine for all but the first visit. Once the cookie is set we should reconnect with this value, otherwise the server will generate a new ID.
I’m wondering if this isn’t an implementation detail, which should much rather be hidden behind a proper method to change the params on the socket object.
You are right, I’m just posting my findings here, as I stumbled on this topic while debugging. If Socket gets a setParams function, this could be hidden indeed.