doghappy / socket.io-client-csharp

socket.io-client implemention for .NET
MIT License
729 stars 125 forks source link

Socket IO v3 - handshake auth field #266

Closed LeoKuenne closed 2 years ago

LeoKuenne commented 2 years ago

Since Socket IO v3 (SocketIO v3 Docs) there is an "auth" field in the handshake object. Authentication middleware on the server can use that field for authentication.

Is there any option to set that field on the initial request or any plans on implementing it? I did not found any information or documentation on how to set that field.

I'm using the version 3.0.5 of this package.


handshake: {
  headers: {
    // [..] omitted for brevity
  },
  // [...] omitted for brevity
  url: '/socket.io/?EIO=4&transport=websocket',
  query: [Object: null prototype] { EIO: '4', transport: 'websocket' },
  auth: {} // <-- talking about that one
}
doghappy commented 2 years ago

Thanks for your feedback :) https://github.com/doghappy/socket.io-client-csharp/commit/7b349762f6cd5382c26c5e56983e5d31d691b90b

LeoKuenne commented 2 years ago

You are welcome! What a quick response and implementation! :-)) Any plans on when to publish this to NuGet?

doghappy commented 2 years ago

Sorry, I can't decide on a specific release date yet (a lot of changes, I need more time to test it). I'll add a comment if it's released.

doghappy commented 2 years ago

released