You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working in a project where we use passport for authentication. To bridge the authentication to socket.io/engine.io instead we use passport.socketio package. This works great in the browser as the available cookies are sent in the initial socket.io/engine.io handshake that is done via HTTP.
When we try write tests with mocha for the socket API how ever by first logging in via passport HTTP call with the module request we cannot find a way to pass the received session cookie along with the socket.io-client (that uses engine.io-client) initial connection. Hence we cannot find a way to write these tests in mocha.
Is there a way to set additional headers to be sent in the handshake or to share a cookie jar between the request and socket connection?
I'm working in a project where we use passport for authentication. To bridge the authentication to socket.io/engine.io instead we use passport.socketio package. This works great in the browser as the available cookies are sent in the initial socket.io/engine.io handshake that is done via HTTP.
When we try write tests with mocha for the socket API how ever by first logging in via passport HTTP call with the module request we cannot find a way to pass the received session cookie along with the socket.io-client (that uses engine.io-client) initial connection. Hence we cannot find a way to write these tests in mocha.
Is there a way to set additional headers to be sent in the handshake or to share a cookie jar between the request and socket connection?
(there is an outdated "hack" solution but it is not working any more jfromaniello/passport.socketio#72)
The text was updated successfully, but these errors were encountered: