I need to implement a socket.io client in Angular and I found ngx-socket-io. It seems to work fine, but I didn't find an option to send credentials when starting the connection, as described on the official page, using auth > token. (https://socket.io/docs/v4/middlewares/#Sending-credentials)
I already have the server implemented and working in this format, getting the data from socket.handshake.auth.token
.
How do I send this token through ngx-socket-io?
Are there any other socket.io libraries that I can use in angular?
I found a workaround, inserting empty options in the constructor and adding authentication right after. It's not ideal, but it seems to work normally. I'm sharing it here in case anyone else needs it.