Socket.io authentication in socketjwt packag (nodejs, express, react, mongo)

Hi I having some problem to get the “secret” for socketiojwt package.
https://github.com/auth0-community/socketio-jwt

basically, I pass the “secret” (which I thought is the client-secret in Machine-to-Machine app) in this code

io.use(socketioJwt.authorize({
secret: new Buffer(AUTH0_CLIENT_SECRET, ‘base64’),
handshake: true
}))

and my client (react) to test the connection is this:

 const socket = socketIOClient(endpoint)
 socket.connect(endpoint,  {
        'query': 'token=' + token
  })

But it seems that the client is unable to connect to the socket.

Is my secret I passed is correct?

Hey there @nguyenngocanh590!

I don’t have that much javascript experience myself but I added a few tags to your question for better searchability. Also this repo is community maintained so it could be also helpful raising an issue there so that potential community developers looking at this repo can help.