I have a cookie-based authentication setup in my web app. For authenticating my socket also, I want to use the same cookie in my backend.
I am unable to send cookies for "websocket" or "polling" even when I have set withCredentials: true in my React App.
For WebSocket:
const socket = io('SOCKET_URL', {
transports: ['websocket', 'polling'],
withCredentials: true,
});
For polling:
const socket = io('SOCKET_URL', {
transports: ['polling'],
withCredentials: true,
});
