Skip to content
Discussion options

You must be logged in to vote

Hi!

The auth option is sent during the handshake, in a CONNECT packet:

  • with HTTP long-polling, the credentials are indeed sent in the request body of a POST request
  • with WebSocket, the credentials are sent in a WebSocket frame

Format: <Engine.IO MESSAGE packet type><Socket.IO CONNECT packet type><JSON.stringified auth>
Example: 40{"token":"abc"}

Reference: https://github.com/socketio/socket.io-protocol

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ghost
Comment options

@darrachequesne
Comment options

@ghost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant