Im trying to avoid using express sessions and do user authentication with socket.io only (mean setting up and checking httponly cookies), but this code do not work:
io.on('connection', function (socket) {
socket.on('signin', function (data) {
socket.request.headers.cookie = 'COOKIE=testcookie'; // do not work
});
});
io.of('/logged').use(function (socket, next) {
socket.request.headers.cookie; // Empty
});