Connect to socket.io server with token

Hi

I'm trying to connect to a socket.io server with a token

async function connectToSocket(token){
    var socket = require('socket.io-client')(`https://kong.tls.ai/bt/api/socket.io/?token=${token}`)
        socket.on('connect',onConnect)

I have tried to find a node that supports this, but I can't find any that supports authentication.

Has anyone solved this? Or do I have to learn javascript to make it?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.