I'm trying to send access and refresh tokens from the server to the client and vice versa using http only cookies. The server sends the cookies to the client, but when the client makes subsequent requests, the cookies aren't sent to the server.
The client URL is www.localtest.me:5173
The server URL is localtest2.me:8000
Following the answer mentioned in this thread, I've set http only to be true, secure to be true, and same site to be none, but even then, the client is unable to send the cookies back to the server. (I've also set withCredentials: true
in the axios instance)
So what am I doing wrong?
The response from the server on logging in: