after a lot of research I finally solved the problem.
my project setup is django for the backend and react for the frontend
in the frontend where you import axios for my case in the authslice.js
include the line just before the rest of your axios
axios.defaults.withCredentials = true;
then in your settings.py
include the following settings
CORS_ALLOWED_ORIGINS = [
REACT_APP_URL,
]
CORS_ALLOW_CREDENTIALS = True
SESSION_COOKIE_SECURE = True # True is essential for same-site none to work
SESSION_COOKIE_SAMESITE = 'None'
thanks! I hope you solve your issue