Skip to content

How can we pass auth params to authenticate the client? #21

@Areej-Fatima

Description

@Areej-Fatima

I'll have to convert my node js socket client connection code that is trying to establish connection with server and also authenticating the user passing auth params there. My node js client code looks like this. I want the same functionality in golang.

socket = io('localhost:3000', {
          path: 'https://localhost:3000/socket.io',
          auth: {
            username: 'username',
            token: "abcd",
          },
     });

We can pass query params here in this go-socket.io-client implementation, but how can we pass auth to authenticate the user and achieve the same equivalent functionality as above using this library in go? If it isn't there, kindly add this functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions