Repository navigation
withCredentials: true not sending cookies in production #5352
Replies: 1 comment
|
I'd check the cookie's host and path first. For the polling handshake, the Socket.IO server also needs your actual frontend origin and credentials enabled: const io = new Server(httpServer, {
cors: {
origin: 'https://app.example.com',
credentials: true,
},
});Don't use In DevTools, check whether the login response's cookie was stored, then inspect the initial Socket.IO request for excluded-cookie reasons. Sharing the frontend/API origins and the Socket.IO credentials setup · Cookie domain/path/SameSite rules. AI-assisted; checked the local 4.8.1 server's CORS headers and cookie URL-matching cases. This wasn't a reproduction of your production browser session. |
Uh oh!
There was an error while loading. Please reload this page.
Hello, I have an express server and a nextjs client. I want to send cookies for auth from the client to the server. Locally this works fine, but in production it does not attach the cookies despite withCredentials begin set to true. Any insight here? I'm using version 4.8
All reactions