[GH-ISSUE #4376] [feature]: Add auth and config support for socketIO #1598

Open
opened 2026-03-16 21:00:55 +03:00 by kerem · 4 comments
Owner

Originally created by @tnp03 on GitHub (Sep 24, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4376

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Hoppscotch provides support for socketIO testing, however it does not support way to pass auth token parameter.

Why should this be worked on?

As an open source project hoppscotch should support wide range of options for testing. It will be great user experience which is lacks in other alternative
image

Originally created by @tnp03 on GitHub (Sep 24, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4376 ### Is there an existing issue for this? - [ ] I have searched the existing issues ### Summary Hoppscotch provides support for socketIO testing, however it does not support way to pass auth token parameter. ### Why should this be worked on? As an open source project hoppscotch should support wide range of options for testing. It will be great user experience which is lacks in other alternative ![image](https://github.com/user-attachments/assets/a18a3933-5ef8-492c-bb6e-fca5126ec8ff)
Author
Owner

@Dishantydv7 commented on GitHub (Oct 5, 2024):

Hey @tnp03 , can u explain in detail about the issue

<!-- gh-comment-id:2395152439 --> @Dishantydv7 commented on GitHub (Oct 5, 2024): Hey @tnp03 , can u explain in detail about the issue
Author
Owner

@tnp03 commented on GitHub (Oct 6, 2024):


const socket = io({
  auth: {
    token: "abcd"
  }
});

// or with a function
const socket = io({
  auth: (cb) => {
    cb({ token: localStorage.token })
  }
})```

Please refer above code. How can I pass socket io v4 token with its auth field ? 
<!-- gh-comment-id:2395274291 --> @tnp03 commented on GitHub (Oct 6, 2024): ```js import { io } from "socket.io-client"; const socket = io({ auth: { token: "abcd" } }); // or with a function const socket = io({ auth: (cb) => { cb({ token: localStorage.token }) } })``` Please refer above code. How can I pass socket io v4 token with its auth field ?
Author
Owner

@tnp03 commented on GitHub (Oct 11, 2024):

Any update on this issue ?

<!-- gh-comment-id:2407539949 --> @tnp03 commented on GitHub (Oct 11, 2024): Any update on this issue ?
Author
Owner

@Tlepel commented on GitHub (Nov 28, 2024):

I've just recently used this: if you use the Authorization tab, and select Bearer token authorization, the token you paste will be placed in the auth.token field in the handshake. That's what you're looking for if I'm not mistaken.

<!-- gh-comment-id:2505629240 --> @Tlepel commented on GitHub (Nov 28, 2024): I've just recently used this: if you use the `Authorization` tab, and select `Bearer token` authorization, the token you paste will be placed in the `auth.token` field in the handshake. That's what you're looking for if I'm not mistaken.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1598
No description provided.