I am working on a Node.js application where almost all communication takes place via sockets.io.
What I need to do, before processing any request (except the login request), make sure that the user is authenticated.
An obvious way to do this would be to have a catch-all listener that gets called before any method executes.
I can not find anything like this in Socket.io. How can i achieve Is there a better approach than the one I take?
source share