socket.io handshake auth is undefined and not showing auth in handshake #5264
Unanswered
raghu-gade
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Hi! That's weird indeed. Does it happen on all browsers? Could you please check the packets in your network console? You should see something like: Here, the const socket = io({
transports: ["websocket"],
auth: {
hello: "world"
}
}); In your case, is it simply |
Beta Was this translation helpful? Give feedback.
2 replies
-
I think it is cors error try adding cors in the server side |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m using a Socket.IO server and client application. Below is my client-side code:
The Socket.IO server is deployed in an AKS cluster. Here’s the server-side code:
Issue
When running the application locally (localhost:8083), the auth variable in the handshake data is populated correctly, as shown in the logs:
However, when accessing the server through the AKS-deployed URL (https://my-server-app.cloudapp.azure.com), the auth field in the handshake data is missing:
Socket.IO Server:
"socket.io": "^4.7.5"
andSocket.IO Client:
"socket.io-client": "^4.7.5"
.The auth object is passed correctly when testing locally.
It’s not appearing when accessed through the AKS-deployed URL.
Expected Outcome
The auth object should be included in the handshake data for both local and deployed environments.
How can I ensure the auth data is transmitted and logged correctly in the AKS environment?
Beta Was this translation helpful? Give feedback.
All reactions