Can we Authenticate each event emitted by Socket IO with JWT in node JS?

Viewed 1282

I am working with Socket IO in Node JS. I want to authenticate each event emitted by my client i.e If i have following events :

socket.emit("1"); socket.emit("2"); : : socket.emit("n");

Now I want to authenticate each of them individually when they are emitted by JWT token.

Is it possible with JWT, Sockets IO in Node JS or another way?

0 Answers
Related